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_CARBON
=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|
-carbon|
-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 # do nothing - Cocoa is the default.
1327 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1328 CFG_MAC_CARBON
="$VAL"
1329 COMMANDLINE_MAC_CARBON
="$VAL"
1336 if [ "$PLATFORM_MAC" = "yes" ]; then
1337 CFG_FRAMEWORK
="$VAL"
1343 if [ "$VAL" = "yes" ]; then
1345 QMakeVar add QMAKE_CFLAGS
-pg
1346 QMakeVar add QMAKE_CXXFLAGS
-pg
1347 QMakeVar add QMAKE_LFLAGS
-pg
1348 QMAKE_VARS
="$QMAKE_VARS CONFIG+=nostrip"
1353 exceptions|g
++-exceptions)
1354 if [ "$VAL" = "no" ]; then
1356 elif [ "$VAL" = "yes" ]; then
1364 # keep compatibility with old platform names
1370 PLATFORM
=hpux-acc-o64
1373 PLATFORM
=hpux-acc-64
1376 PLATFORM
=hpux-acc-64
1388 PLATFORM
=reliant-cds-64
1391 PLATFORM
=solaris-cc-64
1394 PLATFORM
=solaris-cc-64
1397 PLATFORM
=unixware-cc
1400 PLATFORM
=unixware-g
++
1403 PLATFORM
=unixware-cc
1406 PLATFORM
=unixware-g
++
1412 i386
) NATIVE_64_ARCH
="x86_64" ;;
1413 powerpc
) NATIVE_64_ARCH
="ppc64" ;;
1414 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1416 if [ ! -z "$NATIVE_64_ARCH" ]; then
1417 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1418 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1427 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1428 CFG_DEBUG_RELEASE
="$VAL"
1434 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1435 CFG_RELEASE_QMAKE
="$VAL"
1441 if [ "$VAL" = "yes" ]; then
1443 elif [ "$VAL" = "no" ]; then
1450 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1451 CFG_PREFIX_INSTALL
="$VAL"
1459 developer-build|commercial|opensource|nokia-developer
)
1460 # These switches have been dealt with already
1463 if [ "$VAL" = "yes" ]; then
1465 elif [ "$VAL" = "no" ]; then
1472 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1473 CFG_INCREMENTAL
="$VAL"
1479 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1480 CFG_CONFIGURE_EXIT_ON_ERROR
="$VAL"
1486 if [ "$PLATFORM_QWS" = "yes" ]; then
1487 FEATURE
=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1488 if [ "$VAL" = "no" ]; then
1489 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_$FEATURE"
1490 elif [ "$VAL" = "yes" ] ||
[ "$VAL" = "unknown" ]; then
1491 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_$FEATURE"
1500 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1507 [ "$VAL" = "qt" ] && VAL
=yes
1508 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1515 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1523 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1530 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1537 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1544 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1551 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1558 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1559 CFG_PRECOMPILE
="$VAL"
1564 separate-debug-info
)
1565 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1566 CFG_SEPARATE_DEBUG_INFO
="$VAL"
1567 elif [ "$VAL" = "nocopy" ] ; then
1568 CFG_SEPARATE_DEBUG_INFO
="yes"
1569 CFG_SEPARATE_DEBUG_INFO_NOCOPY
="yes"
1575 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1576 CFG_REDUCE_EXPORTS
="$VAL"
1582 if [ "$VAL" = "no" ]; then
1589 if [ "$VAL" = "no" ]; then
1596 if [ "$VAL" = "no" ]; then
1603 if [ "$VAL" = "no" ]; then
1613 if [ "$VAL" = "no" ]; then
1620 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1621 CFG_REDUCE_RELOCATIONS
="$VAL"
1627 [ "$VAL" = "qt" ] && VAL
=yes
1628 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1629 CFG_QWS_FREETYPE
="$VAL"
1635 [ "$VAL" = "qt" ] && VAL
=yes
1636 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1641 # No longer supported:
1642 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1645 if [ "$VAL" = "system" ]; then
1652 [ "$VAL" = "yes" ] && VAL
=qt
1653 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1660 [ "$VAL" = "yes" ] && VAL
=qt
1661 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1668 [ "$VAL" = "yes" ] && VAL
=qt
1669 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1676 [ "$VAL" = "yes" ] && VAL
=qt
1677 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1684 if [ "$VAL" = "system" ] ||
[ "$VAL" = "no" ]; then
1691 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1698 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1705 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1712 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1719 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1726 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1727 CFG_FONTCONFIG
="$VAL"
1733 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1740 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1747 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1754 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1761 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1762 CFG_GSTREAMER
="$VAL"
1768 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1769 CFG_QGTKSTYLE
="$VAL"
1775 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "linked" ]; then
1777 elif [ "$VAL" = "runtime" ]; then
1784 if [ "$VAL" = "yes" ]; then
1791 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1798 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1799 CFG_LARGEFILE
="$VAL"
1805 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1812 if [ "$VAL" = "yes" ]; then
1813 CFG_OPENSSL
="linked"
1819 if [ "$VAL" = "yes" ]; then
1827 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1828 CFG_XMLPATTERNS
="yes"
1830 if [ "$VAL" = "no" ]; then
1831 CFG_XMLPATTERNS
="no"
1838 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1841 if [ "$VAL" = "no" ]; then
1849 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1850 CFG_SCRIPTTOOLS
="yes"
1852 if [ "$VAL" = "no" ]; then
1853 CFG_SCRIPTTOOLS
="no"
1860 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1863 if [ "$VAL" = "no" ]; then
1871 if [ "$VAL" = "yes" ]; then
1872 CFG_DECLARATIVE
="yes"
1874 if [ "$VAL" = "no" ]; then
1875 CFG_DECLARATIVE
="no"
1882 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1885 if [ "$VAL" = "no" ]; then
1893 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ] ||
[ "$VAL" = "no" ]; then
1894 CFG_JAVASCRIPTCORE_JIT
="$VAL"
1900 if [ "$VAL" = "yes" ]; then
1901 OPT_CONFIRM_LICENSE
="$VAL"
1907 if [ "$VAL" = "yes" ]; then
1913 sql-
*|gfx-
*|decoration-
*|kbd-
*|mouse-
*)
1914 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1915 # if autoconf style options were used, $VAL can be "yes" or "no"
1916 [ "$VAL" = "yes" ] && VAL
=qt
1917 # now $VAL should be "no", "qt", or "plugin"... double-check
1918 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1921 # now $VAL is "no", "qt", or "plugin"
1923 VAL
=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1924 VAR
=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1926 # Grab the available values
1929 avail
="$CFG_SQL_AVAILABLE"
1932 avail
="$CFG_GFX_AVAILABLE"
1933 if [ "$OPT" = "plugin" ]; then
1934 avail
="$CFG_GFX_PLUGIN_AVAILABLE"
1938 avail
="$CFG_DECORATION_AVAILABLE"
1939 if [ "$OPT" = "plugin" ]; then
1940 avail
="$CFG_DECORATION_PLUGIN_AVAILABLE"
1944 avail
="$CFG_KBD_AVAILABLE"
1945 if [ "$OPT" = "plugin" ]; then
1946 avail
="$CFG_KBD_PLUGIN_AVAILABLE"
1950 avail
="$CFG_MOUSE_AVAILABLE"
1951 if [ "$OPT" = "plugin" ]; then
1952 avail
="$CFG_MOUSE_PLUGIN_AVAILABLE"
1957 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1961 # Check that that user's value is available.
1964 if [ "$VAL" = "$d" ]; then
1969 [ "$found" = yes ] || ERROR
=yes
1971 if [ "$VAR" = "sql" ]; then
1972 # set the CFG_SQL_driver
1973 eval "CFG_SQL_$VAL=\$OPT"
1977 if [ "$OPT" = "plugin" ] ||
[ "$OPT" = "qt" ]; then
1978 if [ "$OPT" = "plugin" ]; then
1979 [ "$VAR" = "decoration" ] && QMakeVar del
"${VAR}s" "$VAL"
1980 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
1981 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
1982 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
1983 [ "$VAR" = "mouse" ] && QMakeVar del
"${VAR}s" "$VAL"
1984 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
1985 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
1986 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
1989 if [ "$VAR" = "gfx" ] ||
[ "$VAR" = "kbd" ] ||
[ "$VAR" = "decoration" ] ||
[ "$VAR" = "mouse" ]; then
1990 [ "$VAR" = "gfx" ] && CFG_GFX_ON
="$CFG_GFX_ON $VAL"
1991 [ "$VAR" = "kbd" ] && CFG_KBD_ON
="$CFG_KBD_ON $VAL"
1992 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
="$CFG_DECORATION_ON $VAL"
1993 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
="$CFG_MOUSE_ON $VAL"
1997 QMakeVar add
"${VAR}s" "${VAL}"
1998 elif [ "$OPT" = "no" ]; then
1999 PLUG_VAR
="${VAR}-plugin"
2000 if [ "$VAR" = "gfx" ] ||
[ "$VAR" = "kbd" ] ||
[ "$VAR" = "mouse" ]; then
2001 IN_VAR
="${VAR}-driver"
2005 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2006 [ "$VAR" = "gfx" ] && CFG_GFX_ON
=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2007 [ "$VAR" = "kbd" ] && CFG_KBD_ON
=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2008 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2009 QMakeVar del
"${IN_VAR}s" "$VAL"
2010 QMakeVar del
"${PLUG_VAR}s" "$VAL"
2012 if [ "$ERROR" = "yes" ]; then
2013 echo "$CURRENT_OPT: unknown argument"
2018 if [ "$VAL" = "yes" ]; then
2019 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2020 QMAKE_SWITCHES
="$QMAKE_SWITCHES -d"
2024 elif [ "$VAL" = "no" ]; then
2025 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" |
grep ' -d' >/dev
/null
2>&1; then
2026 QMAKE_SWITCHES
=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2035 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2042 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2049 D_FLAGS
="$D_FLAGS \"$VAL\""
2052 I_FLAGS
="$I_FLAGS -I\"${VAL}\""
2055 L_FLAGS
="$L_FLAGS -L\"${VAL}\""
2058 RPATH_FLAGS
="$RPATH_FLAGS \"${VAL}\""
2061 l_FLAGS
="$l_FLAGS -l\"${VAL}\""
2064 if [ "$PLATFORM_MAC" = "yes" ]; then
2065 L_FLAGS
="$L_FLAGS -F\"${VAL}\""
2066 I_FLAGS
="$I_FLAGS -F\"${VAL}\""
2072 if [ "$PLATFORM_MAC" = "yes" ]; then
2073 l_FLAGS
="$l_FLAGS -framework \"${VAL}\""
2082 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2089 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2090 CFG_PHONON_BACKEND
="$VAL"
2096 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2097 CFG_MULTIMEDIA
="$VAL"
2103 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2104 CFG_AUDIO_BACKEND
="$VAL"
2113 if [ "$UNKNOWN_OPT" = "yes" ]; then
2114 echo "${CURRENT_OPT}: invalid command-line switch"
2120 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2121 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2125 # update QT_CONFIG to show our current predefined configuration
2126 case "$CFG_QCONFIG" in
2127 minimal|small|medium|large|full
)
2128 # these are a sequence of increasing functionality
2129 for c
in minimal small medium large full
; do
2130 QT_CONFIG
="$QT_CONFIG $c-config"
2131 [ "$CFG_QCONFIG" = $c ] && break
2135 # not known to be sufficient for anything
2136 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ]; then
2137 echo >&2 "Error: configuration file not found:"
2138 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2143 #-------------------------------------------------------------------------------
2144 # build tree initialization
2145 #-------------------------------------------------------------------------------
2147 # where to find which..
2148 unixtests
="$relpath/config.tests/unix"
2149 mactests
="$relpath/config.tests/mac"
2150 WHICH
="$unixtests/which.test"
2152 PERL
=`$WHICH perl 2>/dev/null`
2154 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2156 for e
in gawk nawk
awk; do
2157 if "$WHICH" $e >/dev
/null
2>&1 && ( $e -f /dev
/null
/dev
/null
) >/dev
/null
2>&1; then
2164 PERL
="/usr/bin/perl"
2165 if "$WHICH" perl
>/dev
/null
2>&1 && ( perl
/dev
/null
) >/dev
/null
2>&1; then
2169 ### skip this if the user just needs help...
2170 if [ "$OPT_HELP" != "yes" ]; then
2172 # is this a shadow build?
2173 if [ "$OPT_SHADOW" = "maybe" ]; then
2175 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2176 if [ -h "$outpath" ]; then
2177 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW
=yes
2183 if [ "$OPT_SHADOW" = "yes" ]; then
2184 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2185 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2186 echo >&2 "Cannot proceed."
2189 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2192 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2194 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2195 echo "By default, Qt is built in release mode with separate debug information, so"
2196 echo "-debug-and-release is not necessary anymore"
2200 # detect build style
2201 if [ "$CFG_DEBUG" = "auto" ]; then
2202 if [ "$PLATFORM_MAC" = "yes" ]; then
2203 CFG_DEBUG_RELEASE
=yes
2205 elif [ "$CFG_DEV" = "yes" ]; then
2206 CFG_DEBUG_RELEASE
=no
2209 CFG_DEBUG_RELEASE
=no
2213 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2214 QMAKE_CONFIG
="$QMAKE_CONFIG build_all"
2217 if [ "$CFG_SILENT" = "yes" ]; then
2218 QMAKE_CONFIG
="$QMAKE_CONFIG silent"
2221 # if the source tree is different from the build tree,
2222 # symlink or copy part of the sources
2223 if [ "$OPT_SHADOW" = "yes" ]; then
2224 echo "Preparing build tree..."
2226 if [ -z "$PERL" ]; then
2228 echo "You need perl in your PATH to make a shadow build."
2229 echo "Cannot proceed."
2233 [ -d "$outpath/bin" ] || mkdir
-p "$outpath/bin"
2235 # symlink the qmake directory
2236 find "$relpath/qmake" |
while read a
; do
2237 my_a
=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2238 if [ '!' -f "$my_a" ]; then
2239 if [ -d "$a" ]; then
2240 # directories are created...
2243 a_dir
=`dirname "$my_a"`
2244 [ -d "$a_dir" ] || mkdir
-p "$a_dir"
2245 # ... and files are symlinked
2246 case `basename "$a"` in
2247 *.o|
*.d|GNUmakefile
*|qmake
)
2258 # make a syncqt script that can be used in the shadow
2259 rm -f "$outpath/bin/syncqt"
2260 if [ -x "$relpath/bin/syncqt" ]; then
2261 mkdir
-p "$outpath/bin"
2262 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2263 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
2264 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2265 chmod 755 "$outpath/bin/syncqt"
2268 # symlink the mkspecs directory
2269 mkdir
-p "$outpath/mkspecs"
2270 rm -f "$outpath"/mkspecs
/*
2271 ln -s "$relpath"/mkspecs
/* "$outpath/mkspecs"
2272 rm -f "$outpath/mkspecs/default"
2274 # symlink the doc directory
2275 rm -rf "$outpath/doc"
2276 ln -s "$relpath/doc" "$outpath/doc"
2278 # make sure q3porting.xml can be found
2279 mkdir
-p "$outpath/tools/porting/src"
2280 rm -f "$outpath/tools/porting/src/q3porting.xml"
2281 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2284 # symlink fonts to be able to run application from build directory
2285 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then
2286 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2287 mkdir
-p "${outpath}/lib"
2288 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2292 if [ "$OPT_FAST" = "auto" ]; then
2293 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2300 # find a make command
2301 if [ -z "$MAKE" ]; then
2303 for mk
in gmake
make; do
2304 if "$WHICH" $mk >/dev
/null
2>&1; then
2309 if [ -z "$MAKE" ]; then
2310 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2311 echo >&2 "Cannot proceed."
2314 # export MAKE, we need it later in the config.tests
2320 #-------------------------------------------------------------------------------
2321 # auto-detect all that hasn't been specified in the arguments
2322 #-------------------------------------------------------------------------------
2324 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED
=auto
2325 if [ "$CFG_EMBEDDED" != "no" ]; then
2326 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2328 [ -z "$PLATFORM" ] && PLATFORM
=qws
/macx-generic-g
++
2329 if [ -z "$XPLATFORM" ]; then
2330 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2331 XPLATFORM
="qws/macx-$CFG_EMBEDDED-g++"
2335 [ -z "$PLATFORM" ] && PLATFORM
=qws
/freebsd-generic-g
++
2336 if [ -z "$XPLATFORM" ]; then
2337 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2338 XPLATFORM
="qws/freebsd-$CFG_EMBEDDED-g++"
2342 [ -z "$PLATFORM" ] && PLATFORM
=qws
/solaris-generic-g
++
2343 if [ -z "$XPLATFORM" ]; then
2344 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2345 XPLATFORM
="qws/solaris-$CFG_EMBEDDED-g++"
2349 if [ -z "$PLATFORM" ]; then
2350 case "$UNAME_MACHINE" in
2352 PLATFORM
=qws
/linux-x86-g
++
2355 PLATFORM
=qws
/linux-x86_64-g
++
2358 PLATFORM
=qws
/linux-generic-g
++
2362 if [ -z "$XPLATFORM" ]; then
2363 if [ "$CFG_EMBEDDED" = "auto" ]; then
2364 if [ -n "$CFG_ARCH" ]; then
2365 CFG_EMBEDDED
=$CFG_ARCH
2367 case "$UNAME_MACHINE" in
2375 CFG_EMBEDDED
=generic
2380 XPLATFORM
="qws/linux-$CFG_EMBEDDED-g++"
2384 [ -z "$PLATFORM" ] && PLATFORM
=unsupported
/qws
/qnx-generic-g
++
2385 if [ -z "$XPLATFORM" ]; then
2386 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2387 XPLATFORM
="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2394 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2400 if [ -z "$PLATFORM" ]; then
2402 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2404 if [ "$PLATFORM_MAC" = "yes" ]; then
2406 # PLATFORM=macx-xcode
2413 #PLATFORM=aix-g++-64
2415 #PLATFORM=aix-xlc-64
2417 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2427 # PLATFORM=dynix-g++
2433 PLATFORM
=freebsd-g
++
2435 - Also available for FreeBSD: freebsd-icc
2439 PLATFORM
=openbsd-g
++
2450 #PLATFORM=irix-cc-64
2452 - Also available for IRIX: irix-g++ irix-cc-64
2456 case "$UNAME_MACHINE" in
2458 #PLATFORM=hpuxi-acc-32
2459 PLATFORM
=hpuxi-acc-64
2461 - Also available for HP-UXi: hpuxi-acc-32
2467 #PLATFORM=hpux-acc-64
2469 #PLATFORM=hpux-acc-o64
2471 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2480 - Also available for Tru64: tru64-g++
2484 case "$UNAME_MACHINE" in
2486 PLATFORM
=linux-g
++-64
2493 - Also available for Linux: linux-kcc linux-icc linux-cxx
2497 #PLATFORM=solaris-g++
2499 #PLATFORM=solaris-cc64
2501 - Also available for Solaris: solaris-g++ solaris-cc-64
2504 ReliantUNIX-
*:*|SINIX-
*:*)
2505 PLATFORM
=reliant-cds
2506 #PLATFORM=reliant-cds-64
2508 - Also available for Reliant UNIX: reliant-cds-64
2518 #PLATFORM=unixware-g++
2519 PLATFORM
=unixware-cc
2521 - Also available for OpenUNIX: unixware-g++
2525 #PLATFORM=unixware-g++
2526 PLATFORM
=unixware-cc
2528 - Also available for UnixWare: unixware-g++
2535 - Also available for SCO OpenServer: sco-g++
2539 PLATFORM
=unixware-g
++
2542 PLATFORM
=unsupported
/qnx-g
++
2545 if [ "$OPT_HELP" != "yes" ]; then
2547 for p
in $PLATFORMS; do
2548 echo " $relconf $* -platform $p"
2551 echo " The build script does not currently recognize all" >&2
2552 echo " platforms supported by Qt." >&2
2553 echo " Rerun this script with a -platform option listed to" >&2
2554 echo " set the system/compiler combination you use." >&2
2561 if [ "$PLATFORM_QWS" = "yes" ]; then
2563 PLATFORMS
=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2565 PLATFORMS
=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2568 [ -z "$XPLATFORM" ] && XPLATFORM
="$PLATFORM"
2569 if [ -d "$PLATFORM" ]; then
2570 QMAKESPEC
="$PLATFORM"
2572 QMAKESPEC
="$relpath/mkspecs/${PLATFORM}"
2574 if [ -d "$XPLATFORM" ]; then
2575 XQMAKESPEC
="$XPLATFORM"
2577 XQMAKESPEC
="$relpath/mkspecs/${XPLATFORM}"
2579 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2580 QT_CROSS_COMPILE
=yes
2581 QMAKE_CONFIG
="$QMAKE_CONFIG cross_compile"
2584 if [ "$PLATFORM_MAC" = "yes" ]; then
2585 if [ `basename $QMAKESPEC` = "macx-xcode" ] ||
[ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2587 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2588 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2589 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2590 echo " built with 'macx-g++'" >&2
2596 # check specified platforms are supported
2597 if [ '!' -d "$QMAKESPEC" ]; then
2599 echo " The specified system/compiler is not supported:"
2603 echo " Please see the README file for a complete list."
2607 if [ '!' -d "$XQMAKESPEC" ]; then
2609 echo " The specified system/compiler is not supported:"
2613 echo " Please see the README file for a complete list."
2617 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2619 echo " The specified system/compiler port is not complete:"
2621 echo " $XQMAKESPEC/qplatformdefs.h"
2623 echo " Please contact qt-bugs@trolltech.com."
2628 # now look at the configs and figure out what platform we are config'd for
2629 [ "$CFG_EMBEDDED" = "no" ] \
2630 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2632 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2634 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2635 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2636 if echo $UNAME_RELEASE |
grep "^5\.[5|6]" >/dev
/null
2>&1; then
2637 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2638 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2642 #-------------------------------------------------------------------------------
2643 # determine the system architecture
2644 #-------------------------------------------------------------------------------
2645 if [ "$OPT_VERBOSE" = "yes" ]; then
2646 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2649 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2650 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2652 echo "You have specified a target architecture with -embedded and -arch."
2653 echo "The two architectures you have specified are different, so we can"
2654 echo "not proceed. Either set both to be the same, or only use -embedded."
2660 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2661 case `basename "$XPLATFORM"` in
2664 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2666 echo "Please contact qt-info@nokia.com to upgrade your license to"
2667 echo "include this platform, or install the Qt Open Source Edition"
2668 echo "if you intend to develop free software."
2674 if [ -z "${CFG_HOST_ARCH}" ]; then
2675 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2677 CFG_HOST_ARCH
=`uname -p`
2678 if [ "$OPT_VERBOSE" = "yes" ]; then
2679 echo " SGI ($CFG_HOST_ARCH)"
2683 case "$UNAME_MACHINE" in
2685 if [ "$OPT_VERBOSE" = "yes" ]; then
2686 echo " Sun SPARC (sparc)"
2693 if [ "$OPT_VERBOSE" = "yes" ]; then
2694 echo " 64-bit AMD 80x86 (x86_64)"
2696 CFG_HOST_ARCH
=x86_64
2699 if [ "$OPT_VERBOSE" = "yes" ]; then
2700 echo " 32-bit Intel 80x86 (i386)"
2708 case "$UNAME_MACHINE" in
2710 if [ "$OPT_VERBOSE" = "yes" ]; then
2711 echo " 32-bit Apple PowerPC (powerpc)"
2715 if [ "$OPT_VERBOSE" = "yes" ]; then
2716 echo " 32-bit Intel 80x86 (i386)"
2720 CFG_HOST_ARCH
=macosx
2723 if [ "$OPT_VERBOSE" = "yes" ]; then
2724 echo " 64-bit IBM PowerPC (powerpc)"
2726 CFG_HOST_ARCH
=powerpc
2729 if [ "$OPT_VERBOSE" = "yes" ]; then
2730 echo " HP PA-RISC (parisc)"
2732 CFG_HOST_ARCH
=parisc
2735 if [ "$OPT_VERBOSE" = "yes" ]; then
2736 echo " 32-bit Intel 80x86 (i386)"
2740 *:*:x86_64|
*:*:amd64
)
2741 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2742 if [ "$OPT_VERBOSE" = "yes" ]; then
2743 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2747 if [ "$OPT_VERBOSE" = "yes" ]; then
2748 echo " 64-bit AMD 80x86 (x86_64)"
2750 CFG_HOST_ARCH
=x86_64
2754 if [ "$OPT_VERBOSE" = "yes" ]; then
2755 echo " 32-bit PowerPC (powerpc)"
2757 CFG_HOST_ARCH
=powerpc
2760 if [ "$OPT_VERBOSE" = "yes" ]; then
2761 echo " 64-bit PowerPC (powerpc)"
2763 CFG_HOST_ARCH
=powerpc
2766 if [ "$OPT_VERBOSE" = "yes" ]; then
2767 echo " IBM S/390 (s390)"
2772 if [ "$OPT_VERBOSE" = "yes" ]; then
2778 if [ "$OPT_VERBOSE" = "yes" ]; then
2779 echo " Linux on SPARC"
2784 case "$UNAME_MACHINE" in
2786 if [ "$OPT_VERBOSE" = "yes" ]; then
2787 echo " QNX on Intel 80x86 (i386)"
2794 if [ "$OPT_VERBOSE" = "yes" ]; then
2795 echo " Trying '$UNAME_MACHINE'..."
2797 CFG_HOST_ARCH
="$UNAME_MACHINE"
2802 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2803 if [ -n "$CFG_ARCH" ]; then
2804 CFG_EMBEDDED
=$CFG_ARCH
2807 case "$CFG_EMBEDDED" in
2827 CFG_ARCH
="$CFG_EMBEDDED"
2830 elif [ "$PLATFORM_MAC" = "yes" ] ||
[ -z "$CFG_ARCH" ]; then
2831 CFG_ARCH
=$CFG_HOST_ARCH
2834 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
2835 if [ "$OPT_VERBOSE" = "yes" ]; then
2836 echo " '$CFG_ARCH' is supported"
2839 if [ "$OPT_VERBOSE" = "yes" ]; then
2840 echo " '$CFG_ARCH' is unsupported, using 'generic'"
2844 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
2845 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
2846 if [ "$OPT_VERBOSE" = "yes" ]; then
2847 echo " '$CFG_HOST_ARCH' is supported"
2850 if [ "$OPT_VERBOSE" = "yes" ]; then
2851 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
2853 CFG_HOST_ARCH
=generic
2857 if [ "$OPT_VERBOSE" = "yes" ]; then
2858 echo "System architecture: '$CFG_ARCH'"
2859 if [ "$PLATFORM_QWS" = "yes" ]; then
2860 echo "Host architecture: '$CFG_HOST_ARCH'"
2864 #-------------------------------------------------------------------------------
2865 # tests that don't need qmake (must be run before displaying help)
2866 #-------------------------------------------------------------------------------
2868 if [ -z "$PKG_CONFIG" ]; then
2869 # See if PKG_CONFIG is set in the mkspec:
2870 PKG_CONFIG
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
2872 if [ -z "$PKG_CONFIG" ]; then
2873 PKG_CONFIG
=`"$WHICH" pkg-config 2>/dev/null`
2876 # Work out if we can use pkg-config
2877 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2878 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2880 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2881 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2882 echo >&2 "environment!"
2884 if [ -z "$PKG_CONFIG_PATH" ]; then
2886 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2887 echo >&2 "the host compiler's .pc files will be used. This is probably"
2888 echo >&2 "not what you want."
2890 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2892 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2893 echo >&2 "been set. This means your toolchain's .pc files must contain"
2894 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2895 echo >&2 "tests are failing, please check these files."
2900 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2901 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2902 echo >&2 "dependencies"
2908 # process CFG_MAC_ARCHS
2909 if [ "$PLATFORM_MAC" = "yes" ]; then
2910 # check -arch arguments for validity.
2911 ALLOWED
="x86 ppc x86_64 ppc64 i386"
2912 # Save the list so we can re-write it using only valid values
2913 CFG_MAC_ARCHS_IN
="$CFG_MAC_ARCHS"
2915 for i
in $CFG_MAC_ARCHS_IN
2917 if echo "$ALLOWED" |
grep -w -v "$i" > /dev
/null
2>&1; then
2918 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
2921 if [ "$i" = "i386" -o "$i" = "x86" ]; then
2922 # These are synonymous values
2923 # CFG_MAC_ARCHS requires x86 while GCC requires i386
2924 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS x86"
2925 MAC_CONFIG_TEST_COMMANDLINE
="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
2927 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $i"
2928 MAC_CONFIG_TEST_COMMANDLINE
="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
2933 # pass on $CFG_SDK to the configure tests.
2934 if [ '!' -z "$CFG_SDK" ]; then
2935 MAC_CONFIG_TEST_COMMANDLINE
="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2938 # find the default framework value
2939 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2940 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2941 CFG_FRAMEWORK
="$CFG_SHARED"
2942 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2944 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2952 QMAKE_CONF_COMPILER
=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
2954 [ -z "$TEST_COMPILER" ] && TEST_COMPILER
=$QMAKE_CONF_COMPILER
2955 if [ -z "$TEST_COMPILER" ]; then
2956 echo "ERROR: Cannot set the compiler for the configuration tests"
2960 # auto-detect precompiled header support
2961 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2962 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2964 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2969 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2971 echo "WARNING: Using universal binaries disables precompiled headers."
2976 #auto-detect DWARF2 on the mac
2977 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2978 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2985 # auto-detect support for -Xarch on the mac
2986 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
2987 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2994 # don't autodetect support for separate debug info on objcopy when
2995 # cross-compiling as lots of toolchains seems to have problems with this
2996 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2997 CFG_SEPARATE_DEBUG_INFO
="no"
3000 # auto-detect support for separate debug info in objcopy
3001 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3002 TEST_COMPILER_CFLAGS
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_].*=%%p' | tr '\n' ' '`
3003 TEST_COMPILER_CXXFLAGS
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_].*=%%p' | tr '\n' ' '`
3004 TEST_OBJCOPY
=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3005 COMPILER_WITH_FLAGS
="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3006 COMPILER_WITH_FLAGS
=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3007 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3008 CFG_SEPARATE_DEBUG_INFO
=no
3012 # binutils on HP-UX is buggy; default to no.
3013 CFG_SEPARATE_DEBUG_INFO
=no
3016 CFG_SEPARATE_DEBUG_INFO
=yes
3022 # auto-detect -fvisibility support
3023 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3024 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3025 CFG_REDUCE_EXPORTS
=no
3027 CFG_REDUCE_EXPORTS
=yes
3031 # detect the availability of the -Bsymbolic-functions linker optimization
3032 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3033 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3034 CFG_REDUCE_RELOCATIONS
=no
3036 CFG_REDUCE_RELOCATIONS
=yes
3040 # auto-detect GNU make support
3041 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v |
grep "GNU Make" >/dev
/null
2>&1; then
3045 # If -opengl wasn't specified, don't try to auto-detect
3046 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3051 if [ "$PLATFORM_MAC" = "yes" ]; then
3052 if [ "$CFG_OPENGL" = "auto" ] ||
[ "$CFG_OPENGL" = "yes" ]; then
3057 # find the default framework value
3058 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
3059 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3060 CFG_FRAMEWORK
="$CFG_SHARED"
3061 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3063 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3071 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3072 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3073 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3074 # get the darwin version. 10.0.0 and up means snow leopard.
3075 VERSION
=`uname -r | tr '.' ' ' | awk '{print $1}'`
3076 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3078 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3083 # x11 tests are done after qmake is built
3086 #setup the build parts
3087 if [ -z "$CFG_BUILD_PARTS" ]; then
3088 CFG_BUILD_PARTS
="$QT_DEFAULT_BUILD_PARTS"
3090 # don't build tools by default when cross-compiling
3091 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3092 CFG_BUILD_PARTS
=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3095 for nobuild
in $CFG_NOBUILD_PARTS; do
3096 CFG_BUILD_PARTS
=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3098 if echo $CFG_BUILD_PARTS |
grep -v libs
>/dev
/null
2>&1; then
3100 # echo "WARNING: libs is a required part of the build."
3102 CFG_BUILD_PARTS
="$CFG_BUILD_PARTS libs"
3105 #-------------------------------------------------------------------------------
3106 # post process QT_INSTALL_* variables
3107 #-------------------------------------------------------------------------------
3110 if [ -z "$QT_INSTALL_PREFIX" ]; then
3111 if [ "$CFG_DEV" = "yes" ]; then
3112 QT_INSTALL_PREFIX
="$outpath" # In Development, we use sandboxed builds by default
3113 elif [ "$PLATFORM_QWS" = "yes" ]; then
3114 QT_INSTALL_PREFIX
="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
3115 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3116 QT_INSTALL_PREFIX
="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
3119 QT_INSTALL_PREFIX
="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
3122 QT_INSTALL_PREFIX
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3125 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3126 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3127 if [ "$PLATFORM_MAC" = "yes" ]; then
3128 QT_INSTALL_DOCS
="/Developer/Documentation/Qt"
3131 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS
="$QT_INSTALL_PREFIX/doc" #fallback
3134 QT_INSTALL_DOCS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3137 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3138 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3139 if [ "$PLATFORM_MAC" = "yes" ]; then
3140 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3145 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS
="$QT_INSTALL_PREFIX/include"
3148 QT_INSTALL_HEADERS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3151 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3152 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3153 if [ "$PLATFORM_MAC" = "yes" ]; then
3154 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3155 QT_INSTALL_LIBS
="/Libraries/Frameworks"
3159 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS
="$QT_INSTALL_PREFIX/lib" #fallback
3161 QT_INSTALL_LIBS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3164 if [ -z "$QT_INSTALL_BINS" ]; then #default
3165 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3166 if [ "$PLATFORM_MAC" = "yes" ]; then
3167 QT_INSTALL_BINS
="/Developer/Applications/Qt"
3170 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS
="$QT_INSTALL_PREFIX/bin" #fallback
3173 QT_INSTALL_BINS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3176 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3177 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3178 if [ "$PLATFORM_MAC" = "yes" ]; then
3179 QT_INSTALL_PLUGINS
="/Developer/Applications/Qt/plugins"
3182 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS
="$QT_INSTALL_PREFIX/plugins" #fallback
3184 QT_INSTALL_PLUGINS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3187 if [ -z "$QT_INSTALL_DATA" ]; then #default
3188 QT_INSTALL_DATA
="$QT_INSTALL_PREFIX"
3190 QT_INSTALL_DATA
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3193 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3194 QT_INSTALL_TRANSLATIONS
="$QT_INSTALL_PREFIX/translations"
3196 QT_INSTALL_TRANSLATIONS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3199 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3200 if [ "$PLATFORM_MAC" = "yes" ]; then
3201 QT_INSTALL_SETTINGS
=/Library
/Preferences
/Qt
3203 QT_INSTALL_SETTINGS
=/etc
/xdg
3206 QT_INSTALL_SETTINGS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3209 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3210 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3211 if [ "$PLATFORM_MAC" = "yes" ]; then
3212 QT_INSTALL_EXAMPLES
="/Developer/Examples/Qt"
3215 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES
="$QT_INSTALL_PREFIX/examples" #fallback
3217 QT_INSTALL_EXAMPLES
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3220 if [ -z "$QT_INSTALL_DEMOS" ]; then #default
3221 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3222 if [ "$PLATFORM_MAC" = "yes" ]; then
3223 QT_INSTALL_DEMOS
="/Developer/Examples/Qt/Demos"
3226 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS
="$QT_INSTALL_PREFIX/demos"
3228 QT_INSTALL_DEMOS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
3230 #-------------------------------------------------------------------------------
3231 # help - interactive parts of the script _after_ this section please
3232 #-------------------------------------------------------------------------------
3234 # next, emit a usage message if something failed.
3235 if [ "$OPT_HELP" = "yes" ]; then
3236 [ "x$ERROR" = "xyes" ] && echo
3237 if [ "$CFG_NIS" = "no" ]; then
3244 if [ "$CFG_CUPS" = "no" ]; then
3251 if [ "$CFG_ICONV" = "no" ]; then
3258 if [ "$CFG_LARGEFILE" = "no" ]; then
3265 if [ "$CFG_STL" = "auto" ] ||
[ "$CFG_STL" = "yes" ]; then
3272 if [ "$CFG_IPV6" = "auto" ]; then
3276 if [ "$CFG_PRECOMPILE" = "auto" ] ||
[ "$CFG_PRECOMPILE" = "no" ]; then
3285 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3286 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
3287 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3288 [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
3289 [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3290 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3291 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3292 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3293 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3294 [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3295 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3296 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3297 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3298 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3299 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
3300 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3301 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3302 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3303 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3304 [-no-audio-backend] [-audio-backend] [-no-openssl] [-openssl] [-openssl-linked]
3305 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
3306 [-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative]
3308 [additional platform specific options (see below)]
3311 Installation options:
3313 These are optional, but you may specify install directories.
3315 -prefix <dir> ...... This will install everything relative to <dir>
3316 (default $QT_INSTALL_PREFIX)
3318 if [ "$PLATFORM_QWS" = "yes" ]; then
3321 -hostprefix [dir] .. Tools and libraries needed when developing
3322 applications are installed in [dir]. If [dir] is
3323 not given, the current build directory will be used.
3328 * -prefix-install .... Force a sandboxed "local" installation of
3329 Qt. This will install into
3330 $QT_INSTALL_PREFIX, if this option is
3331 disabled then some platforms will attempt a
3332 "system" install by placing default values to
3333 be placed in a system location other than
3336 You may use these to separate different parts of the install:
3338 -bindir <dir> ......... Executables will be installed to <dir>
3339 (default PREFIX/bin)
3340 -libdir <dir> ......... Libraries will be installed to <dir>
3341 (default PREFIX/lib)
3342 -docdir <dir> ......... Documentation will be installed to <dir>
3343 (default PREFIX/doc)
3344 -headerdir <dir> ...... Headers will be installed to <dir>
3345 (default PREFIX/include)
3346 -plugindir <dir> ...... Plugins will be installed to <dir>
3347 (default PREFIX/plugins)
3348 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3350 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3351 (default PREFIX/translations)
3352 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3353 (default PREFIX/etc/settings)
3354 -examplesdir <dir> .... Examples will be installed to <dir>
3355 (default PREFIX/examples)
3356 -demosdir <dir> ....... Demos will be installed to <dir>
3357 (default PREFIX/demos)
3359 You may use these options to turn on strict plugin loading.
3361 -buildkey <key> .... Build the Qt library and plugins using the specified
3362 <key>. When the library loads plugins, it will only
3363 load those that have a matching key.
3367 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3368 that needs to be evaluated. If the evaluation succeeds, the feature is
3369 included. Here is a short explanation of each option:
3371 * -release ........... Compile and link Qt with debugging turned off.
3372 -debug ............. Compile and link Qt with debugging turned on.
3373 -debug-and-release . Compile and link two versions of Qt, with and without
3374 debugging turned on (Mac only).
3376 -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting)
3378 -opensource......... Compile and link the Open-Source Edition of Qt.
3379 -commercial......... Compile and link the Commercial Edition of Qt.
3382 * -shared ............ Create and use shared Qt libraries.
3383 -static ............ Create and use static Qt libraries.
3385 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3387 -fast .............. Configure Qt quickly by generating Makefiles only for
3388 library and subdirectory targets. All other Makefiles
3389 are created as wrappers, which will in turn run qmake.
3391 -no-largefile ...... Disables large file support.
3392 + -largefile ......... Enables Qt to access files larger than 4 GB.
3395 if [ "$PLATFORM_QWS" = "yes" ]; then
3402 if [ "$CFG_DBUS" = "no" ]; then
3411 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3412 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3414 -no-accessibility .. Do not compile Accessibility support.
3415 * -accessibility ..... Compile Accessibility support.
3417 $SHN -no-stl ............ Do not compile STL support.
3418 $SHY -stl ............... Compile STL support.
3420 -no-sql-<driver> ... Disable SQL <driver> entirely.
3421 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3423 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3426 Possible values for <driver>:
3427 [ $CFG_SQL_AVAILABLE ]
3429 -system-sqlite ..... Use sqlite from the operating system.
3431 -no-qt3support ..... Disables the Qt 3 support functionality.
3432 * -qt3support ........ Enables the Qt 3 support functionality.
3434 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3435 + -xmlpatterns ....... Build the QtXmlPatterns module.
3436 QtXmlPatterns is built if a decent C++ compiler
3437 is used and exceptions are enabled.
3439 -no-multimedia ..... Do not build the QtMultimedia module.
3440 + -multimedia ........ Build the QtMultimedia module.
3442 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3443 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3445 -no-phonon ......... Do not build the Phonon module.
3446 + -phonon ............ Build the Phonon module.
3447 Phonon is built if a decent C++ compiler is used.
3448 -no-phonon-backend.. Do not build the platform phonon plugin.
3449 + -phonon-backend..... Build the platform phonon plugin.
3451 -no-svg ............ Do not build the SVG module.
3452 + -svg ............... Build the SVG module.
3454 -no-webkit ......... Do not build the WebKit module.
3455 + -webkit ............ Build the WebKit module.
3456 WebKit is built if a decent C++ compiler is used.
3458 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3459 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3461 -no-script ......... Do not build the QtScript module.
3462 + -script ............ Build the QtScript module.
3464 -no-scripttools .... Do not build the QtScriptTools module.
3465 + -scripttools ....... Build the QtScriptTools module.
3467 + -no-declarative .....Do not build the declarative module.
3468 -declarative ....... Build the declarative module.
3470 -platform target ... The operating system and compiler you are building
3473 See the README file for a list of supported
3474 operating systems and compilers.
3476 if [ "${PLATFORM_QWS}" != "yes" ]; then
3478 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3479 raster - Software rasterizer
3480 opengl - Rendering via OpenGL, Experimental!
3485 -no-mmx ............ Do not compile with use of MMX instructions.
3486 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3487 -no-sse ............ Do not compile with use of SSE instructions.
3488 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3490 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3491 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3493 -D <string> ........ Add an explicit define to the preprocessor.
3494 -I <string> ........ Add an explicit include path.
3495 -L <string> ........ Add an explicit library path.
3497 -help, -h .......... Display this information.
3499 Third Party Libraries:
3501 -qt-zlib ........... Use the zlib bundled with Qt.
3502 + -system-zlib ....... Use zlib from the operating system.
3503 See http://www.gzip.org/zlib
3505 -no-gif ............ Do not compile the plugin for GIF reading support.
3506 * -qt-gif ............ Compile the plugin for GIF reading support.
3507 See also src/plugins/imageformats/gif/qgifhandler.h
3509 -no-libtiff ........ Do not compile the plugin for TIFF support.
3510 -qt-libtiff ........ Use the libtiff bundled with Qt.
3511 + -system-libtiff .... Use libtiff from the operating system.
3512 See http://www.libtiff.org
3514 -no-libpng ......... Do not compile in PNG support.
3515 -qt-libpng ......... Use the libpng bundled with Qt.
3516 + -system-libpng ..... Use libpng from the operating system.
3517 See http://www.libpng.org/pub/png
3519 -no-libmng ......... Do not compile the plugin for MNG support.
3520 -qt-libmng ......... Use the libmng bundled with Qt.
3521 + -system-libmng ..... Use libmng from the operating system.
3522 See http://www.libmng.com
3524 -no-libjpeg ........ Do not compile the plugin for JPEG support.
3525 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3526 + -system-libjpeg .... Use libjpeg from the operating system.
3527 See http://www.ijg.org
3529 -no-openssl ........ Do not compile support for OpenSSL.
3530 + -openssl ........... Enable run-time OpenSSL support.
3531 -openssl-linked .... Enabled linked OpenSSL support.
3533 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3538 -make <part> ....... Add part to the list of parts to be built at make time.
3539 ($QT_DEFAULT_BUILD_PARTS)
3540 -nomake <part> ..... Exclude part from the list of parts to be built.
3542 -R <string> ........ Add an explicit runtime library path to the Qt
3544 -l <string> ........ Add an explicit library.
3546 -no-rpath .......... Do not use the library install path as a runtime
3548 + -rpath ............. Link Qt libraries and executables using the library
3549 install path as a runtime library path. Equivalent
3550 to -R install_libpath
3552 -continue .......... Continue as far as possible if an error occurs.
3554 -verbose, -v ....... Print verbose information about each step of the
3557 -silent ............ Reduce the build output so that warnings and errors
3558 can be seen more easily.
3560 * -no-optimized-qmake ... Do not build qmake optimized.
3561 -optimized-qmake ...... Build qmake optimized.
3563 $NSN -no-nis ............ Do not compile NIS support.
3564 $NSY -nis ............... Compile NIS support.
3566 $CUN -no-cups ........... Do not compile CUPS support.
3567 $CUY -cups .............. Compile CUPS support.
3568 Requires cups/cups.h and libcups.so.2.
3570 $CIN -no-iconv .......... Do not compile support for iconv(3).
3571 $CIY -iconv ............. Compile support for iconv(3).
3573 $PHN -no-pch ............ Do not use precompiled header support.
3574 $PHY -pch ............... Use precompiled header support.
3576 $DBN -no-dbus ........... Do not compile the QtDBus module.
3577 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3578 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3580 -reduce-relocations ..... Reduce relocations in the libraries through extra
3581 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3582 experimental; needs GNU ld >= 2.18).
3585 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3586 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3593 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3601 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
3605 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3606 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3612 if [ "$PLATFORM_X11" = "yes" ]; then
3613 if [ "$CFG_SM" = "no" ]; then
3620 if [ "$CFG_XSHAPE" = "no" ]; then
3627 if [ "$CFG_XINERAMA" = "no" ]; then
3634 if [ "$CFG_FONTCONFIG" = "no" ]; then
3641 if [ "$CFG_XCURSOR" = "no" ]; then
3648 if [ "$CFG_XFIXES" = "no" ]; then
3655 if [ "$CFG_XRANDR" = "no" ]; then
3662 if [ "$CFG_XRENDER" = "no" ]; then
3669 if [ "$CFG_MITSHM" = "no" ]; then
3676 if [ "$CFG_XINPUT" = "no" ]; then
3683 if [ "$CFG_XKB" = "no" ]; then
3690 if [ "$CFG_IM" = "no" ]; then
3701 -no-gtkstyle ....... Do not build the GTK theme integration.
3702 + -gtkstyle .......... Build the GTK theme integration.
3704 * -no-nas-sound ...... Do not compile in NAS sound support.
3705 -system-nas-sound .. Use NAS libaudio from the operating system.
3706 See http://radscan.com/nas.html
3708 -no-opengl ......... Do not support OpenGL.
3709 + -opengl <api> ...... Enable OpenGL support.
3710 With no parameter, this will auto-detect the "best"
3711 OpenGL API to use. If desktop OpenGL is available, it
3712 will be used. Use desktop, es1, es1cl or es2 for <api>
3713 to force the use of the Desktop (OpenGL 1.x or 2.x),
3714 OpenGL ES 1.x Common profile, 1.x Common Lite profile
3715 or 2.x APIs instead. On X11, the EGL API will be used
3716 to manage GL contexts in the case of OpenGL ES
3718 -no-openvg ........ Do not support OpenVG.
3719 + -openvg ........... Enable OpenVG support.
3720 Requires EGL support, typically supplied by an OpenGL
3721 or other graphics implementation.
3723 $SMN -no-sm ............. Do not support X Session Management.
3724 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3726 $SHN -no-xshape ......... Do not compile XShape support.
3727 $SHY -xshape ............ Compile XShape support.
3728 Requires X11/extensions/shape.h.
3730 $SHN -no-xsync .......... Do not compile XSync support.
3731 $SHY -xsync ............. Compile XSync support.
3732 Requires X11/extensions/sync.h.
3734 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3735 $XAY -xinerama .......... Compile Xinerama support.
3736 Requires X11/extensions/Xinerama.h and libXinerama.
3737 By default, Xinerama support will be compiled if
3738 available and the shared libraries are dynamically
3741 $XCN -no-xcursor ........ Do not compile Xcursor support.
3742 $XCY -xcursor ........... Compile Xcursor support.
3743 Requires X11/Xcursor/Xcursor.h and libXcursor.
3744 By default, Xcursor support will be compiled if
3745 available and the shared libraries are dynamically
3748 $XFN -no-xfixes ......... Do not compile Xfixes support.
3749 $XFY -xfixes ............ Compile Xfixes support.
3750 Requires X11/extensions/Xfixes.h and libXfixes.
3751 By default, Xfixes support will be compiled if
3752 available and the shared libraries are dynamically
3755 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3756 $XZY -xrandr ............ Compile Xrandr support.
3757 Requires X11/extensions/Xrandr.h and libXrandr.
3759 $XRN -no-xrender ........ Do not compile Xrender support.
3760 $XRY -xrender ........... Compile Xrender support.
3761 Requires X11/extensions/Xrender.h and libXrender.
3763 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3764 $XMY -mitshm ............ Compile MIT-SHM support.
3765 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3767 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3768 $FCGY -fontconfig ........ Compile FontConfig support.
3769 Requires fontconfig/fontconfig.h, libfontconfig,
3770 freetype.h and libfreetype.
3772 $XIN -no-xinput.......... Do not compile Xinput support.
3773 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3774 which requires IRIX with wacom.h and libXi or
3775 XFree86 with X11/extensions/XInput.h and libXi.
3777 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3778 $XKY -xkb ............... Compile XKB support.
3783 if [ "$PLATFORM_MAC" = "yes" ]; then
3788 -Fstring ........... Add an explicit framework path.
3789 -fw string ......... Add an explicit framework.
3791 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
3793 -carbon .............Build the Carbon version of Qt. 64-bit archs
3794 are not supported by carbon and will be built
3797 * -framework ......... Build Qt as a series of frameworks and
3798 link tools against those frameworks.
3799 -no-framework ...... Do not build Qt as a series of frameworks.
3801 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3802 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3804 -universal ......... Equivalent to -arch "ppc x86"
3806 -arch <arch> ....... Build Qt for <arch>
3807 Example values for <arch>: x86 ppc x86_64 ppc64
3808 Multiple -arch arguments can be specified.
3810 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3811 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3816 if [ "$PLATFORM_QWS" = "yes" ]; then
3819 Qt for Embedded Linux only:
3821 -xplatform target ... The target platform when cross-compiling.
3823 -no-feature-<feature> Do not compile in <feature>.
3824 -feature-<feature> .. Compile in <feature>. The available features
3825 are described in src/corelib/global/qfeatures.txt
3827 -embedded <arch> .... This will enable the embedded build, you must have a
3828 proper license for this switch to work.
3829 Example values for <arch>: arm mips x86 generic
3831 -armfpa ............. Target platform uses the ARM-FPA floating point format.
3832 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3834 The floating point format is usually autodetected by configure. Use this
3835 to override the detected value.
3837 -little-endian ...... Target platform is little endian (LSB first).
3838 -big-endian ......... Target platform is big endian (MSB first).
3840 -host-little-endian . Host platform is little endian (LSB first).
3841 -host-big-endian .... Host platform is big endian (MSB first).
3843 You only need to specify the endianness when
3844 cross-compiling, otherwise the host
3845 endianness will be used.
3847 -no-freetype ........ Do not compile in Freetype2 support.
3848 -qt-freetype ........ Use the libfreetype bundled with Qt.
3849 * -system-freetype .... Use libfreetype from the operating system.
3850 See http://www.freetype.org/
3852 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3853 default ($CFG_QCONFIG).
3855 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3856 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3858 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3859 by default all available decorations are on.
3860 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3861 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3862 linked to at run time.
3863 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3864 -no-decoration-<style> ....Disable decoration <style> entirely.
3865 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3867 -no-opengl .......... Do not support OpenGL.
3868 -opengl <api> ....... Enable OpenGL ES support
3869 With no parameter, this will attempt to auto-detect OpenGL ES 1.x
3870 or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection.
3872 NOTE: A QGLScreen driver for the hardware is required to support
3873 OpenGL ES on Qt for Embedded Linux.
3875 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3876 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3877 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3878 linked to at run time.
3879 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3880 -no-gfx-<driver> ... Disable graphics <driver> entirely.
3881 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3883 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
3884 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3886 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
3888 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
3890 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
3891 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3893 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
3894 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3895 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
3897 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
3898 -no-mouse-<driver> ... Disable mouse <driver> entirely.
3899 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3901 -iwmmxt ............ Compile using the iWMMXt instruction set
3902 (available on some XScale CPUs).
3904 -no-neon ........... Do not compile with use of NEON instructions.
3909 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3910 if [ "$CFG_GLIB" = "no" ]; then
3918 $GBN -no-glib ........... Do not compile Glib support.
3919 $GBY -glib .............. Compile Glib support.
3924 [ "x$ERROR" = "xyes" ] && exit 1
3929 # -----------------------------------------------------------------------------
3930 # LICENSING, INTERACTIVE PART
3931 # -----------------------------------------------------------------------------
3933 if [ "$PLATFORM_QWS" = "yes" ]; then
3934 Platform
="Qt for Embedded Linux"
3935 elif [ "$PLATFORM_MAC" = "yes" ]; then
3936 Platform
="Qt for Mac OS X"
3939 Platform
="Qt for Linux/X11"
3943 echo "This is the $Platform ${EditionString} Edition."
3946 if [ "$Edition" = "NokiaInternalBuild" ]; then
3947 echo "Detected -nokia-developer option"
3948 echo "Nokia employees and agents are allowed to use this software under"
3949 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
3950 elif [ "$Edition" = "OpenSource" ]; then
3952 echo "You are licensed to use this software under the terms of"
3953 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3954 if [ -f "$relpath/LICENSE.GPL3" ]; then
3955 echo "You are also licensed to use this software under the terms of"
3956 echo "the GNU General Public License (GPL) versions 3."
3962 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3963 echo "You have already accepted the terms of the $LicenseType license."
3966 if [ -f "$relpath/LICENSE.GPL3" ]; then
3967 echo "Type '3' to view the GNU General Public License version 3."
3969 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3970 echo "Type 'yes' to accept this license offer."
3971 echo "Type 'no' to decline this license offer."
3973 if echo '\c' |
grep '\c' >/dev
/null
; then
3974 echo -n "Do you accept the terms of $affix license? "
3976 echo "Do you accept the terms of $affix license? \c"
3981 if [ "$acceptance" = "yes" ] ||
[ "$acceptance" = "y" ]; then
3983 elif [ "$acceptance" = "no" ]; then
3984 echo "You are not licensed to use this software."
3987 elif [ "$acceptance" = "3" ]; then
3988 more "$relpath/LICENSE.GPL3"
3989 elif [ "$acceptance" = "L" ]; then
3990 more "$relpath/LICENSE.LGPL"
3993 elif [ "$Edition" = "Preview" ]; then
3994 TheLicense
=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3997 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3998 echo "You have already accepted the terms of the $LicenseType license."
4001 echo "You are licensed to use this software under the terms of"
4002 echo "the $TheLicense"
4004 echo "Type '?' to read the Preview License."
4005 echo "Type 'yes' to accept this license offer."
4006 echo "Type 'no' to decline this license offer."
4008 if echo '\c' |
grep '\c' >/dev
/null
; then
4009 echo -n "Do you accept the terms of the license? "
4011 echo "Do you accept the terms of the license? \c"
4016 if [ "$acceptance" = "yes" ]; then
4018 elif [ "$acceptance" = "no" ] ;then
4019 echo "You are not licensed to use this software."
4022 elif [ "$acceptance" = "?" ]; then
4023 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4026 elif [ "$Edition" != "OpenSource" ]; then
4027 if [ -n "$ExpiryDate" ]; then
4028 ExpiryDate
=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4029 [ -z "$ExpiryDate" ] && ExpiryDate
="0"
4030 Today
=`date +%Y%m%d`
4031 if [ "$Today" -gt "$ExpiryDate" ]; then
4032 case "$LicenseType" in
4033 Commercial|Academic|Educational
)
4034 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4036 echo "NOTICE NOTICE NOTICE NOTICE"
4038 echo " Your support and upgrade period has expired."
4040 echo " You are no longer licensed to use this version of Qt."
4041 echo " Please contact qt-info@nokia.com to renew your support"
4042 echo " and upgrades for this license."
4044 echo "NOTICE NOTICE NOTICE NOTICE"
4049 echo "WARNING WARNING WARNING WARNING"
4051 echo " Your support and upgrade period has expired."
4053 echo " You may continue to use your last licensed release"
4054 echo " of Qt under the terms of your existing license"
4055 echo " agreement. But you are not entitled to technical"
4056 echo " support, nor are you entitled to use any more recent"
4057 echo " Qt releases."
4059 echo " Please contact qt-info@nokia.com to renew your"
4060 echo " support and upgrades for this license."
4062 echo "WARNING WARNING WARNING WARNING"
4069 echo "NOTICE NOTICE NOTICE NOTICE"
4071 echo " Your Evaluation license has expired."
4073 echo " You are no longer licensed to use this software. Please"
4074 echo " contact qt-info@nokia.com to purchase license, or install"
4075 echo " the Qt Open Source Edition if you intend to develop free"
4078 echo "NOTICE NOTICE NOTICE NOTICE"
4085 TheLicense
=`head -n 1 "$outpath/LICENSE"`
4087 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4088 echo "You have already accepted the terms of the $TheLicense."
4091 echo "You are licensed to use this software under the terms of"
4092 echo "the $TheLicense."
4094 echo "Type '?' to view the $TheLicense."
4095 echo "Type 'yes' to accept this license offer."
4096 echo "Type 'no' to decline this license offer."
4098 if echo '\c' |
grep '\c' >/dev
/null
; then
4099 echo -n "Do you accept the terms of the $TheLicense? "
4101 echo "Do you accept the terms of the $TheLicense? \c"
4106 if [ "$acceptance" = "yes" ]; then
4108 elif [ "$acceptance" = "no" ]; then
4109 echo "You are not licensed to use this software."
4112 else [ "$acceptance" = "?" ]
4113 more "$outpath/LICENSE"
4118 # this should be moved somewhere else
4121 AIX_VERSION
=`uname -v`
4122 if [ "$AIX_VERSION" -lt "5" ]; then
4123 QMakeVar add QMAKE_LIBS_X11
-lbind
4130 #-------------------------------------------------------------------------------
4131 # generate qconfig.cpp
4132 #-------------------------------------------------------------------------------
4133 [ -d "$outpath/src/corelib/global" ] || mkdir
-p "$outpath/src/corelib/global"
4135 LICENSE_USER_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4136 LICENSE_PRODUCTS_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4137 PREFIX_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4138 DOCUMENTATION_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4139 HEADERS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4140 LIBRARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4141 BINARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4142 PLUGINS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4143 DATA_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4144 TRANSLATIONS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4145 SETTINGS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4146 EXAMPLES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4147 DEMOS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4149 TODAY
=`date +%Y-%m-%d`
4150 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4152 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4153 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4155 /* Installation date */
4156 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4160 if [ ! -z "$QT_HOST_PREFIX" ]; then
4161 HOSTPREFIX_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4162 HOSTDOCUMENTATION_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4163 HOSTHEADERS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4164 HOSTLIBRARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4165 HOSTBINARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4166 HOSTPLUGINS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4167 HOSTDATA_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4168 HOSTTRANSLATIONS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4169 HOSTSETTINGS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4170 HOSTEXAMPLES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4171 HOSTDEMOS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4173 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4175 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4176 /* Installation Info */
4177 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4178 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4179 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4180 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4181 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4182 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4183 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4184 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4185 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4186 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4187 static const char qt_configure_demos_path_str [256 + 12] = "$HOSTDEMOS_PATH_STR";
4188 #else // QT_BOOTSTRAPPED
4192 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4193 /* Installation Info */
4194 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4195 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4196 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4197 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4198 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4199 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4200 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4201 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4202 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4203 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4204 static const char qt_configure_demos_path_str [256 + 12] = "$DEMOS_PATH_STR";
4207 if [ ! -z "$QT_HOST_PREFIX" ]; then
4208 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4209 #endif // QT_BOOTSTRAPPED
4214 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4215 /* strlen( "qt_lcnsxxxx" ) == 12 */
4216 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4217 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4218 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4219 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4220 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4221 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4222 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4223 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4224 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4225 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4226 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4227 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4228 #define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;
4231 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4232 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4233 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4235 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w
"$outpath/src/corelib/global/qconfig.cpp"
4236 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4237 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4240 # -----------------------------------------------------------------------------
4241 if [ "$LicenseType" = "Evaluation" ]; then
4242 EVALKEY
=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4243 elif echo "$D_FLAGS" |
grep QT_EVAL
>/dev
/null
2>&1; then
4244 EVALKEY
=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4247 if [ -n "$EVALKEY" ]; then
4248 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4249 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4250 /* Evaluation license key */
4251 static const char qt_eval_key_data [512 + 12] = "$EVALKEY";
4253 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4257 # -----------------------------------------------------------------------------
4259 # -----------------------------------------------------------------------------
4262 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4264 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS
="$SYNCQT_OPTS -check-includes"
4265 if [ "$OPT_SHADOW" = "yes" ]; then
4266 "$outpath/bin/syncqt" $SYNCQT_OPTS
4267 elif [ "$CFG_DEV" = "yes" ] ||
[ ! -d $relpath/include
]; then
4268 QTDIR
="$relpath" perl
"$outpath/bin/syncqt" $SYNCQT_OPTS
4273 # $2: optional transformation
4274 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4275 # is where the resulting variable is written to
4276 setBootstrapVariable
()
4278 variableRegExp
="^$1[^_A-Z0-9]"
4279 getQMakeConf |
grep "$variableRegExp" |
( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) |
$AWK '
4281 varLength = index($0, "=") - 1
4282 valStart = varLength + 2
4283 if (substr($0, varLength, 1) == "+") {
4284 varLength = varLength - 1
4285 valStart = valStart + 1
4287 var = substr($0, 0, varLength)
4288 gsub("[ \t]+", "", var)
4289 val = substr($0, valStart)
4290 printf "%s_%s = %s\n", var, NR, val
4293 if (length(var) > 0) {
4295 for (i = 1; i <= NR; ++i)
4296 printf " $(%s_%s)", var, i
4303 if true
; then ###[ '!' -f "$outpath/bin/qmake" ];
4304 echo "Creating qmake. Please wait..."
4307 QCONFIG_H
="$outpath/src/corelib/global/qconfig.h"
4308 QMAKE_QCONFIG_H
="${QCONFIG_H}.qmake"
4309 if [ -f "$QCONFIG_H" ]; then
4310 OLD_QCONFIG_H
=$QCONFIG_H
4311 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4314 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4315 # when building qmake, we use #defines for the install paths,
4316 # however they are real functions in the library
4317 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4318 mkdir
-p "$outpath/src/corelib/global"
4319 [ -f "$QCONFIG_H" ] && chmod +w
"$QCONFIG_H"
4320 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4323 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4324 for conf
in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
4325 if [ '!' -f "$conf" ]; then
4326 ln -s "$QCONFIG_H" "$conf"
4330 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4331 rm -f mkspecs
/default
4332 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs
/default
4334 for mkfile
in GNUmakefile Makefile
; do
4337 in_mkfile
="${mkfile}.in"
4338 if [ "$mkfile" = "Makefile" ]; then
4339 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4340 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4342 in_mkfile
="${mkfile}.unix"
4344 in_mkfile
="$relpath/qmake/$in_mkfile"
4345 mkfile
="$outpath/qmake/$mkfile"
4346 if [ -f "$mkfile" ]; then
4347 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags
>/dev
/null
2>&1 && chflags nouchg
"$mkfile"
4350 [ -f "$in_mkfile" ] ||
continue
4352 echo "########################################################################" > "$mkfile"
4353 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4354 echo "########################################################################" >> "$mkfile"
4357 EXTRA_CFLAGS
="\$(QMAKE_CFLAGS)"
4358 EXTRA_CXXFLAGS
="\$(QMAKE_CXXFLAGS)"
4359 EXTRA_LFLAGS
="\$(QMAKE_LFLAGS)"
4361 if [ "$PLATFORM" = "irix-cc" ] ||
[ "$PLATFORM" = "irix-cc-64" ]; then
4362 EXTRA_LFLAGS
="$EXTRA_LFLAGS -lm"
4365 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4366 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4367 if [ "$CFG_SILENT" = "yes" ]; then
4368 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC
's,QMAKE_CC.*=,CC=\@,'
4369 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX
's,QMAKE_CXX.*=,CXX=\@,'
4371 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC
's,QMAKE_CC,CC,'
4372 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX
's,QMAKE_CXX,CXX,'
4374 setBootstrapVariable QMAKE_CFLAGS
4375 setBootstrapVariable QMAKE_CXXFLAGS
's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4376 setBootstrapVariable QMAKE_LFLAGS
4378 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4379 EXTRA_CFLAGS
="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4380 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4382 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4383 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4384 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4385 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4386 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4387 elif [ "$CFG_DEBUG" = "yes" ]; then
4388 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4389 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4390 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4391 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4394 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
4395 setBootstrapVariable QMAKE_RPATH
's,\$\$LITERAL_WHITESPACE, ,'
4396 for rpath
in $RPATH_FLAGS; do
4397 EXTRA_LFLAGS
="\$(QMAKE_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4400 if [ "$PLATFORM_MAC" = "yes" ]; then
4401 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4402 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4403 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4404 EXTRA_LFLAGS
="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4405 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4406 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4407 EXTRA_OBJS
="qsettings_mac.o qcore_mac.o"
4408 EXTRA_SRCS
="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4409 if echo "$CFG_MAC_ARCHS" |
grep x86
> /dev
/null
2>&1; then # matches both x86 and x86_64
4410 X86_CFLAGS
="-arch i386"
4411 X86_LFLAGS
="-arch i386"
4412 EXTRA_CFLAGS
="$X86_CFLAGS $EXTRA_CFLAGS"
4413 EXTRA_CXXFLAGS
="$X86_CFLAGS $EXTRA_CXXFLAGS"
4414 EXTRA_LFLAGS
="$EXTRA_LFLAGS $X86_LFLAGS"
4416 if echo "$CFG_MAC_ARCHS" |
grep ppc
> /dev
/null
2>&1; then # matches both ppc and ppc64
4417 PPC_CFLAGS
="-arch ppc"
4418 PPC_LFLAGS
="-arch ppc"
4419 EXTRA_CFLAGS
="$PPC_CFLAGS $EXTRA_CFLAGS"
4420 EXTRA_CXXFLAGS
="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4421 EXTRA_LFLAGS
="$EXTRA_LFLAGS $PPC_LFLAGS"
4423 if [ '!' -z "$CFG_SDK" ]; then
4424 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4425 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4426 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4427 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4428 EXTRA_LFLAGS
="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4431 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS
="$EXTRA_CFLAGS -DQWS"
4432 if [ '!' -z "$D_FLAGS" ]; then
4433 for DEF
in $D_FLAGS; do
4434 EXTRA_CFLAGS
="$EXTRA_CFLAGS \"-D${DEF}\""
4437 QMAKE_BIN_DIR
="$QT_INSTALL_BINS"
4438 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR
="${QT_INSTALL_PREFIX}/bin"
4439 QMAKE_DATA_DIR
="$QT_INSTALL_DATA"
4440 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR
="${QT_INSTALL_PREFIX}"
4442 adjrelpath
=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4443 adjoutpath
=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4444 adjqmakespec
=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4445 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4446 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4447 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4448 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4449 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4450 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4451 -e "s,@QMAKESPEC@,$adjqmakespec,g" "$in_mkfile" >>"$mkfile"
4453 if "$WHICH" makedepend
>/dev
/null
2>&1 && grep 'depend:' "$mkfile" >/dev
/null
2>&1; then
4454 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend
) >/dev
/null
2>&1
4455 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4456 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4461 QMAKE_BUILD_ERROR
=no
4462 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR
=yes
4463 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4464 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4465 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4468 #-------------------------------------------------------------------------------
4469 # tests that need qmake
4470 #-------------------------------------------------------------------------------
4472 # detect availability of float math.h functions
4473 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/floatmath
"floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4474 CFG_USE_FLOATMATH
=yes
4476 CFG_USE_FLOATMATH
=no
4479 # detect mmx support
4480 if [ "${CFG_MMX}" = "auto" ]; then
4481 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mmx
"mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4488 # detect 3dnow support
4489 if [ "${CFG_3DNOW}" = "auto" ]; then
4490 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/3dnow
"3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4497 # detect sse support
4498 if [ "${CFG_SSE}" = "auto" ]; then
4499 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sse
"sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4506 # detect sse2 support
4507 if [ "${CFG_SSE2}" = "auto" ]; then
4508 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sse2
"sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4515 # check iWMMXt support
4516 if [ "$CFG_IWMMXT" = "yes" ]; then
4517 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/iwmmxt
"iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4518 if [ $?
!= "0" ]; then
4519 echo "The iWMMXt functionality test failed!"
4520 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4525 # detect neon support
4526 if ([ "$CFG_ARCH" = "arm" ] ||
[ "$CFG_ARCH" = "armv6" ]) && [ "${CFG_NEON}" = "auto" ]; then
4527 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
4535 if [ "$CFG_ZLIB" = "no" ]; then
4536 # Note: Qt no longer support builds without zlib
4537 # So we force a "no" to be "auto" here.
4538 # If you REALLY really need no zlib support, you can still disable
4539 # it by doing the following:
4540 # add "no-zlib" to mkspecs/qconfig.pri
4541 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4543 # There's no guarantee that Qt will build under those conditions
4548 if [ "$CFG_ZLIB" = "auto" ]; then
4549 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
4556 # detect how jpeg should be built
4557 if [ "$CFG_JPEG" = "auto" ]; then
4558 if [ "$CFG_SHARED" = "yes" ]; then
4565 if [ "$CFG_LIBJPEG" = "auto" ]; then
4566 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
4573 # detect how gif should be built
4574 if [ "$CFG_GIF" = "auto" ]; then
4575 if [ "$CFG_SHARED" = "yes" ]; then
4582 # detect how tiff should be built
4583 if [ "$CFG_TIFF" = "auto" ]; then
4584 if [ "$CFG_SHARED" = "yes" ]; then
4592 if [ "$CFG_LIBTIFF" = "auto" ]; then
4593 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
4600 # detect how mng should be built
4601 if [ "$CFG_MNG" = "auto" ]; then
4602 if [ "$CFG_SHARED" = "yes" ]; then
4609 if [ "$CFG_LIBMNG" = "auto" ]; then
4610 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
4618 if [ "$CFG_LIBPNG" = "auto" ]; then
4619 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
4626 # detect accessibility
4627 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4628 CFG_ACCESSIBILITY
=yes
4631 # auto-detect SQL-modules support
4632 for _SQLDR
in $CFG_SQL_AVAILABLE; do
4635 if [ "$CFG_SQL_mysql" != "no" ]; then
4636 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG
=`"$WHICH" mysql_config`
4637 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4638 QT_CFLAGS_MYSQL
=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4639 QT_LFLAGS_MYSQL_R
=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4640 QT_LFLAGS_MYSQL
=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4641 QT_MYSQL_VERSION
=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4642 QT_MYSQL_VERSION_MAJOR
=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4644 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4645 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4646 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4647 echo " You need MySql 4 or higher."
4648 echo " If you believe this message is in error you may use the continue"
4649 echo " switch (-continue) to $0 to continue."
4654 QT_LFLAGS_MYSQL_R
=""
4658 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
4659 QMakeVar add CONFIG use_libmysqlclient_r
4660 if [ "$CFG_SQL_mysql" = "auto" ]; then
4661 CFG_SQL_mysql
=plugin
4663 QT_LFLAGS_MYSQL
="$QT_LFLAGS_MYSQL_R"
4664 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
4665 if [ "$CFG_SQL_mysql" = "auto" ]; then
4666 CFG_SQL_mysql
=plugin
4669 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4670 echo "MySQL support cannot be enabled due to functionality tests!"
4671 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4672 echo " If you believe this message is in error you may use the continue"
4673 echo " switch (-continue) to $0 to continue."
4678 QT_LFLAGS_MYSQL_R
=""
4686 if [ "$CFG_SQL_psql" != "no" ]; then
4687 if "$WHICH" pg_config
>/dev
/null
2>&1; then
4688 QT_CFLAGS_PSQL
=`pg_config --includedir 2>/dev/null`
4689 QT_LFLAGS_PSQL
=`pg_config --libdir 2>/dev/null`
4691 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL
="-I$QT_CFLAGS_PSQL"
4692 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL
="-L$QT_LFLAGS_PSQL"
4693 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
4694 if [ "$CFG_SQL_psql" = "auto" ]; then
4698 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4699 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4700 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4701 echo " If you believe this message is in error you may use the continue"
4702 echo " switch (-continue) to $0 to continue."
4713 if [ "$CFG_SQL_odbc" != "no" ]; then
4714 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
4715 if [ "$CFG_SQL_odbc" = "auto" ]; then
4719 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
4720 QT_LFLAGS_ODBC
="-liodbc"
4721 if [ "$CFG_SQL_odbc" = "auto" ]; then
4725 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4726 echo "ODBC support cannot be enabled due to functionality tests!"
4727 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4728 echo " If you believe this message is in error you may use the continue"
4729 echo " switch (-continue) to $0 to continue."
4739 if [ "$CFG_SQL_oci" != "no" ]; then
4740 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
4741 if [ "$CFG_SQL_oci" = "auto" ]; then
4745 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4746 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4747 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4748 echo " If you believe this message is in error you may use the continue"
4749 echo " switch (-continue) to $0 to continue."
4758 if [ "$CFG_SQL_tds" != "no" ]; then
4759 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
4760 if [ "$CFG_SQL_tds" = "auto" ]; then
4764 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4765 echo "TDS support cannot be enabled due to functionality tests!"
4766 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4767 echo " If you believe this message is in error you may use the continue"
4768 echo " switch (-continue) to $0 to continue."
4777 if [ "$CFG_SQL_db2" != "no" ]; then
4778 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
4779 if [ "$CFG_SQL_db2" = "auto" ]; then
4783 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4784 echo "ODBC support cannot be enabled due to functionality tests!"
4785 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4786 echo " If you believe this message is in error you may use the continue"
4787 echo " switch (-continue) to $0 to continue."
4796 if [ "$CFG_SQL_ibase" != "no" ]; then
4797 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
4798 if [ "$CFG_SQL_ibase" = "auto" ]; then
4799 CFG_SQL_ibase
=plugin
4802 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4803 echo "InterBase support cannot be enabled due to functionality tests!"
4804 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4805 echo " If you believe this message is in error you may use the continue"
4806 echo " switch (-continue) to $0 to continue."
4815 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4816 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
4817 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4818 CFG_SQL_sqlite2
=plugin
4821 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4822 echo "SQLite2 support cannot be enabled due to functionality tests!"
4823 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4824 echo " If you believe this message is in error you may use the continue"
4825 echo " switch (-continue) to $0 to continue."
4834 if [ "$CFG_SQL_sqlite" != "no" ]; then
4835 SQLITE_AUTODETECT_FAILED
="no"
4836 if [ "$CFG_SQLITE" = "system" ]; then
4837 if [ -n "$PKG_CONFIG" ]; then
4838 QT_CFLAGS_SQLITE
=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4839 QT_LFLAGS_SQLITE
=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4841 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
4842 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4843 CFG_SQL_sqlite
=plugin
4845 QMAKE_CONFIG
="$QMAKE_CONFIG system-sqlite"
4847 SQLITE_AUTODETECT_FAILED
="yes"
4850 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4851 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4852 CFG_SQL_sqlite
=plugin
4855 SQLITE_AUTODETECT_FAILED
="yes"
4859 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4860 echo "SQLite support cannot be enabled due to functionality tests!"
4861 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4862 echo " If you believe this message is in error you may use the continue"
4863 echo " switch (-continue) to $0 to continue."
4869 if [ "$OPT_VERBOSE" = "yes" ]; then
4870 echo "unknown SQL driver: $_SQLDR"
4876 # auto-detect NIS support
4877 if [ "$CFG_NIS" != "no" ]; then
4878 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
4881 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4882 echo "NIS support cannot be enabled due to functionality tests!"
4883 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4884 echo " If you believe this message is in error you may use the continue"
4885 echo " switch (-continue) to $0 to continue."
4893 # auto-detect CUPS support
4894 if [ "$CFG_CUPS" != "no" ]; then
4895 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
4898 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4899 echo "Cups support cannot be enabled due to functionality tests!"
4900 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4901 echo " If you believe this message is in error you may use the continue"
4902 echo " switch (-continue) to $0 to continue."
4910 # auto-detect iconv(3) support
4911 if [ "$CFG_ICONV" != "no" ]; then
4912 if [ "$PLATFORM_QWS" = "yes" ]; then
4914 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
4916 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
4919 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4920 echo "Iconv support cannot be enabled due to functionality tests!"
4921 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4922 echo " If you believe this message is in error you may use the continue"
4923 echo " switch (-continue) to $0 to continue."
4931 # auto-detect libdbus-1 support
4932 if [ "$CFG_DBUS" != "no" ]; then
4933 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1
2>/dev
/null
; then
4934 QT_CFLAGS_DBUS
=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4935 QT_LIBS_DBUS
=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4937 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
4938 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS
=yes
4939 QMakeVar
set QT_CFLAGS_DBUS
"$QT_CFLAGS_DBUS"
4940 QMakeVar
set QT_LIBS_DBUS
"$QT_LIBS_DBUS"
4942 if [ "$CFG_DBUS" = "auto" ]; then
4944 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4945 # CFG_DBUS is "yes" or "linked" here
4947 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4948 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4949 echo " If you believe this message is in error you may use the continue"
4950 echo " switch (-continue) to $0 to continue."
4956 # Generate a CRC of the namespace for using in constants for the Carbon port.
4957 # This should mean that you really *can* load two Qt's and have our custom
4958 # Carbon events work.
4959 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
4960 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`
4963 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
4965 # detect EGL support
4966 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
4967 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
4969 CFG_EGL_GLES_INCLUDES
=no
4970 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
4971 # EGL specified by QMAKE_*_EGL, included with <GLES/egl.h>
4973 CFG_EGL_GLES_INCLUDES
=yes
4975 if ( [ "$CFG_OPENGL" = "es1" ] ||
[ "$CFG_OPENGL" = "es1cl" ] ||
[ "$CFG_OPENGL" = "es2" ] ) && [ "$CFG_EGL" != "yes" ]; then
4976 echo "The EGL functionality test failed!"
4977 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
4978 echo " You might need to modify the include and library search paths by editing"
4979 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
4980 echo " ${XQMAKESPEC}."
4985 # auto-detect Glib support
4986 if [ "$CFG_GLIB" != "no" ]; then
4987 if [ -n "$PKG_CONFIG" ]; then
4988 QT_CFLAGS_GLIB
=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4989 QT_LIBS_GLIB
=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4991 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
4993 QMakeVar
set QT_CFLAGS_GLIB
"$QT_CFLAGS_GLIB"
4994 QMakeVar
set QT_LIBS_GLIB
"$QT_LIBS_GLIB"
4996 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4997 echo "Glib support cannot be enabled due to functionality tests!"
4998 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4999 echo " If you believe this message is in error you may use the continue"
5000 echo " switch (-continue) to $0 to continue."
5008 if [ "$CFG_PHONON" != "no" ]; then
5009 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5010 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5011 if [ -n "$PKG_CONFIG" ]; then
5012 QT_CFLAGS_GSTREAMER
=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5013 QT_LIBS_GSTREAMER
=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5015 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
5017 QMakeVar
set QT_CFLAGS_GSTREAMER
"$QT_CFLAGS_GSTREAMER"
5018 QMakeVar
set QT_LIBS_GSTREAMER
"$QT_LIBS_GSTREAMER"
5020 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5021 echo "Gstreamer support cannot be enabled due to functionality tests!"
5022 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5023 echo " If you believe this message is in error you may use the continue"
5024 echo " switch (-continue) to $0 to continue."
5030 elif [ "$CFG_GLIB" = "no" ]; then
5034 if [ "$CFG_GSTREAMER" = "yes" ]; then
5037 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5038 echo "Phonon support cannot be enabled due to functionality tests!"
5039 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5040 echo " If you believe this message is in error you may use the continue"
5041 echo " switch (-continue) to $0 to continue."
5054 if [ "$PLATFORM_X11" = "yes" ]; then
5055 x11tests
="$relpath/config.tests/x11"
5058 # work around broken X11 headers when using GCC 2.95 or later
5060 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE
=yes
5061 if [ $NOTYPE = "yes" ]; then
5062 QMakeVar add QMAKE_CXXFLAGS
-fpermissive
5063 X11TESTS_FLAGS
="$X11TESTS_FLAGS -fpermissive"
5066 # Check we actually have X11 :-)
5067 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xlib
"XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5068 if [ $?
!= "0" ]; then
5069 echo "Basic XLib functionality test failed!"
5070 echo " You might need to modify the include and library search paths by editing"
5071 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5075 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5076 if [ "$CFG_OPENGL" = "auto" ] ||
[ "$CFG_OPENGL" = "yes" ]; then
5077 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
5079 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
5081 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
5083 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
5086 if [ "$CFG_OPENGL" = "yes" ]; then
5087 echo "All the OpenGL functionality tests failed!"
5088 echo " You might need to modify the include and library search paths by editing"
5089 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5090 echo " ${XQMAKESPEC}."
5097 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5098 if [ "$CFG_OPENGL" = "desktop" ]; then
5099 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/glxfbconfig
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5100 if [ $?
!= "0" ]; then
5101 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5108 elif [ "$CFG_OPENGL" = "es1cl" ]; then
5109 # OpenGL ES 1.x common lite
5110 "$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
5111 if [ $?
!= "0" ]; then
5112 echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
5113 echo " You might need to modify the include and library search paths by editing"
5114 echo " QMAKE_INCDIR_OPENGL_ES1CL, QMAKE_LIBDIR_OPENGL_ES1CL and QMAKE_LIBS_OPENGL_ES1CL in"
5115 echo " ${XQMAKESPEC}."
5118 elif [ "$CFG_OPENGL" = "es1" ]; then
5120 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1
"OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5121 if [ $?
!= "0" ]; then
5122 echo "The OpenGL ES 1.x functionality test failed!"
5123 echo " You might need to modify the include and library search paths by editing"
5124 echo " QMAKE_INCDIR_OPENGL_ES1, QMAKE_LIBDIR_OPENGL_ES1 and QMAKE_LIBS_OPENGL_ES1 in"
5125 echo " ${XQMAKESPEC}."
5128 elif [ "$CFG_OPENGL" = "es2" ]; then
5130 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles2
"OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5131 if [ $?
!= "0" ]; then
5132 echo "The OpenGL ES 2.0 functionality test failed!"
5133 echo " You might need to modify the include and library search paths by editing"
5134 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5135 echo " ${XQMAKESPEC}."
5138 elif [ "$CFG_OPENGL" = "desktop" ]; then
5139 # Desktop OpenGL support
5140 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/opengl
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5141 if [ $?
!= "0" ]; then
5142 echo "The OpenGL functionality test failed!"
5143 echo " You might need to modify the include and library search paths by editing"
5144 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5145 echo " ${XQMAKESPEC}."
5150 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5151 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/glxfbconfig
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5152 if [ $?
!= "0" ]; then
5153 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5161 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5162 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5163 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5164 CFG_GRAPHICS_SYSTEM
=default
5167 # auto-detect Xcursor support
5168 if [ "$CFG_XCURSOR" != "no" ]; then
5169 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
5170 if [ "$CFG_XCURSOR" != "runtime" ]; then
5174 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5175 echo "Xcursor support cannot be enabled due to functionality tests!"
5176 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5177 echo " If you believe this message is in error you may use the continue"
5178 echo " switch (-continue) to $0 to continue."
5186 # auto-detect Xfixes support
5187 if [ "$CFG_XFIXES" != "no" ]; then
5188 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xfixes
"Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5189 if [ "$CFG_XFIXES" != "runtime" ]; then
5193 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5194 echo "Xfixes support cannot be enabled due to functionality tests!"
5195 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5196 echo " If you believe this message is in error you may use the continue"
5197 echo " switch (-continue) to $0 to continue."
5205 # auto-detect Xrandr support (resize and rotate extension)
5206 if [ "$CFG_XRANDR" != "no" ]; then
5207 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
5208 if [ "$CFG_XRANDR" != "runtime" ]; then
5212 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5213 echo "Xrandr support cannot be enabled due to functionality tests!"
5214 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5215 echo " If you believe this message is in error you may use the continue"
5216 echo " switch (-continue) to $0 to continue."
5224 # auto-detect Xrender support
5225 if [ "$CFG_XRENDER" != "no" ]; then
5226 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
5229 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5230 echo "Xrender support cannot be enabled due to functionality tests!"
5231 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5232 echo " If you believe this message is in error you may use the continue"
5233 echo " switch (-continue) to $0 to continue."
5241 # auto-detect MIT-SHM support
5242 if [ "$CFG_MITSHM" != "no" ]; then
5243 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
5246 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5247 echo "MITSHM support cannot be enabled due to functionality tests!"
5248 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5249 echo " If you believe this message is in error you may use the continue"
5250 echo " switch (-continue) to $0 to continue."
5258 # auto-detect FontConfig support
5259 if [ "$CFG_FONTCONFIG" != "no" ]; then
5260 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig
--exists freetype2
2>/dev
/null
; then
5261 QT_CFLAGS_FONTCONFIG
=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5262 QT_LIBS_FONTCONFIG
=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5264 QT_CFLAGS_FONTCONFIG
=
5265 QT_LIBS_FONTCONFIG
="-lfreetype -lfontconfig"
5267 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
5269 QMakeVar
set QMAKE_CFLAGS_X11
"$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5270 QMakeVar
set QMAKE_LIBS_X11
"$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5271 CFG_LIBFREETYPE
=system
5273 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5274 echo "FontConfig support cannot be enabled due to functionality tests!"
5275 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5276 echo " If you believe this message is in error you may use the continue"
5277 echo " switch (-continue) to $0 to continue."
5285 # auto-detect Session Management support
5286 if [ "$CFG_SM" = "auto" ]; then
5287 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
5290 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5291 echo "Session Management support cannot be enabled due to functionality tests!"
5292 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5293 echo " If you believe this message is in error you may use the continue"
5294 echo " switch (-continue) to $0 to continue."
5302 # auto-detect SHAPE support
5303 if [ "$CFG_XSHAPE" != "no" ]; then
5304 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
5307 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5308 echo "XShape support cannot be enabled due to functionality tests!"
5309 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5310 echo " If you believe this message is in error you may use the continue"
5311 echo " switch (-continue) to $0 to continue."
5319 # auto-detect XSync support
5320 if [ "$CFG_XSYNC" != "no" ]; then
5321 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
5324 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5325 echo "XSync support cannot be enabled due to functionality tests!"
5326 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5327 echo " If you believe this message is in error you may use the continue"
5328 echo " switch (-continue) to $0 to continue."
5336 # auto-detect Xinerama support
5337 if [ "$CFG_XINERAMA" != "no" ]; then
5338 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
5339 if [ "$CFG_XINERAMA" != "runtime" ]; then
5343 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5344 echo "Xinerama support cannot be enabled due to functionality tests!"
5345 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5346 echo " If you believe this message is in error you may use the continue"
5347 echo " switch (-continue) to $0 to continue."
5355 # auto-detect Xinput support
5356 if [ "$CFG_XINPUT" != "no" ]; then
5357 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
5358 if [ "$CFG_XINPUT" != "runtime" ]; then
5362 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5363 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5364 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5365 echo " If you believe this message is in error you may use the continue"
5366 echo " switch (-continue) to $0 to continue."
5374 # auto-detect XKB support
5375 if [ "$CFG_XKB" != "no" ]; then
5376 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
5379 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5380 echo "XKB support cannot be enabled due to functionality tests!"
5381 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5382 echo " If you believe this message is in error you may use the continue"
5383 echo " switch (-continue) to $0 to continue."
5391 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5392 if [ -n "$PKG_CONFIG" ]; then
5393 QT_CFLAGS_QGTKSTYLE
=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5394 QT_LIBS_QGTKSTYLE
=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5396 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5398 QMakeVar
set QT_CFLAGS_QGTKSTYLE
"$QT_CFLAGS_QGTKSTYLE"
5399 QMakeVar
set QT_LIBS_QGTKSTYLE
"$QT_LIBS_QGTKSTYLE"
5401 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5402 echo "Gtk theme support cannot be enabled due to functionality tests!"
5403 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5404 echo " If you believe this message is in error you may use the continue"
5405 echo " switch (-continue) to $0 to continue."
5411 elif [ "$CFG_GLIB" = "no" ]; then
5417 if [ "$PLATFORM_MAC" = "yes" ]; then
5418 if [ "$CFG_PHONON" != "no" ]; then
5419 # Always enable Phonon (unless it was explicitly disabled)
5425 if [ "$PLATFORM_QWS" = "yes" ]; then
5427 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5428 if [ "$CFG_OPENGL" = "yes" ]; then
5429 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
5431 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
5433 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
5436 echo "All the OpenGL ES functionality tests failed!"
5437 echo " You might need to modify the include and library search paths by editing"
5438 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5439 echo " ${XQMAKESPEC}."
5442 elif [ "$CFG_OPENGL" = "es1" ]; then
5444 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1
"OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5445 if [ $?
!= "0" ]; then
5446 echo "The OpenGL ES 1.x functionality test failed!"
5447 echo " You might need to modify the include and library search paths by editing"
5448 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5449 echo " ${XQMAKESPEC}."
5452 elif [ "$CFG_OPENGL" = "es2" ]; then
5454 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles2
"OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5455 if [ $?
!= "0" ]; then
5456 echo "The OpenGL ES 2.0 functionality test failed!"
5457 echo " You might need to modify the include and library search paths by editing"
5458 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5459 echo " ${XQMAKESPEC}."
5462 elif [ "$CFG_OPENGL" = "desktop" ]; then
5463 # Desktop OpenGL support
5464 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5469 for screen
in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5470 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5471 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/ahi
"Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
5472 if [ $?
!= "0" ]; then
5473 echo "The Ahi screen driver functionality test failed!"
5474 echo " You might need to modify the include and library search paths by editing"
5475 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5476 echo " ${XQMAKESPEC}."
5481 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5482 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/svgalib
"SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
5483 if [ $?
!= "0" ]; then
5484 echo "The SVGAlib screen driver functionality test failed!"
5485 echo " You might need to modify the include and library search paths by editing"
5486 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5487 echo " ${XQMAKESPEC}."
5492 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5493 if [ -n "$PKG_CONFIG" ]; then
5494 if $PKG_CONFIG --exists directfb
2>/dev
/null
; then
5495 QT_CFLAGS_DIRECTFB
=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5496 QT_LIBS_DIRECTFB
=`$PKG_CONFIG --libs directfb 2>/dev/null`
5497 elif directfb-config
--version >/dev
/null
2>&1; then
5498 QT_CFLAGS_DIRECTFB
=`directfb-config --cflags 2>/dev/null`
5499 QT_LIBS_DIRECTFB
=`directfb-config --libs 2>/dev/null`
5503 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5504 if [ -n "$QT_CFLAGS_DIRECTFB" ] ||
[ -n "$QT_LIBS_DIRECTFB" ]; then
5505 QMakeVar
set QT_CFLAGS_DIRECTFB
"$QT_CFLAGS_DIRECTFB"
5506 QMakeVar
set QT_LIBS_DIRECTFB
"$QT_LIBS_DIRECTFB"
5508 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5509 QMakeVar
set QT_DEFINES_DIRECTFB
"QT3_SUPPORT"
5512 "$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
5513 if [ $?
!= "0" ]; then
5514 echo "The DirectFB screen driver functionality test failed!"
5515 echo " You might need to modify the include and library search paths by editing"
5516 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5517 echo " ${XQMAKESPEC}."
5525 for mouse
in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5526 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5527 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/tslib
"tslib" $L_FLAGS $I_FLAGS $l_FLAGS
5528 if [ $?
!= "0" ]; then
5529 echo "The tslib functionality test failed!"
5530 echo " You might need to modify the include and library search paths by editing"
5531 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5532 echo " ${XQMAKESPEC}."
5541 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/sound
"sound" $L_FLAGS $I_FLAGS $l_FLAGS
5542 if [ $?
!= "0" ]; then
5543 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SOUND"
5549 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE
="$CFG_QWS_FREETYPE"
5550 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE
=no
5551 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5552 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
5553 CFG_LIBFREETYPE
=system
5559 if [ "$CFG_ENDIAN" = "auto" ]; then
5560 if [ "$PLATFORM_MAC" = "yes" ]; then
5563 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5565 if [ "$F" -eq 0 ]; then
5566 CFG_ENDIAN
="Q_LITTLE_ENDIAN"
5567 elif [ "$F" -eq 1 ]; then
5568 CFG_ENDIAN
="Q_BIG_ENDIAN"
5571 echo "The target system byte order could not be detected!"
5572 echo "Turn on verbose messaging (-v) to see the final report."
5573 echo "You can use the -little-endian or -big-endian switch to"
5574 echo "$0 to continue."
5580 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5581 if [ "$PLATFORM_MAC" = "yes" ]; then
5584 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5586 if [ "$F" -eq 0 ]; then
5587 CFG_HOST_ENDIAN
="Q_LITTLE_ENDIAN"
5588 elif [ "$F" -eq 1 ]; then
5589 CFG_HOST_ENDIAN
="Q_BIG_ENDIAN"
5592 echo "The host system byte order could not be detected!"
5593 echo "Turn on verbose messaging (-v) to see the final report."
5594 echo "You can use the -host-little-endian or -host-big-endian switch to"
5595 echo "$0 to continue."
5601 if [ "$CFG_ARMFPA" != "auto" ]; then
5602 if [ "$CFG_ARMFPA" = "yes" ]; then
5603 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5604 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5606 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5609 CFG_DOUBLEFORMAT
="normal"
5614 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5615 if [ "$PLATFORM_QWS" != "yes" ]; then
5616 CFG_DOUBLEFORMAT
=normal
5618 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5620 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5621 CFG_DOUBLEFORMAT
=normal
5622 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
5623 CFG_DOUBLEFORMAT
=normal
5624 elif [ "$F" -eq 10 ]; then
5625 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE"
5626 elif [ "$F" -eq 11 ]; then
5627 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG"
5628 elif [ "$F" -eq 12 ]; then
5629 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5631 elif [ "$F" -eq 13 ]; then
5632 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5636 echo "The system floating point format could not be detected."
5637 echo "This may cause data to be generated in a wrong format"
5638 echo "Turn on verbose messaging (-v) to see the final report."
5639 # we do not fail on this since this is a new test, and if it fails,
5640 # the old behavior should be correct in most cases
5641 CFG_DOUBLEFORMAT
=normal
5647 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stl
"STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5651 if [ "$CFG_STL" != "no" ]; then
5652 if [ "$HAVE_STL" = "yes" ]; then
5655 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5656 echo "STL support cannot be enabled due to functionality tests!"
5657 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5658 echo " If you believe this message is in error you may use the continue"
5659 echo " switch (-continue) to $0 to continue."
5667 # find if the platform supports IPv6
5668 if [ "$CFG_IPV6" != "no" ]; then
5669 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
5672 if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5673 echo "IPv6 support cannot be enabled due to functionality tests!"
5674 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5675 echo " If you believe this message is in error you may use the continue"
5676 echo " switch (-continue) to $0 to continue."
5684 # detect POSIX clock_gettime()
5685 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5686 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
5687 CFG_CLOCK_GETTIME
=yes
5689 CFG_CLOCK_GETTIME
=no
5693 # detect POSIX monotonic clocks
5694 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5695 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
5696 CFG_CLOCK_MONOTONIC
=yes
5698 CFG_CLOCK_MONOTONIC
=no
5700 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5701 CFG_CLOCK_MONOTONIC
=no
5705 if [ "$CFG_MREMAP" = "auto" ]; then
5706 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mremap
"mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5713 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5714 if [ "$CFG_GETADDRINFO" != "no" ]; then
5715 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getaddrinfo
"getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5718 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5719 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5720 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5721 echo " If you believe this message is in error you may use the continue"
5722 echo " switch (-continue) to $0 to continue."
5730 # find if the platform provides inotify
5731 if [ "$CFG_INOTIFY" != "no" ]; then
5732 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/inotify
"inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5735 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5736 echo "inotify support cannot be enabled due to functionality tests!"
5737 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5738 echo " If you believe this message is in error you may use the continue"
5739 echo " switch (-continue) to $0 to continue."
5747 # find if the platform provides if_nametoindex (ipv6 interface name support)
5748 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5749 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
5752 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5753 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5754 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5755 echo " If you believe this message is in error you may use the continue"
5756 echo " switch (-continue) to $0 to continue."
5764 # find if the platform provides getifaddrs (network interface enumeration)
5765 if [ "$CFG_GETIFADDRS" != "no" ]; then
5766 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getifaddrs
"getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5769 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5770 echo "getifaddrs support cannot be enabled due to functionality tests!"
5771 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5772 echo " If you believe this message is in error you may use the continue"
5773 echo " switch (-continue) to $0 to continue."
5781 # find if the platform supports X/Open Large File compilation environment
5782 if [ "$CFG_LARGEFILE" != "no" ]; then
5783 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
5786 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5787 echo "X/Open Large File support cannot be enabled due to functionality tests!"
5788 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5789 echo " If you believe this message is in error you may use the continue"
5790 echo " switch (-continue) to $0 to continue."
5799 if [ "$CFG_OPENSSL" != "no" ]; then
5800 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
5801 if [ "$CFG_OPENSSL" = "auto" ]; then
5805 if ( [ "$CFG_OPENSSL" = "yes" ] ||
[ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5806 echo "OpenSSL support cannot be enabled due to functionality tests!"
5807 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5808 echo " If you believe this message is in error you may use the continue"
5809 echo " switch (-continue) to $0 to continue."
5817 # detect OpenVG support
5818 if [ "$CFG_OPENVG" != "no" ]; then
5819 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
5820 if [ "$CFG_OPENVG" = "auto" ]; then
5823 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
5824 if [ "$CFG_OPENVG" = "auto" ]; then
5827 CFG_OPENVG_ON_OPENGL
=yes
5828 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
5829 if [ "$CFG_OPENVG" = "auto" ]; then
5832 CFG_OPENVG_LC_INCLUDES
=yes
5833 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
5834 if [ "$CFG_OPENVG" = "auto" ]; then
5837 CFG_OPENVG_LC_INCLUDES
=yes
5838 CFG_OPENVG_ON_OPENGL
=yes
5840 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5841 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5842 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5843 echo " If you believe this message is in error you may use the continue"
5844 echo " switch (-continue) to $0 to continue."
5850 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
5851 CFG_OPENVG_SHIVA
=yes
5855 # if openvg is disabled and the user specified graphicssystem vg, disable it...
5856 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
5857 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
5858 CFG_GRAPHICS_SYSTEM
=default
5861 if [ "$CFG_PTMALLOC" != "no" ]; then
5862 # build ptmalloc, copy .a file to lib/
5863 echo "Building ptmalloc. Please wait..."
5864 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
5865 mkdir
"$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
5867 QMakeVar add QMAKE_LFLAGS
"$outpath/lib/libptmalloc3.a"
5870 if [ "$CFG_ALSA" = "auto" ]; then
5871 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/alsa
"alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5878 if [ -f "$relpath/src/declarative/declarative.pro" ]; then
5879 if [ "$CFG_DECLARATIVE" = "auto" ]; then
5883 if [ "$CFG_DECLARATIVE" = "auto" ] ||
[ "$CFG_DECLARATIVE" = "no" ]; then
5886 echo "Error: Unable to locate the qt-declarative package. Refer to the documentation on how to build the package."
5891 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] ||
[ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5892 if [ "$CFG_ARCH" = "arm" ] ||
[ "$CFG_ARCH" = "armv6" ]; then
5893 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/javascriptcore-jit
"javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5894 if [ $?
!= "0" ]; then
5895 CFG_JAVASCRIPTCORE_JIT
=no
5900 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5901 QMakeVar
set JAVASCRIPTCORE_JIT
yes
5902 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5903 QMakeVar
set JAVASCRIPTCORE_JIT no
5906 #-------------------------------------------------------------------------------
5907 # ask for all that hasn't been auto-detected or specified in the arguments
5908 #-------------------------------------------------------------------------------
5910 ### fix this: user input should be validated in a loop
5911 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PLATFORM_QWS" = "yes" ]; then
5913 echo "Choose pixel-depths to support:"
5915 echo " 1. 1bpp, black/white"
5916 echo " 4. 4bpp, grayscale"
5917 echo " 8. 8bpp, paletted"
5918 echo " 12. 12bpp, rgb 4-4-4"
5919 echo " 15. 15bpp, rgb 5-5-5"
5920 echo " 16. 16bpp, rgb 5-6-5"
5921 echo " 18. 18bpp, rgb 6-6-6"
5922 echo " 24. 24bpp, rgb 8-8-8"
5923 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
5924 echo " all. All supported depths"
5926 echo "Your choices (default 8,16,32):"
5928 if [ -z "$CFG_QWS_DEPTHS" ] ||
[ "$CFG_QWS_DEPTHS" = "yes" ]; then
5929 CFG_QWS_DEPTHS
=8,16,32
5932 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
5933 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
5934 CFG_QWS_DEPTHS
="1 4 8 12 15 16 18 24 32 generic"
5936 for D
in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
5938 1|
4|
8|
12|
15|
16|
18|
24|
32) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
5939 generic
) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
5944 # enable dwarf2 support on Mac
5945 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5946 QT_CONFIG
="$QT_CONFIG dwarf2"
5949 # Set the default arch if there are no "-arch" arguments on the configure line
5950 # For "-carbon" builds: 32 bit x86/ppc.
5951 # For builds on snow leopard : compiler default (64-bit).
5952 # For builds on leopard : compiler default (32-bit).
5953 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
5954 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
5956 if [ "$CFG_MAC_CARBON" = "yes" ]; then
5957 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
5958 CFG_MAC_ARCHS
=" x86"
5959 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
5960 CFG_MAC_ARCHS
=" ppc"
5962 CFG_MAC_ARCHS
=" $QT_MAC_DEFAULT_ARCH"
5965 CFG_MAC_ARCHS
=" $QT_MAC_DEFAULT_ARCH"
5968 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
5971 # enable Cocoa and/or Carbon on Mac
5972 # -carbon on the command line disables Cocoa, except for 64-bit archs
5973 if [ "$CFG_MAC_CARBON" = "yes" ]; then
5974 CFG_MAC_CARBON
="YES"
5977 # check which archs are in use, enable cocoa if we find a 64-bit one
5978 if echo "$CFG_MAC_ARCHS" |
grep 64 > /dev
/null
2>&1; then
5979 CFG_MAC_COCOA
="yes";
5980 CFG_MAC_CARBON
="no";
5981 if echo "$CFG_MAC_ARCHS" |
grep -w ppc
> /dev
/null
2>&1; then
5982 CFG_MAC_CARBON
="yes";
5984 if echo "$CFG_MAC_ARCHS" |
grep -w x86
> /dev
/null
2>&1; then
5985 CFG_MAC_CARBON
="yes";
5990 # select Carbon on 10.4 Tiger.
5991 if [ "$PLATFORM_MAC" = "yes" ]; then
5992 VERSION
=`uname -r | tr '.' ' ' | awk '{print $1}'`
5993 if [ "$VERSION" == 8 ]; then
5995 CFG_MAC_CARBON
="yes";
5999 # set the global Mac deployment target. This is overridden on an arch-by-arch basis
6000 # in some cases, see code further down
6001 case "$PLATFORM,$CFG_MAC_COCOA" in
6004 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.5
6008 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.4
6012 # disable Qt 3 support on VxWorks
6013 case "$XPLATFORM" in
6014 unsupported
/vxworks
*)
6019 # enable Qt 3 support functionality
6020 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
6021 QT_CONFIG
="$QT_CONFIG qt3support"
6025 if [ "$CFG_PHONON" = "yes" ]; then
6026 QT_CONFIG
="$QT_CONFIG phonon"
6027 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6028 QT_CONFIG
="$QT_CONFIG phonon-backend"
6031 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_PHONON"
6034 # disable accessibility
6035 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6036 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6038 QT_CONFIG
="$QT_CONFIG accessibility"
6042 if [ "$CFG_EGL" = "no" ]; then
6043 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_EGL"
6045 QT_CONFIG
="$QT_CONFIG egl"
6046 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6047 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GLES_EGL"
6052 if [ "$CFG_OPENVG" = "no" ]; then
6053 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENVG"
6055 QT_CONFIG
="$QT_CONFIG openvg"
6056 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6057 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6059 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6060 QT_CONFIG
="$QT_CONFIG openvg_on_opengl"
6062 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6063 QT_CONFIG
="$QT_CONFIG shivavg"
6064 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_SHIVAVG"
6069 if [ "$CFG_OPENGL" = "no" ]; then
6070 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENGL"
6072 QT_CONFIG
="$QT_CONFIG opengl"
6075 if [ "$CFG_OPENGL" = "es1" ] ||
[ "$CFG_OPENGL" = "es1cl" ] ||
[ "$CFG_OPENGL" = "es2" ]; then
6076 if [ "$PLATFORM_QWS" = "yes" ]; then
6077 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
6078 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_USE_EGLWINDOWSURFACE"
6080 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES"
6083 if [ "$CFG_OPENGL" = "es1" ]; then
6084 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1"
6085 QT_CONFIG
="$QT_CONFIG opengles1"
6088 if [ "$CFG_OPENGL" = "es1cl" ]; then
6089 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1_CL"
6090 QT_CONFIG
="$QT_CONFIG opengles1cl"
6093 if [ "$CFG_OPENGL" = "es2" ]; then
6094 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6095 QT_CONFIG
="$QT_CONFIG opengles2"
6098 # safe execution environment
6099 if [ "$CFG_SXE" != "no" ]; then
6100 QT_CONFIG
="$QT_CONFIG sxe"
6103 # build up the variables for output
6104 if [ "$CFG_DEBUG" = "yes" ]; then
6105 QMAKE_OUTDIR
="${QMAKE_OUTDIR}debug"
6106 QMAKE_CONFIG
="$QMAKE_CONFIG debug"
6107 elif [ "$CFG_DEBUG" = "no" ]; then
6108 QMAKE_OUTDIR
="${QMAKE_OUTDIR}release"
6109 QMAKE_CONFIG
="$QMAKE_CONFIG release"
6111 if [ "$CFG_SHARED" = "yes" ]; then
6112 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-shared"
6113 QMAKE_CONFIG
="$QMAKE_CONFIG shared dll"
6114 elif [ "$CFG_SHARED" = "no" ]; then
6115 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-static"
6116 QMAKE_CONFIG
="$QMAKE_CONFIG static"
6118 if [ "$PLATFORM_QWS" = "yes" ]; then
6119 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6120 QMAKE_CONFIG
="$QMAKE_CONFIG embedded"
6121 QT_CONFIG
="$QT_CONFIG embedded"
6122 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6124 QMakeVar
set PRECOMPILED_DIR
".pch/$QMAKE_OUTDIR"
6125 QMakeVar
set OBJECTS_DIR
".obj/$QMAKE_OUTDIR"
6126 QMakeVar
set MOC_DIR
".moc/$QMAKE_OUTDIR"
6127 QMakeVar
set RCC_DIR
".rcc/$QMAKE_OUTDIR"
6128 QMakeVar
set UI_DIR
".uic/$QMAKE_OUTDIR"
6129 if [ "$CFG_LARGEFILE" = "yes" ]; then
6130 QMAKE_CONFIG
="$QMAKE_CONFIG largefile"
6132 if [ "$CFG_STL" = "no" ]; then
6133 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STL"
6135 QMAKE_CONFIG
="$QMAKE_CONFIG stl"
6137 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6138 QMAKE_CONFIG
="$QMAKE_CONFIG GNUmake"
6140 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_exports"
6141 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_relocations"
6142 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG precompile_header"
6143 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6144 QMakeVar add QMAKE_CFLAGS
-g
6145 QMakeVar add QMAKE_CXXFLAGS
-g
6146 QMAKE_CONFIG
="$QMAKE_CONFIG separate_debug_info"
6148 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6149 QMAKE_CONFIG
="$QMAKE_CONFIG separate_debug_info_nocopy"
6151 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG mmx"
6152 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG 3dnow"
6153 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse"
6154 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse2"
6155 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG iwmmxt"
6156 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG neon"
6157 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6158 if [ "$CFG_IPV6" = "yes" ]; then
6159 QT_CONFIG
="$QT_CONFIG ipv6"
6161 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6162 QT_CONFIG
="$QT_CONFIG clock-gettime"
6164 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6165 QT_CONFIG
="$QT_CONFIG clock-monotonic"
6167 if [ "$CFG_MREMAP" = "yes" ]; then
6168 QT_CONFIG
="$QT_CONFIG mremap"
6170 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6171 QT_CONFIG
="$QT_CONFIG getaddrinfo"
6173 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6174 QT_CONFIG
="$QT_CONFIG ipv6ifname"
6176 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6177 QT_CONFIG
="$QT_CONFIG getifaddrs"
6179 if [ "$CFG_INOTIFY" = "yes" ]; then
6180 QT_CONFIG
="$QT_CONFIG inotify"
6182 if [ "$CFG_LIBJPEG" = "no" ]; then
6184 elif [ "$CFG_LIBJPEG" = "system" ]; then
6185 QT_CONFIG
="$QT_CONFIG system-jpeg"
6187 if [ "$CFG_JPEG" = "no" ]; then
6188 QT_CONFIG
="$QT_CONFIG no-jpeg"
6189 elif [ "$CFG_JPEG" = "yes" ]; then
6190 QT_CONFIG
="$QT_CONFIG jpeg"
6192 if [ "$CFG_LIBMNG" = "no" ]; then
6194 elif [ "$CFG_LIBMNG" = "system" ]; then
6195 QT_CONFIG
="$QT_CONFIG system-mng"
6197 if [ "$CFG_MNG" = "no" ]; then
6198 QT_CONFIG
="$QT_CONFIG no-mng"
6199 elif [ "$CFG_MNG" = "yes" ]; then
6200 QT_CONFIG
="$QT_CONFIG mng"
6202 if [ "$CFG_LIBPNG" = "no" ]; then
6205 if [ "$CFG_LIBPNG" = "system" ]; then
6206 QT_CONFIG
="$QT_CONFIG system-png"
6208 if [ "$CFG_PNG" = "no" ]; then
6209 QT_CONFIG
="$QT_CONFIG no-png"
6210 elif [ "$CFG_PNG" = "yes" ]; then
6211 QT_CONFIG
="$QT_CONFIG png"
6213 if [ "$CFG_GIF" = "no" ]; then
6214 QT_CONFIG
="$QT_CONFIG no-gif"
6215 elif [ "$CFG_GIF" = "yes" ]; then
6216 QT_CONFIG
="$QT_CONFIG gif"
6218 if [ "$CFG_LIBTIFF" = "no" ]; then
6220 elif [ "$CFG_LIBTIFF" = "system" ]; then
6221 QT_CONFIG
="$QT_CONFIG system-tiff"
6223 if [ "$CFG_TIFF" = "no" ]; then
6224 QT_CONFIG
="$QT_CONFIG no-tiff"
6225 elif [ "$CFG_TIFF" = "yes" ]; then
6226 QT_CONFIG
="$QT_CONFIG tiff"
6228 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6229 QT_CONFIG
="$QT_CONFIG no-freetype"
6230 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6231 QT_CONFIG
="$QT_CONFIG system-freetype"
6233 QT_CONFIG
="$QT_CONFIG freetype"
6236 if [ "x$PLATFORM_MAC" = "xyes" ]; then
6237 #On Mac we implicitly link against libz, so we
6238 #never use the 3rdparty stuff.
6239 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB
="system"
6241 if [ "$CFG_ZLIB" = "yes" ]; then
6242 QT_CONFIG
="$QT_CONFIG zlib"
6243 elif [ "$CFG_ZLIB" = "system" ]; then
6244 QT_CONFIG
="$QT_CONFIG system-zlib"
6247 [ "$CFG_NIS" = "yes" ] && QT_CONFIG
="$QT_CONFIG nis"
6248 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG
="$QT_CONFIG cups"
6249 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG
="$QT_CONFIG iconv"
6250 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG
="$QT_CONFIG gnu-libiconv"
6251 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG
="$QT_CONFIG glib"
6252 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG
="$QT_CONFIG gstreamer"
6253 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG
="$QT_CONFIG dbus"
6254 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG
="$QT_CONFIG dbus dbus-linked"
6255 [ "$CFG_NAS" = "system" ] && QT_CONFIG
="$QT_CONFIG nas"
6256 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG
="$QT_CONFIG openssl"
6257 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG
="$QT_CONFIG openssl-linked"
6259 if [ "$PLATFORM_X11" = "yes" ]; then
6260 [ "$CFG_SM" = "yes" ] && QT_CONFIG
="$QT_CONFIG x11sm"
6262 # for some reason, the following libraries are not always built shared,
6263 # so *every* program/lib (including Qt) has to link against them
6264 if [ "$CFG_XSHAPE" = "yes" ]; then
6265 QT_CONFIG
="$QT_CONFIG xshape"
6267 if [ "$CFG_XSYNC" = "yes" ]; then
6268 QT_CONFIG
="$QT_CONFIG xsync"
6270 if [ "$CFG_XINERAMA" = "yes" ]; then
6271 QT_CONFIG
="$QT_CONFIG xinerama"
6272 QMakeVar
set QMAKE_LIBS_X11
'-lXinerama $$QMAKE_LIBS_X11'
6274 if [ "$CFG_XCURSOR" = "yes" ]; then
6275 QT_CONFIG
="$QT_CONFIG xcursor"
6276 QMakeVar
set QMAKE_LIBS_X11
'-lXcursor $$QMAKE_LIBS_X11'
6278 if [ "$CFG_XFIXES" = "yes" ]; then
6279 QT_CONFIG
="$QT_CONFIG xfixes"
6280 QMakeVar
set QMAKE_LIBS_X11
'-lXfixes $$QMAKE_LIBS_X11'
6282 if [ "$CFG_XRANDR" = "yes" ]; then
6283 QT_CONFIG
="$QT_CONFIG xrandr"
6284 if [ "$CFG_XRENDER" != "yes" ]; then
6285 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6286 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr -lXrender $$QMAKE_LIBS_X11'
6288 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr $$QMAKE_LIBS_X11'
6291 if [ "$CFG_XRENDER" = "yes" ]; then
6292 QT_CONFIG
="$QT_CONFIG xrender"
6293 QMakeVar
set QMAKE_LIBS_X11
'-lXrender $$QMAKE_LIBS_X11'
6295 if [ "$CFG_MITSHM" = "yes" ]; then
6296 QT_CONFIG
="$QT_CONFIG mitshm"
6298 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6299 QT_CONFIG
="$QT_CONFIG fontconfig"
6301 if [ "$CFG_XINPUT" = "yes" ]; then
6302 QMakeVar
set QMAKE_LIBS_X11
'-lXi $$QMAKE_LIBS_X11'
6304 if [ "$CFG_XINPUT" = "yes" ]; then
6305 QT_CONFIG
="$QT_CONFIG xinput tablet"
6307 if [ "$CFG_XKB" = "yes" ]; then
6308 QT_CONFIG
="$QT_CONFIG xkb"
6312 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES
"$D_FLAGS"
6313 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS
"$L_FLAGS"
6314 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS
"$l_FLAGS"
6316 if [ "$PLATFORM_MAC" = "yes" ]; then
6317 if [ "$CFG_RPATH" = "yes" ]; then
6318 QMAKE_CONFIG
="$QMAKE_CONFIG absolute_library_soname"
6320 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
6321 if [ -n "$RPATH_FLAGS" ]; then
6323 echo "ERROR: -R cannot be used on this platform as \$QMAKE_RPATH is"
6327 elif [ "$CFG_RPATH" = "yes" ]; then
6328 RPATH_MESSAGE
=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6332 if [ "$CFG_RPATH" = "yes" ]; then
6333 # set the default rpath to the library installation directory
6334 RPATH_FLAGS
="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6336 if [ -n "$RPATH_FLAGS" ]; then
6337 # add the user defined rpaths
6338 QMakeVar add QMAKE_RPATHDIR
"$RPATH_FLAGS"
6342 if [ '!' -z "$I_FLAGS" ]; then
6343 # add the user define include paths
6344 QMakeVar add QMAKE_CFLAGS
"$I_FLAGS"
6345 QMakeVar add QMAKE_CXXFLAGS
"$I_FLAGS"
6348 # turn off exceptions for the compilers that support it
6349 if [ "$PLATFORM_QWS" = "yes" ]; then
6350 COMPILER
=`echo $XPLATFORM | cut -f 3- -d-`
6352 COMPILER
=`echo $PLATFORM | cut -f 2- -d-`
6354 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6358 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6359 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG exceptions"
6362 if [ "$CFG_ALSA" = "yes" ]; then
6363 QT_CONFIG
="$QT_CONFIG alsa"
6367 # Some Qt modules are too advanced in C++ for some old compilers
6368 # Detect here the platforms where they are known to work.
6370 # See Qt documentation for more information on which features are
6371 # supported and on which compilers.
6373 canBuildQtXmlPatterns
="yes"
6374 canBuildWebKit
="$HAVE_STL"
6375 canBuildQtConcurrent
="yes"
6377 # WebKit requires stdint.h
6378 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stdint
"Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
6379 if [ $?
!= "0" ]; then
6383 case "$XPLATFORM" in
6385 # PA-RISC's assembly is too limited
6386 # gcc 3.4 on that platform can't build QtXmlPatterns
6387 # the assembly it generates cannot be compiled
6389 # Check gcc's version
6390 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6394 canBuildQtXmlPatterns
="no"
6398 canBuildQtXmlPatterns
="no"
6402 unsupported
/vxworks-
*-g++*)
6405 unsupported
/vxworks-
*-dcc*)
6407 canBuildQtXmlPatterns
="no"
6410 # Check gcc's version
6411 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6419 canBuildQtXmlPatterns
="no"
6424 # Check the compiler version
6425 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6428 canBuildQtXmlPatterns
="no"
6429 canBuildQtConcurrent
="no"
6433 canBuildQtConcurrent
="no"
6439 canBuildQtXmlPatterns
="no"
6440 canBuildQtConcurrent
="no"
6446 # Get the xlC version
6447 cat > xlcver.c
<<EOF
6451 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6456 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c
>/dev
/null
2>/dev
/null
; then
6457 xlcver
=`./xlcver 2>/dev/null`
6460 if [ "$OPT_VERBOSE" = "yes" ]; then
6461 if [ -n "$xlcver" ]; then
6462 echo Found IBM xlC version
: $xlcver.
6464 echo Could not determine IBM xlC version
, assuming oldest supported.
6471 canBuildQtXmlPatterns
="no"
6472 canBuildQtConcurrent
="no"
6476 canBuildQtConcurrent
="no"
6482 canBuildQtConcurrent
="no"
6486 CFG_CONCURRENT
="yes"
6487 if [ "$canBuildQtConcurrent" = "no" ]; then
6488 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6492 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
6493 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
6496 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
6497 CFG_XMLPATTERNS
="$canBuildQtXmlPatterns"
6498 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
6499 CFG_XMLPATTERNS
="no"
6501 if [ "$CFG_XMLPATTERNS" = "yes" ]; then
6502 QT_CONFIG
="$QT_CONFIG xmlpatterns"
6504 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
6507 if [ "$CFG_MULTIMEDIA" = "no" ]; then
6508 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
6510 QT_CONFIG
="$QT_CONFIG multimedia"
6513 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6514 QT_CONFIG
="$QT_CONFIG audio-backend"
6517 if [ "$CFG_SVG" = "yes" ]; then
6518 QT_CONFIG
="$QT_CONFIG svg"
6520 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SVG"
6523 if [ "$CFG_DECLARATIVE" = "yes" ]; then
6524 QT_CONFIG
="$QT_CONFIG declarative"
6526 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
6529 if [ "$CFG_WEBKIT" = "auto" ]; then
6530 CFG_WEBKIT
="$canBuildWebKit"
6533 if [ "$CFG_WEBKIT" = "yes" ]; then
6534 QT_CONFIG
="$QT_CONFIG webkit"
6535 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
6539 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_WEBKIT"
6542 if [ "$CFG_SCRIPT" = "auto" ]; then
6546 if [ "$CFG_SCRIPT" = "yes" ]; then
6547 QT_CONFIG
="$QT_CONFIG script"
6549 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SCRIPT"
6552 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
6553 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
6556 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
6557 CFG_SCRIPTTOOLS
="yes"
6558 elif [ "$CFG_SCRIPT" = "no" ]; then
6559 CFG_SCRIPTTOOLS
="no"
6562 if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
6563 QT_CONFIG
="$QT_CONFIG scripttools"
6565 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
6568 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6571 QMakeVar add QMAKE_CFLAGS
-fno-exceptions
6572 QMakeVar add QMAKE_CXXFLAGS
-fno-exceptions
6573 QMakeVar add QMAKE_LFLAGS
-fno-exceptions
6578 QMakeVar add QMAKE_CFLAGS
-LANG:exceptions
=off
6579 QMakeVar add QMAKE_CXXFLAGS
-LANG:exceptions
=off
6580 QMakeVar add QMAKE_LFLAGS
-LANG:exceptions
=off
6587 QMAKE_CONFIG
="$QMAKE_CONFIG exceptions_off"
6590 # On Mac, set the minimum deployment target for the different architechtures
6591 # using the Xarch compiler option when supported (10.5 and up). On 10.4 the
6592 # deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
6594 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
6595 if echo "$CFG_MAC_ARCHS" |
grep '\<x86\>' > /dev
/null
2>&1; then
6596 QMakeVar add QMAKE_CFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6597 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6598 QMakeVar add QMAKE_LFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6599 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86
"-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
6601 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc\>' > /dev
/null
2>&1; then
6602 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc -mmacosx-version-min=10.4"
6603 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc -mmacosx-version-min=10.4"
6604 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc -mmacosx-version-min=10.4"
6605 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC
"-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
6607 if echo "$CFG_MAC_ARCHS" |
grep '\<x86_64\>' > /dev
/null
2>&1; then
6608 QMakeVar add QMAKE_CFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6609 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6610 QMakeVar add QMAKE_LFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6611 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64
"-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
6613 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc64\>' > /dev
/null
2>&1; then
6614 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6615 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6616 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6617 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64
"-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
6621 #-------------------------------------------------------------------------------
6622 # generate QT_BUILD_KEY
6623 #-------------------------------------------------------------------------------
6625 # some compilers generate binary incompatible code between different versions,
6626 # so we need to generate a build key that is different between these compilers
6630 COMPILER_VERSION
=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6632 case "$COMPILER_VERSION" in
6634 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6635 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6636 QT_GCC_PATCH_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6639 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6640 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6641 QT_GCC_PATCH_VERSION
=0
6645 case "$COMPILER_VERSION" in
6647 COMPILER_VERSION
="2.95.*"
6650 COMPILER_VERSION
="3.*"
6653 COMPILER_VERSION
="4"
6658 [ '!' -z "$COMPILER_VERSION" ] && COMPILER
="g++-${COMPILER_VERSION}"
6665 # QT_CONFIG can contain the following:
6667 # Things that affect the Qt API/ABI:
6670 # minimal-config small-config medium-config large-config full-config
6672 # Different edition modules:
6673 # network canvas table xml opengl sql
6675 # Things that do not affect the Qt API/ABI:
6677 # system-jpeg no-jpeg jpeg
6678 # system-mng no-mng mng
6679 # system-png no-png png
6680 # system-zlib no-zlib zlib
6681 # system-libtiff no-libtiff
6694 # X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb
6695 # Embedded: embedded freetype
6701 # determine the build options
6702 for config_option
in $QMAKE_CONFIG $QT_CONFIG; do
6704 case "$config_option" in
6706 # take the last *-config setting. this is the highest config being used,
6707 # and is the one that we will use for tagging plugins
6708 BUILD_CONFIG
="$config_option"
6711 *) # skip all other options since they don't affect the Qt API/ABI.
6715 if [ "$SKIP" = "no" ]; then
6716 BUILD_OPTIONS
="$BUILD_OPTIONS $config_option"
6720 # put the options that we are missing into .options
6722 for opt
in `echo $ALL_OPTIONS`; do
6724 if echo $BUILD_OPTIONS |
grep $opt >/dev
/null
2>&1; then
6727 if [ "$SKIP" = "no" ]; then
6728 echo "$opt" >> .options
6732 # reconstruct BUILD_OPTIONS with a sorted negative feature list
6733 # (ie. only things that are missing are will be put into the build key)
6735 if [ -f .options
]; then
6736 for opt
in `sort -f .options | uniq`; do
6737 BUILD_OPTIONS
="$BUILD_OPTIONS no-$opt"
6742 # QT_NO* defines affect the Qt API (and binary compatibility). they need
6743 # to be included in the build key
6744 for build_option
in $D_FLAGS; do
6745 build_option
=`echo $build_option | cut -d \" -f 2 -`
6746 case "$build_option" in
6748 echo "$build_option" >> .options
6751 # skip all other compiler defines
6756 # sort the compile time defines (helps ensure that changes in this configure
6757 # script don't affect the QT_BUILD_KEY generation)
6758 if [ -f .options
]; then
6759 for opt
in `sort -f .options | uniq`; do
6760 BUILD_OPTIONS
="$BUILD_OPTIONS $opt"
6765 BUILD_OPTIONS
="$BUILD_CONFIG $BUILD_OPTIONS"
6766 # extract the operating system from the XPLATFORM
6767 TARGET_OPERATING_SYSTEM
=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
6769 # when cross-compiling, don't include build-host information (build key is target specific)
6770 QT_BUILD_KEY
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6771 if [ -n "$QT_NAMESPACE" ]; then
6772 QT_BUILD_KEY
="$QT_BUILD_KEY $QT_NAMESPACE"
6774 MAC_NEED_TWO_BUILD_KEYS
="no"
6775 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
6776 QT_BUILD_KEY_CARBON
=$QT_BUILD_KEY
6777 TARGET_OPERATING_SYSTEM
="$TARGET_OPERATING_SYSTEM-cocoa"
6778 QT_BUILD_KEY_COCOA
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6779 if [ "$CFG_MAC_CARBON" = "no" ]; then
6780 QT_BUILD_KEY
=$QT_BUILD_KEY_COCOA
6782 MAC_NEED_TWO_BUILD_KEYS
="yes"
6785 # don't break loading plugins build with an older version of Qt
6786 QT_BUILD_KEY_COMPAT
=
6787 if [ "$QT_CROSS_COMPILE" = "no" ]; then
6788 # previous versions of Qt used a build key built from the uname
6789 QT_BUILD_KEY_COMPAT
="$CFG_USER_BUILD_KEY $UNAME_MACHINE $UNAME_SYSTEM $COMPILER $BUILD_OPTIONS"
6790 if [ -n "$QT_NAMESPACE" ]; then
6791 QT_BUILD_KEY_COMPAT
="$QT_BUILD_KEY_COMPAT $QT_NAMESPACE"
6794 # strip out leading/trailing/extra whitespace
6795 QT_BUILD_KEY
=`echo $QT_BUILD_KEY | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6796 QT_BUILD_KEY_COMPAT
=`echo $QT_BUILD_KEY_COMPAT | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6798 #-------------------------------------------------------------------------------
6799 # part of configuration information goes into qconfig.h
6800 #-------------------------------------------------------------------------------
6802 case "$CFG_QCONFIG" in
6804 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6807 tmpconfig
="$outpath/src/corelib/global/qconfig.h.new"
6808 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6809 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6810 echo "#endif" >>"$tmpconfig"
6814 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6818 # define QT_EDITION $QT_EDITION
6821 /* Machine byte-order */
6822 #define Q_BIG_ENDIAN 4321
6823 #define Q_LITTLE_ENDIAN 1234
6826 if [ "$MAC_NEED_TWO_BUILD_KEYS" = "no" ]; then
6827 echo "#define QT_BUILD_KEY \"$QT_BUILD_KEY\"" \
6828 >> "$outpath/src/corelib/global/qconfig.h.new"
6830 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6832 #define QT_BUILD_KEY_CARBON "$QT_BUILD_KEY_CARBON"
6833 #define QT_BUILD_KEY_COCOA "$QT_BUILD_KEY_COCOA"
6837 if [ -n "$QT_BUILD_KEY_COMPAT" ]; then
6838 echo "#define QT_BUILD_KEY_COMPAT \"$QT_BUILD_KEY_COMPAT\"" \
6839 >> "$outpath/src/corelib/global/qconfig.h.new"
6841 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6843 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6844 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6845 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6846 #if defined(__BIG_ENDIAN__)
6847 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6848 #elif defined(__LITTLE_ENDIAN__)
6849 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6851 # error "Unable to determine byte order!"
6855 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6857 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6858 if [ "$CFG_ENDIAN" = "auto" ]; then
6859 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6860 #if defined(__BIG_ENDIAN__)
6861 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6862 #elif defined(__LITTLE_ENDIAN__)
6863 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6865 # error "Unable to determine byte order!"
6869 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6871 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6873 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6874 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6875 /* Non-IEEE double format */
6876 #define Q_DOUBLE_LITTLE "01234567"
6877 #define Q_DOUBLE_BIG "76543210"
6878 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6879 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6880 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6883 if [ "$CFG_ARMFPA" = "yes" ]; then
6884 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6885 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6886 #ifndef QT_BOOTSTRAPPED
6891 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6895 CFG_ARCH_STR
=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6896 CFG_HOST_ARCH_STR
=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6897 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6898 /* Machine Architecture */
6899 #ifndef QT_BOOTSTRAPPED
6900 # define QT_ARCH_${CFG_ARCH_STR}
6902 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6906 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6907 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6909 if [ "$CFG_LARGEFILE" = "yes" ]; then
6910 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6913 # if both carbon and cocoa are specified, enable the autodetection code.
6914 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
6915 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6916 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
6917 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6920 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6921 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6924 if [ "$PLATFORM_MAC" = "yes" ]; then
6925 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6926 #if defined(__LP64__)
6927 # define QT_POINTER_SIZE 8
6929 # define QT_POINTER_SIZE 4
6933 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6934 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6938 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6940 if [ "$CFG_DEV" = "yes" ]; then
6941 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6944 # Embedded compile time options
6945 if [ "$PLATFORM_QWS" = "yes" ]; then
6946 # Add QWS to config.h
6947 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_WS_QWS"
6949 # Add excluded decorations to $QCONFIG_FLAGS
6950 decors
=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
6951 for decor
in $decors; do
6952 NODECORATION
=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6953 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
6956 # Figure which embedded drivers which are turned off
6957 CFG_GFX_OFF
="$CFG_GFX_AVAILABLE"
6958 for ADRIVER
in $CFG_GFX_ON; do
6959 CFG_GFX_OFF
=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
6962 CFG_KBD_OFF
="$CFG_KBD_AVAILABLE"
6963 # the um driver is currently not in the available list for external builds
6964 if [ "$CFG_DEV" = "no" ]; then
6965 CFG_KBD_OFF
="$CFG_KBD_OFF um"
6967 for ADRIVER
in $CFG_KBD_ON; do
6968 CFG_KBD_OFF
=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
6971 CFG_MOUSE_OFF
="$CFG_MOUSE_AVAILABLE"
6972 for ADRIVER
in $CFG_MOUSE_ON; do
6973 CFG_MOUSE_OFF
=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
6976 for DRIVER
in $CFG_GFX_OFF; do
6977 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6978 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
6981 for DRIVER
in $CFG_KBD_OFF; do
6982 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6983 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
6986 for DRIVER
in $CFG_MOUSE_OFF; do
6987 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6988 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
6992 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6993 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6996 # Add turned on SQL drivers
6997 for DRIVER
in $CFG_SQL_AVAILABLE; do
6998 eval "VAL=\$CFG_SQL_$DRIVER"
7001 ONDRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7002 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7003 SQL_DRIVERS
="$SQL_DRIVERS $DRIVER"
7006 SQL_PLUGINS
="$SQL_PLUGINS $DRIVER"
7012 QMakeVar
set sql-drivers
"$SQL_DRIVERS"
7013 QMakeVar
set sql-plugins
"$SQL_PLUGINS"
7015 # Add other configuration options to the qconfig.h file
7016 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7017 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7018 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7019 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7020 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7021 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ZLIB"
7022 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7023 [ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6"
7024 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SXE"
7025 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_DBUS"
7027 if [ "$PLATFORM_QWS" != "yes" ]; then
7028 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
7029 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
7030 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
7033 # X11/Unix/Mac only configs
7034 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CUPS"
7035 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ICONV"
7036 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GLIB"
7037 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7038 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7039 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7040 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MREMAP"
7041 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7042 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7043 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7044 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_INOTIFY"
7045 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NAS"
7046 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NIS"
7047 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENSSL"
7048 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7050 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7051 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XCURSOR"
7052 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XFIXES"
7053 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7054 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINERAMA"
7055 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XKB"
7056 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRANDR"
7057 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRENDER"
7058 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MITSHM"
7059 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SHAPE"
7060 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XSYNC"
7061 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7063 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7064 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7065 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7066 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7067 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7068 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ALSA"
7070 # sort QCONFIG_FLAGS for neatness if we can
7071 [ '!' -z "$AWK" ] && QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7072 QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS`
7074 if [ -n "$QCONFIG_FLAGS" ]; then
7075 for cfg
in $QCONFIG_FLAGS; do
7076 cfgd
=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7077 cfg
=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7078 # figure out define logic, so we can output the correct
7079 # ifdefs to override the global defines in a project
7081 if [ true
] && echo "$cfgd" |
grep 'QT_NO_' >/dev
/null
2>&1; then
7082 # QT_NO_option can be forcefully turned on by QT_option
7083 cfgdNeg
=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7084 elif [ true
] && echo "$cfgd" |
grep 'QT_' >/dev
/null
2>&1; then
7085 # QT_option can be forcefully turned off by QT_NO_option
7086 cfgdNeg
=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7089 if [ -z $cfgdNeg ]; then
7090 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7097 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7098 #if defined($cfgd) && defined($cfgdNeg)
7100 #elif !defined($cfgd) && !defined($cfgdNeg)
7109 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7110 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7111 #define QT_VISIBILITY_AVAILABLE
7116 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7117 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7118 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7120 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w
"$outpath/src/corelib/global/qconfig.h"
7121 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7122 chmod -w "$outpath/src/corelib/global/qconfig.h"
7123 for conf
in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7124 if [ '!' -f "$conf" ]; then
7125 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7130 #-------------------------------------------------------------------------------
7131 # save configuration into qconfig.pri
7132 #-------------------------------------------------------------------------------
7134 QTCONFIG
="$outpath/mkspecs/qconfig.pri"
7135 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG no_mocdepend"
7136 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7137 if [ "$CFG_DEBUG" = "yes" ]; then
7138 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG debug"
7139 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7140 QT_CONFIG
="$QT_CONFIG release"
7142 QT_CONFIG
="$QT_CONFIG debug"
7143 elif [ "$CFG_DEBUG" = "no" ]; then
7144 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG release"
7145 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7146 QT_CONFIG
="$QT_CONFIG debug"
7148 QT_CONFIG
="$QT_CONFIG release"
7150 if [ "$CFG_STL" = "yes" ]; then
7151 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG stl"
7153 if [ "$CFG_FRAMEWORK" = "no" ]; then
7154 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_no_framework"
7156 QT_CONFIG
="$QT_CONFIG qt_framework"
7157 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_framework"
7159 if [ "$PLATFORM_MAC" = "yes" ]; then
7160 QT_CONFIG
="$QT_CONFIG $CFG_MAC_ARCHS"
7162 if [ "$CFG_DEV" = "yes" ]; then
7163 QT_CONFIG
="$QT_CONFIG private_tests"
7166 # Make the application arch follow the Qt arch for single arch builds.
7167 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7168 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7169 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7172 cat >>"$QTCONFIG.tmp" <<EOF
7174 CONFIG += $QTCONFIG_CONFIG
7176 QT_EDITION = $Edition
7177 QT_CONFIG += $QT_CONFIG
7180 QT_VERSION = $QT_VERSION
7181 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7182 QT_MINOR_VERSION = $QT_MINOR_VERSION
7183 QT_PATCH_VERSION = $QT_PATCH_VERSION
7186 QT_LIBINFIX = $QT_LIBINFIX
7187 QT_NAMESPACE = $QT_NAMESPACE
7188 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7191 if [ "$CFG_RPATH" = "yes" ]; then
7192 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7194 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7195 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7196 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7197 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7199 # replace qconfig.pri if it differs from the newly created temp file
7200 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7201 rm -f "$QTCONFIG.tmp"
7203 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7206 #-------------------------------------------------------------------------------
7207 # save configuration into .qmake.cache
7208 #-------------------------------------------------------------------------------
7210 CACHEFILE
="$outpath/.qmake.cache"
7211 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7212 cat >>"$CACHEFILE.tmp" <<EOF
7213 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
7214 QT_SOURCE_TREE = \$\$quote($relpath)
7215 QT_BUILD_TREE = \$\$quote($outpath)
7216 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7217 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7218 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7220 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7221 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7222 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7223 QMAKE_UIC3 = \$\$QT_BUILD_TREE/bin/uic3
7224 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7225 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
7226 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7227 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7231 # Ensure we can link to uninistalled libraries
7232 if linkerSupportsFlag
-rpath-link "$outpath/lib"; then
7233 echo "QMAKE_LFLAGS += -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp"
7236 if [ -n "$QT_CFLAGS_PSQL" ]; then
7237 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp"
7239 if [ -n "$QT_LFLAGS_PSQL" ]; then
7240 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$CACHEFILE.tmp"
7242 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7243 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7245 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7246 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7248 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7249 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7251 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7252 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7254 if [ -n "$QT_LFLAGS_ODBC" ]; then
7255 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$CACHEFILE.tmp"
7258 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7259 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
7262 #dump in the OPENSSL_LIBS info
7263 if [ '!' -z "$OPENSSL_LIBS" ]; then
7264 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp"
7265 elif [ "$CFG_OPENSSL" = "linked" ]; then
7266 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$CACHEFILE.tmp"
7269 #dump in the SDK info
7270 if [ '!' -z "$CFG_SDK" ]; then
7271 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$CACHEFILE.tmp"
7274 # mac gcc -Xarch support
7275 if [ "$CFG_MAC_XARCH" = "no" ]; then
7276 echo "QMAKE_MAC_XARCH = no" >> "$CACHEFILE.tmp"
7279 #dump the qmake spec
7280 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7281 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7283 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7287 cat "$QMAKE_VARS_FILE" >> "$CACHEFILE.tmp"
7288 rm -f "$QMAKE_VARS_FILE" 2>/dev
/null
7292 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4
>/dev
/null
2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL
="yes"
7293 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7294 find "$relpath" -perm u
+w
-mtime -3 |
grep 'cpp$' |
while read f
; do
7295 # don't need to worry about generated files
7296 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7297 basename "$f" |
grep '^moc_' >/dev
/null
2>&1 && continue
7299 INCREMENTAL
="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7301 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7302 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7305 # replace .qmake.cache if it differs from the newly created temp file
7306 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7307 rm -f "$CACHEFILE.tmp"
7309 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7312 #-------------------------------------------------------------------------------
7313 # give feedback on configuration
7314 #-------------------------------------------------------------------------------
7318 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7321 This target is using the GNU C++ compiler ($PLATFORM).
7323 Recent versions of this compiler automatically include code for
7324 exceptions, which increase both the size of the Qt libraries and
7325 the amount of memory taken by your applications.
7327 You may choose to re-run `basename $0` with the -no-exceptions
7328 option to compile Qt without exceptions. This is completely binary
7329 compatible, and existing applications will continue to work.
7337 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7340 This target is using the MIPSpro C++ compiler ($PLATFORM).
7342 You may choose to re-run `basename $0` with the -no-exceptions
7343 option to compile Qt without exceptions. This will make the
7344 size of the Qt library smaller and reduce the amount of memory
7345 taken by your applications.
7356 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7358 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
7359 in debug mode will run out of memory on systems with 2GB or less.
7360 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
7361 -no-webkit or -release to skip webkit debug.
7366 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7367 echo "Build type: $PLATFORM"
7369 echo "Building on: $PLATFORM"
7370 echo "Building for: $XPLATFORM"
7373 if [ "$PLATFORM_MAC" = "yes" ]; then
7374 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7376 echo "Architecture: $CFG_ARCH"
7379 if [ "$PLATFORM_QWS" = "yes" ]; then
7380 echo "Host architecture: $CFG_HOST_ARCH"
7383 if [ "$PLATFORM_MAC" = "yes" ]; then
7384 if [ "$CFG_MAC_COCOA" = "yes" ]; then
7385 if [ "$CFG_MAC_CARBON" = "yes" ]; then
7386 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
7388 echo "Using framework: Cocoa"
7391 echo "Using framework: Carbon"
7395 if [ -n "$PLATFORM_NOTES" ]; then
7396 echo "Platform notes:"
7397 echo "$PLATFORM_NOTES"
7402 if [ "$OPT_VERBOSE" = "yes" ]; then
7403 if echo '\c' |
grep '\c' >/dev
/null
; then
7404 echo -n "qmake vars .......... "
7406 echo "qmake vars .......... \c"
7408 cat "$QMAKE_VARS_FILE" |
tr '\n' ' '
7409 echo "qmake switches ...... $QMAKE_SWITCHES"
7412 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ......... $INCREMENTAL"
7413 echo "Build ............... $CFG_BUILD_PARTS"
7414 echo "Configuration ....... $QMAKE_CONFIG $QT_CONFIG"
7415 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7416 echo "Debug ............... yes (combined)"
7417 if [ "$CFG_DEBUG" = "yes" ]; then
7418 echo "Default Link ........ debug"
7420 echo "Default Link ........ release"
7423 echo "Debug ............... $CFG_DEBUG"
7425 echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
7426 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
7427 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
7428 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
7429 echo "QtConcurrent code.... $CFG_CONCURRENT"
7430 echo "QtScript module ..... $CFG_SCRIPT"
7431 echo "QtScriptTools module $CFG_SCRIPTTOOLS"
7432 echo "QtXmlPatterns module $CFG_XMLPATTERNS"
7433 echo "Phonon module ....... $CFG_PHONON"
7434 echo "Multimedia module ... $CFG_MULTIMEDIA"
7435 echo "SVG module .......... $CFG_SVG"
7436 echo "WebKit module ....... $CFG_WEBKIT"
7437 if [ "$CFG_WEBKIT" = "yes" ]; then
7438 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7439 echo "JavaScriptCore JIT .. To be decided by JavaScriptCore"
7441 echo "JavaScriptCore JIT .. $CFG_JAVASCRIPTCORE_JIT"
7444 echo "Declarative module .. $CFG_DECLARATIVE"
7445 echo "STL support ......... $CFG_STL"
7446 echo "PCH support ......... $CFG_PRECOMPILE"
7447 echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
7448 if [ "$CFG_ARCH" = "arm" ] ||
[ "$CFG_ARCH" = "armv6" ]; then
7449 echo "iWMMXt support ...... ${CFG_IWMMXT}"
7450 echo "NEON support ........ ${CFG_NEON}"
7452 [ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
7453 echo "IPv6 support ........ $CFG_IPV6"
7454 echo "IPv6 ifname support . $CFG_IPV6IFNAME"
7455 echo "getaddrinfo support . $CFG_GETADDRINFO"
7456 echo "getifaddrs support .. $CFG_GETIFADDRS"
7457 echo "Accessibility ....... $CFG_ACCESSIBILITY"
7458 echo "NIS support ......... $CFG_NIS"
7459 echo "CUPS support ........ $CFG_CUPS"
7460 echo "Iconv support ....... $CFG_ICONV"
7461 echo "Glib support ........ $CFG_GLIB"
7462 echo "GStreamer support ... $CFG_GSTREAMER"
7463 echo "Large File support .. $CFG_LARGEFILE"
7464 echo "GIF support ......... $CFG_GIF"
7465 if [ "$CFG_TIFF" = "no" ]; then
7466 echo "TIFF support ........ $CFG_TIFF"
7468 echo "TIFF support ........ $CFG_TIFF ($CFG_LIBTIFF)"
7470 if [ "$CFG_JPEG" = "no" ]; then
7471 echo "JPEG support ........ $CFG_JPEG"
7473 echo "JPEG support ........ $CFG_JPEG ($CFG_LIBJPEG)"
7475 if [ "$CFG_PNG" = "no" ]; then
7476 echo "PNG support ......... $CFG_PNG"
7478 echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
7480 if [ "$CFG_MNG" = "no" ]; then
7481 echo "MNG support ......... $CFG_MNG"
7483 echo "MNG support ......... $CFG_MNG ($CFG_LIBMNG)"
7485 echo "zlib support ........ $CFG_ZLIB"
7486 echo "Session management .. $CFG_SM"
7487 if [ "$PLATFORM_QWS" = "yes" ]; then
7488 echo "Embedded support .... $CFG_EMBEDDED"
7489 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
7490 echo "Freetype2 support ... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
7492 echo "Freetype2 support ... $CFG_QWS_FREETYPE"
7494 # Normalize the decoration output first
7495 CFG_GFX_ON
=`echo ${CFG_GFX_ON}`
7496 CFG_GFX_PLUGIN
=`echo ${CFG_GFX_PLUGIN}`
7497 echo "Graphics (qt) ....... ${CFG_GFX_ON}"
7498 echo "Graphics (plugin) ... ${CFG_GFX_PLUGIN}"
7499 CFG_DECORATION_ON
=`echo ${CFG_DECORATION_ON}`
7500 CFG_DECORATION_PLUGIN
=`echo ${CFG_DECORATION_PLUGIN}`
7501 echo "Decorations (qt) .... $CFG_DECORATION_ON"
7502 echo "Decorations (plugin) $CFG_DECORATION_PLUGIN"
7503 CFG_KBD_ON
=`echo ${CFG_KBD_ON}`
7504 CFG_KBD_PLUGIN
=`echo ${CFG_KBD_PLUGIN}`
7505 echo "Keyboard driver (qt). ${CFG_KBD_ON}"
7506 echo "Keyboard driver (plugin) ${CFG_KBD_PLUGIN}"
7507 CFG_MOUSE_ON
=`echo ${CFG_MOUSE_ON}`
7508 CFG_MOUSE_PLUGIN
=`echo ${CFG_MOUSE_PLUGIN}`
7509 echo "Mouse driver (qt) ... $CFG_MOUSE_ON"
7510 echo "Mouse driver (plugin) $CFG_MOUSE_PLUGIN"
7512 if [ "$CFG_OPENGL" = "desktop" ]; then
7513 echo "OpenGL support ...... yes (Desktop OpenGL)"
7514 elif [ "$CFG_OPENGL" = "es1" ]; then
7515 echo "OpenGL support ...... yes (OpenGL ES 1.x Common profile)"
7516 elif [ "$CFG_OPENGL" = "es1cl" ]; then
7517 echo "OpenGL support ...... yes (OpenGL ES 1.x Common Lite profile)"
7518 elif [ "$CFG_OPENGL" = "es2" ]; then
7519 echo "OpenGL support ...... yes (OpenGL ES 2.x)"
7521 echo "OpenGL support ...... no"
7523 if [ "$CFG_EGL" != "no" ]; then
7524 if [ "$CFG_EGL_GLES_INCLUDES" != "no" ]; then
7525 echo "EGL support ......... yes <GLES/egl.h>"
7527 echo "EGL support ......... yes <EGL/egl.h>"
7530 if [ "$CFG_OPENVG" ]; then
7531 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7532 echo "OpenVG support ...... ShivaVG"
7534 echo "OpenVG support ...... $CFG_OPENVG"
7537 if [ "$PLATFORM_X11" = "yes" ]; then
7538 echo "NAS sound support ... $CFG_NAS"
7539 echo "XShape support ...... $CFG_XSHAPE"
7540 echo "XSync support ....... $CFG_XSYNC"
7541 echo "Xinerama support .... $CFG_XINERAMA"
7542 echo "Xcursor support ..... $CFG_XCURSOR"
7543 echo "Xfixes support ...... $CFG_XFIXES"
7544 echo "Xrandr support ...... $CFG_XRANDR"
7545 echo "Xrender support ..... $CFG_XRENDER"
7546 echo "Xi support .......... $CFG_XINPUT"
7547 echo "MIT-SHM support ..... $CFG_MITSHM"
7548 echo "FontConfig support .. $CFG_FONTCONFIG"
7549 echo "XKB Support ......... $CFG_XKB"
7550 echo "immodule support .... $CFG_IM"
7551 echo "GTK theme support ... $CFG_QGTKSTYLE"
7553 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support ....... $CFG_SQL_mysql"
7554 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support .. $CFG_SQL_psql"
7555 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........ $CFG_SQL_odbc"
7556 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ......... $CFG_SQL_oci"
7557 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ......... $CFG_SQL_tds"
7558 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ......... $CFG_SQL_db2"
7559 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ... $CFG_SQL_ibase"
7560 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support .... $CFG_SQL_sqlite2"
7561 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ...... $CFG_SQL_sqlite ($CFG_SQLITE)"
7564 if [ "$CFG_OPENSSL" = "yes" ]; then
7565 OPENSSL_LINKAGE
="(run-time)"
7566 elif [ "$CFG_OPENSSL" = "linked" ]; then
7567 OPENSSL_LINKAGE
="(linked)"
7569 echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
7571 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
7573 # complain about not being able to use dynamic plugins if we are using a static build
7574 if [ "$CFG_SHARED" = "no" ]; then
7576 echo "WARNING: Using static linking will disable the use of dynamically"
7577 echo "loaded plugins. Make sure to import all needed static plugins,"
7578 echo "or compile needed modules into the library."
7581 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7583 echo "NOTE: When linking against OpenSSL, you can override the default"
7584 echo "library names through OPENSSL_LIBS."
7586 echo " ./configure -openssl-linked OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto'"
7589 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7591 echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
7594 echo "alsa support ........ $CFG_ALSA"
7597 sepath
=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7602 #-------------------------------------------------------------------------------
7603 # build makefiles based on the configuration
7604 #-------------------------------------------------------------------------------
7606 echo "Finding project files. Please wait..."
7607 "$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
7608 if [ -f "${relpath}/projects.pro" ]; then
7609 mkfile
="${outpath}/Makefile"
7610 [ -f "$mkfile" ] && chmod +w
"$mkfile"
7611 QTDIR
="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro" -o "$mkfile"
7614 # .projects -> projects to process
7615 # .projects.1 -> qt and moc
7616 # .projects.2 -> subdirs and libs
7617 # .projects.3 -> the rest
7618 rm -f .projects .projects
.1 .projects
.2 .projects
.3
7620 QMAKE_PROJECTS
=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7621 if [ -z "$AWK" ]; then
7622 for p
in `echo $QMAKE_PROJECTS`; do
7623 echo "$p" >> .projects
7626 cat >projects.
awk <<EOF
7632 first = "./.projects.1.tmp"
7633 second = "./.projects.2.tmp"
7634 third = "./.projects.3.tmp"
7639 if ( ! target_file )
7641 print input_file >target_file
7646 input_file = FILENAME
7651 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7654 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
7655 target_file = second
7660 matched_target == 0 && /^(TEMPLATE.*=)/ {
7661 if ( \$3 == "subdirs" )
7662 target_file = second
7663 else if ( \$3 == "lib" )
7669 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7670 if ( \$0 ~ /plugin/ )
7673 target_file = second
7678 if ( ! target_file )
7680 print input_file >>target_file
7687 for p
in `echo $QMAKE_PROJECTS`; do
7688 echo "$p" >> .projects.all
7691 # if you get errors about the length of the command line to awk, change the -l arg
7693 split -l 100 .projects.all .projects.all.
7694 for p
in .projects.all.
*; do
7695 "$AWK" -f projects.
awk `cat $p`
7696 [ -f .projects
.1.tmp
] && cat .projects
.1.tmp
>> .projects
.1
7697 [ -f .projects
.2.tmp
] && cat .projects
.2.tmp
>> .projects
.2
7698 [ -f .projects
.3.tmp
] && cat .projects
.3.tmp
>> .projects
.3
7699 rm -f .projects
.1.tmp .projects
.2.tmp .projects
.3.tmp
$p
7701 rm -f .projects.all
* projects.
awk
7703 [ -f .projects
.1 ] && cat .projects
.1 >>.projects
7704 [ -f .projects
.2 ] && cat .projects
.2 >>.projects
7705 rm -f .projects
.1 .projects
.2
7706 if [ -f .projects
.3 ] && [ "$OPT_FAST" = "no" ]; then
7707 cat .projects
.3 >>.projects
7711 # don't sort Qt and MOC in with the other project files
7712 # also work around a segfaulting uniq(1)
7713 if [ -f .sorted.projects
.2 ]; then
7714 sort .sorted.projects
.2 > .sorted.projects
.2.new
7715 mv -f .sorted.projects
.2.new .sorted.projects
.2
7716 cat .sorted.projects
.2 >> .sorted.projects
.1
7718 [ -f .sorted.projects
.1 ] && sort .sorted.projects
.1 >> .sorted.projects
7719 rm -f .sorted.projects
.2 .sorted.projects
.1
7723 if [ -f .projects
]; then
7724 uniq .projects
>.tmp
7725 mv -f .tmp .projects
7726 NORM_PROJECTS
=`cat .projects | wc -l | sed -e "s, ,,g"`
7728 if [ -f .projects
.3 ]; then
7729 uniq .projects
.3 >.tmp
7730 mv -f .tmp .projects
.3
7731 FAST_PROJECTS
=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7733 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7737 for part
in $CFG_BUILD_PARTS; do
7739 tools
) PART_ROOTS
="$PART_ROOTS tools" ;;
7740 libs
) PART_ROOTS
="$PART_ROOTS src" ;;
7741 translations
) PART_ROOTS
="$PART_ROOTS tools/linguist/lrelease translations" ;;
7742 examples
) PART_ROOTS
="$PART_ROOTS examples demos" ;;
7747 if [ "$CFG_DEV" = "yes" ]; then
7748 PART_ROOTS
="$PART_ROOTS tests"
7751 echo "Creating makefiles. Please wait..."
7752 for file in .projects .projects
.3; do
7753 [ '!' -f "$file" ] && continue
7754 for a
in `cat $file`; do
7756 for r
in $PART_ROOTS; do
7757 if echo "$a" |
grep "^$r" >/dev
/null
2>&1 ||
echo "$a" |
grep "^$relpath/$r" >/dev
/null
2>&1; then
7762 [ "$IN_ROOT" = "no" ] && continue
7765 *winmain
/winmain.pro
) continue ;;
7766 *s60main
/s60main.pro
) continue ;;
7767 *examples
/activeqt
/*) continue ;;
7768 */qmake
/qmake.pro
) continue ;;
7769 *tools
/bootstrap
*|
*tools
/moc
*|
*tools
/rcc
*|
*tools
/uic
*|
*linguist
/lrelease
*) SPEC
=$QMAKESPEC ;;
7770 *) SPEC
=$XQMAKESPEC ;;
7772 dir
=`dirname "$a" | sed -e "s;$sepath;.;g"`
7773 test -d "$dir" || mkdir
-p "$dir"
7774 OUTDIR
="$outpath/$dir"
7775 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7776 # fast configure - the makefile exists, skip it
7777 # since the makefile exists, it was generated by qmake, which means we
7778 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7780 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7783 QMAKE_SPEC_ARGS
="-spec $SPEC"
7784 if echo '\c' |
grep '\c' >/dev
/null
; then
7790 QMAKE
="$outpath/bin/qmake"
7791 QMAKE_ARGS
="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7792 if [ "$file" = ".projects.3" ]; then
7793 if echo '\c' |
grep '\c' >/dev
/null
; then
7800 cat >"${OUTDIR}/Makefile" <<EOF
7801 # ${OUTDIR}/Makefile: generated by configure
7803 # WARNING: This makefile will be replaced with a real makefile.
7804 # All changes made to this file will be lost.
7806 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7808 cat >>"${OUTDIR}/Makefile" <<EOF
7810 all clean install qmake first Makefile: FORCE
7811 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7819 if [ "$OPT_VERBOSE" = "yes" ]; then
7820 echo " (`basename $SPEC`)"
7821 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7826 [ -f "${OUTDIR}/Makefile" ] && chmod +w
"${OUTDIR}/Makefile"
7827 QTDIR
="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7831 rm -f .projects .projects
.3
7833 #-------------------------------------------------------------------------------
7834 # check for platforms that we don't yet know about
7835 #-------------------------------------------------------------------------------
7836 if [ "$CFG_ARCH" = "generic" ]; then
7839 NOTICE: Atomic operations are not yet supported for this
7842 Qt will use the 'generic' architecture instead, which uses a
7843 single pthread_mutex_t to protect all atomic operations. This
7844 implementation is the slow (but safe) fallback implementation
7845 for architectures Qt does not yet support.
7849 #-------------------------------------------------------------------------------
7850 # check if the user passed the -no-zlib option, which is no longer supported
7851 #-------------------------------------------------------------------------------
7852 if [ -n "$ZLIB_FORCED" ]; then
7853 which_zlib
="supplied"
7854 if [ "$CFG_ZLIB" = "system" ]; then
7860 NOTICE: The -no-zlib option was supplied but is no longer
7863 Qt now requires zlib support in all builds, so the -no-zlib
7864 option was ignored. Qt will be built using the $which_zlib
7869 #-------------------------------------------------------------------------------
7870 # finally save the executed command to another script
7871 #-------------------------------------------------------------------------------
7872 if [ `basename $0` != "config.status" ]; then
7873 CONFIG_STATUS
="$relpath/$relconf $OPT_CMDLINE"
7875 # add the system variables
7876 for varname
in $SYSTEM_VARIABLES; do
7878 'if [ -n "\$'${varname}'" ]; then
7879 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7884 echo "$CONFIG_STATUS" |
grep '\-confirm\-license' >/dev
/null
2>&1 || CONFIG_STATUS
="$CONFIG_STATUS -confirm-license"
7886 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7887 echo "#!/bin/sh" > "$outpath/config.status"
7888 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7889 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7890 echo "else" >> "$outpath/config.status"
7891 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7892 echo "fi" >> "$outpath/config.status"
7893 chmod +x
"$outpath/config.status"
7896 if [ -n "$RPATH_MESSAGE" ]; then
7898 echo "$RPATH_MESSAGE"
7901 MAKE
=`basename "$MAKE"`
7903 echo Qt is now configured
for building. Just run
\'$MAKE\'.
7904 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7905 echo Once everything is built
, Qt is installed.
7906 echo You should not run
\'$MAKE install\'.
7908 echo Once everything is built
, you must run
\'$MAKE install\'.
7909 echo Qt will be installed into
$QT_INSTALL_PREFIX
7912 echo To reconfigure
, run
\'$MAKE confclean
\' and
\'configure
\'.