2 #############################################################################
4 ## Copyright (C) 2009 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 # relies on $QMAKESPEC being set correctly. parses include statements in
110 # qmake.conf and prints out the expanded file
117 $AWK -v "QMAKESPEC=$tmpSPEC" '
119 fname = QMAKESPEC "/" substr($0, 9, length($0) - 9)
120 while ((getline line < fname) > 0)
125 { print }' "$tmpSPEC/qmake.conf"
128 # relies on $TEST_COMPILER being set correctly
129 compilerSupportsFlag
()
131 cat >conftest.cpp
<<EOF
132 int main() { return 0; }
134 "$TEST_COMPILER" "$@" -o /dev
/null conftest.cpp
136 rm -f conftest.cpp conftest.o
140 # relies on $TEST_COMPILER being set correctly
146 safe_flag
=`shellEscape "$flag"`
147 lflags
=$lflags,$safe_flag
149 compilerSupportsFlag
"$lflags" >/dev
/null
2>&1
152 #-------------------------------------------------------------------------------
153 # operating system detection
154 #-------------------------------------------------------------------------------
156 # need that throughout the script
157 UNAME_MACHINE
=`(uname -m) 2>/dev/null` || UNAME_MACHINE
=unknown
158 UNAME_RELEASE
=`(uname -r) 2>/dev/null` || UNAME_RELEASE
=unknown
159 UNAME_SYSTEM
=`(uname -s) 2>/dev/null` || UNAME_SYSTEM
=unknown
160 UNAME_VERSION
=`(uname -v) 2>/dev/null` || UNAME_VERSION
=unknown
163 #-------------------------------------------------------------------------------
164 # window system detection
165 #-------------------------------------------------------------------------------
171 if [ -f "$relpath"/src
/gui
/kernel
/qapplication_mac.mm
] && [ -d /System
/Library
/Frameworks
/Carbon.framework
]; then
173 # ~ the Carbon SDK exists
174 # ~ src/gui/base/qapplication_mac.cpp is present
175 # ~ this is the internal edition and Qt/Mac sources exist
177 elif [ -f "$relpath"/src
/gui
/kernel
/qapplication_qws.cpp
]; then
179 # ~ src/gui/base/qapplication_qws.cpp is present
180 # ~ this is the free or commercial edition
181 # ~ this is the internal edition and Qt Embedded is explicitly enabled
182 if [ -f "$relpath"/src
/gui
/kernel
/qapplication_mac.mm
]; then
183 # This is a depot build, or an all-platforms package
186 # This must be the embedded package, since the Qt/Mac source files are not present
191 #-----------------------------------------------------------------------------
192 # Qt version detection
193 #-----------------------------------------------------------------------------
194 QT_VERSION
=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
198 if [ -n "$QT_VERSION" ]; then
199 QT_VERSION
=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
200 MAJOR
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
201 if [ -n "$MAJOR" ]; then
202 MINOR
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
203 PATCH
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
204 QT_MAJOR_VERSION
="$MAJOR"
205 [ -z "$MINOR" ] || QT_MINOR_VERSION
="$MINOR"
206 [ -z "$PATCH" ] || QT_PATCH_VERSION
="$PATCH"
209 if [ -z "$QT_MAJOR_VERSION" ]; then
210 echo "Cannot process version from qglobal.h: $QT_VERSION"
211 echo "Cannot proceed."
215 QT_PACKAGEDATE
=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
216 if [ -z "$QT_PACKAGEDATE" ]; then
217 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
218 echo "Cannot proceed"
222 #-------------------------------------------------------------------------------
224 #-------------------------------------------------------------------------------
229 EditionString
=Commercial
233 # parse the arguments, setting things to "yes" or "no"
234 while [ "$#" -gt 0 ]; do
238 #Autoconf style options
240 VAR
=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
244 VAR
=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
248 VAR
=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
249 VAL
=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
252 VAR
=`echo $1 | sed "s,^--no-\(.*\),\1,"`
257 # this option may or may not be followed by an argument
258 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
265 -h|
help|
--help|
-help)
266 if [ "$VAL" = "yes" ]; then
268 COMMERCIAL_USER
="no" #doesn't matter we will display the help
271 COMMERCIAL_USER
="no" #doesn't matter we will display the help
275 VAR
=`echo $1 | sed "s,^--\(.*\),\1,"`
279 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
286 if [ "$UNKNOWN_ARG" = "yes" ]; then
296 if [ "$PLATFORM_QWS" != "no" ]; then
297 if [ "$PLATFORM_QWS" = "maybe" ]; then
303 echo "No license exists to enable Qt for Embedded Linux. Disabling."
316 COMMERCIAL_USER
="yes"
330 if [ "$COMMERCIAL_USER" = "ask" ]; then
332 echo "Which edition of Qt do you want to use ?"
334 echo "Type 'c' if you want to use the Commercial Edition."
335 echo "Type 'o' if you want to use the Open Source Edition."
339 if [ "$commercial" = "c" ]; then
340 COMMERCIAL_USER
="yes"
342 elif [ "$commercial" = "o" ]; then
349 if [ "$CFG_NOKIA" = "yes" ]; then
351 Edition
="NokiaInternalBuild"
352 EditionString
="Nokia Internal Build"
353 QT_EDITION
="QT_EDITION_OPENSOURCE"
354 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
355 elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL
] && [ $COMMERCIAL_USER = "yes" ]; then
356 # Commercial preview release
357 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
360 QT_EDITION
="QT_EDITION_DESKTOP"
361 LicenseType
="Technology Preview"
362 elif [ $COMMERCIAL_USER = "yes" ]; then
363 # one of commercial editions
364 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
365 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS
=yes
367 # read in the license file
368 if [ -f "$LICENSE_FILE" ]; then
369 .
"$LICENSE_FILE" >/dev
/null
2>&1
370 if [ -z "$LicenseKeyExt" ]; then
372 echo "You are using an old license file."
374 echo "Please install the license file supplied by Nokia,"
375 echo "or install the Qt Open Source Edition if you intend to"
376 echo "develop free software."
379 if [ -z "$Licensee" ]; then
381 echo "Invalid license key. Please check the license key."
385 if [ -z "$LicenseKeyExt" ]; then
387 if echo '\c' |
grep '\c' >/dev
/null
; then
388 echo -n "Please enter your license key: "
390 echo "Please enter your license key: \c"
393 Licensee
="Unknown user"
398 echo "$LicenseKeyExt" |
grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev
/null
2>&1 \
399 && LicenseValid
="yes" \
401 if [ "$LicenseValid" != "yes" ]; then
403 echo "Invalid license key. Please check the license key."
406 ProductCode
=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
407 PlatformCode
=`echo $LicenseKeyExt | cut -f 2 -d - | cut -b 1`
408 LicenseTypeCode
=`echo $LicenseKeyExt | cut -f 3 -d -`
409 LicenseFeatureCode
=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
411 # determine which edition we are licensed to use
412 case "$LicenseTypeCode" in
414 LicenseType
="Commercial"
418 QT_EDITION
="QT_EDITION_UNIVERSAL"
421 Edition
="FullFramework"
422 EditionString
="Full Framework"
423 QT_EDITION
="QT_EDITION_DESKTOP"
426 Edition
="GUIFramework"
427 EditionString
="GUI Framework"
428 QT_EDITION
="QT_EDITION_DESKTOPLIGHT"
433 LicenseType
="Evaluation"
437 QT_EDITION
="QT_EDITION_EVALUATION"
442 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
444 echo "Invalid license key. Please check the license key."
448 # verify that we are licensed to use Qt on this platform
450 if [ "$PlatformCode" = "X" ]; then
452 LICENSE_EXTENSION
="-ALLOS"
453 elif [ "$PLATFORM_QWS" = "yes" ]; then
454 case $PlatformCode in
455 2|
4|
8|A|B|E|G|J|K|P|Q|S|U|V|W
)
456 # Qt for Embedded Linux
457 LICENSE_EXTENSION
="-EMBEDDED"
461 echo "You are not licensed for Qt for Embedded Linux."
463 echo "Please contact qt-info@nokia.com to upgrade your license"
464 echo "to include Qt for Embedded Linux, or install the"
465 echo "Qt Open Source Edition if you intend to develop free software."
469 elif [ "$PLATFORM_MAC" = "yes" ]; then
470 case $PlatformCode in
471 2|
4|
5|
7|
9|B|C|E|F|G|L|M|U|W|Y
)
473 LICENSE_EXTENSION
="-DESKTOP"
475 3|
6|
8|A|D|H|J|K|P|Q|S|V
)
477 LICENSE_EXTENSION
="-EMBEDDED"
481 echo "You are not licensed for the Qt/Mac platform."
483 echo "Please contact qt-info@nokia.com to upgrade your license"
484 echo "to include the Qt/Mac platform."
489 case $PlatformCode in
490 2|
3|
4|
5|
7|D|E|F|J|M|Q|S|T|V|Z
)
492 LICENSE_EXTENSION
="-DESKTOP"
494 6|
8|
9|A|B|C|G|H|K|P|U|W
)
496 LICENSE_EXTENSION
="-EMBEDDED"
500 echo "You are not licensed for the Qt/X11 platform."
502 echo "Please contact qt-info@nokia.com to upgrade your license to"
503 echo "include the Qt/X11 platform, or install the Qt Open Source Edition"
504 echo "if you intend to develop free software."
510 if test -r "$relpath/.LICENSE"; then
511 # Generic, non-final license
513 line
=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
518 *TECHNOLOGY?PREVIEW
*)
525 echo >&2 "Invalid license files; cannot continue"
530 EditionString
="$Edition"
531 QT_EDITION
="QT_EDITION_DESKTOP"
534 case "$LicenseFeatureCode" in
537 case "$LicenseType" in
539 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
542 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
548 case "$LicenseType" in
550 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
553 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
559 echo "Invalid license key. Please check the license key."
563 if [ '!' -f "$outpath/LICENSE" ]; then
564 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
565 echo "this software has disappeared."
567 echo "Sorry, you are not licensed to use this software."
568 echo "Try re-installing."
572 elif [ $COMMERCIAL_USER = "no" ]; then
573 # Open Source edition - may only be used under the terms of the GPL or LGPL.
574 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
575 Licensee
="Open Source"
577 EditionString
="Open Source"
578 QT_EDITION
="QT_EDITION_OPENSOURCE"
581 #-------------------------------------------------------------------------------
582 # initalize variables
583 #-------------------------------------------------------------------------------
585 SYSTEM_VARIABLES
="CC CXX CFLAGS CXXFLAGS LDFLAGS"
586 for varname
in $SYSTEM_VARIABLES; do
587 qmakevarname
="${varname}"
588 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
589 if [ "${varname}" = "LDFLAGS" ]; then
590 qmakevarname
="LFLAGS"
593 'if [ -n "\$'${varname}'" ]; then
594 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
598 # Use CC/CXX to run config.tests
599 mkdir
-p "$outpath/config.tests"
600 rm -f "$outpath/config.tests/.qmake.cache"
601 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
603 QMakeVar add styles
"cde mac motif plastique cleanlooks windows"
604 QMakeVar add decorations
"default windows styled"
605 QMakeVar add mouse-drivers
"pc"
606 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
607 QMakeVar add gfx-drivers
"linuxfb"
608 QMakeVar add mouse-drivers
"linuxtp"
610 QMakeVar add kbd-drivers
"tty"
612 if [ "$CFG_DEV" = "yes" ]; then
613 QMakeVar add kbd-drivers
"um"
616 # QTDIR may be set and point to an old or system-wide Qt installation
619 # the minimum version of libdbus-1 that we require:
620 MIN_DBUS_1_VERSION
=0.93
622 # initalize internal variables
623 CFG_CONFIGURE_EXIT_ON_ERROR
=yes
625 CFG_EXCEPTIONS
=unspecified
626 CFG_SCRIPT
=auto
# (yes|no|auto)
627 CFG_SCRIPTTOOLS
=auto
# (yes|no|auto)
628 CFG_XMLPATTERNS
=auto
# (yes|no|auto)
657 CFG_OPENVG_LC_INCLUDES
=no
659 CFG_OPENVG_ON_OPENGL
=no
661 CFG_EGL_GLES_INCLUDES
=no
664 CFG_QWS_FREETYPE
=auto
667 QT_DEFAULT_BUILD_PARTS
="libs tools examples demos docs translations"
672 CFG_PHONON_BACKEND
=yes
675 CFG_WEBKIT
=auto
# (yes|no|auto)
676 CFG_JAVASCRIPTCORE_JIT
=auto
678 CFG_GFX_AVAILABLE
="linuxfb transformed qvfb vnc multiscreen directfb"
679 CFG_GFX_ON
="linuxfb multiscreen"
680 CFG_GFX_PLUGIN_AVAILABLE
=
683 CFG_KBD_AVAILABLE
="tty linuxinput qvfb"
684 CFG_KBD_ON
="tty" #default, see QMakeVar above
685 CFG_MOUSE_AVAILABLE
="pc linuxtp linuxinput tslib qvfb"
686 CFG_MOUSE_ON
="pc linuxtp" #default, see QMakeVar above
688 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
689 CFG_KBD_AVAILABLE
="${CFG_KBD_AVAILABLE} qnx"
690 CFG_MOUSE_AVAILABLE
="${CFG_MOUSE_AVAILABLE} qnx"
691 CFG_GFX_AVAILABLE
="${CFG_GFX_AVAILABLE} qnx"
696 CFG_KBD_PLUGIN_AVAILABLE
=
699 CFG_MOUSE_PLUGIN_AVAILABLE
=
704 CFG_DECORATION_AVAILABLE
="styled windows default"
705 CFG_DECORATION_ON
="${CFG_DECORATION_AVAILABLE}" # all on by default
706 CFG_DECORATION_PLUGIN_AVAILABLE
=
707 CFG_DECORATION_PLUGIN
=
722 CFG_SEPARATE_DEBUG_INFO
=auto
723 CFG_REDUCE_EXPORTS
=auto
728 CFG_REDUCE_RELOCATIONS
=no
733 CFG_ACCESSIBILITY
=auto
737 CFG_DOUBLEFORMAT
=auto
740 CFG_CLOCK_GETTIME
=auto
741 CFG_CLOCK_MONOTONIC
=auto
750 MAC_CONFIG_TEST_COMMANDLINE
= # used to make the configure tests run with the correct arch's and SDK settings
755 COMMANDLINE_MAC_COCOA
=no
757 CFG_PREFIX_INSTALL
=yes
765 XPLATFORM
= # This seems to be the QMAKESPEC, like "linux-g++"
768 OPT_CONFIRM_LICENSE
=no
774 CFG_GRAPHICS_SYSTEM
=default
777 # initalize variables used for installation
785 QT_INSTALL_TRANSLATIONS
=
791 #flags for SQL drivers
799 QT_LFLAGS_ODBC
="-lodbc"
801 # flags for libdbus-1
805 # flags for Glib (X11 only)
809 # flags for GStreamer (X11 only)
813 #-------------------------------------------------------------------------------
814 # check SQL drivers, mouse drivers and decorations available in this package
815 #-------------------------------------------------------------------------------
817 # opensource version removes some drivers, so force them to be off
823 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
824 for a
in "$relpath/src/plugins/sqldrivers/"*; do
826 base_a
=`basename "$a"`
827 CFG_SQL_AVAILABLE
="${CFG_SQL_AVAILABLE} ${base_a}"
828 eval "CFG_SQL_${base_a}=auto"
833 CFG_DECORATION_PLUGIN_AVAILABLE
=
834 if [ -d "$relpath/src/plugins/decorations" ]; then
835 for a
in "$relpath/src/plugins/decorations/"*; do
837 base_a
=`basename "$a"`
838 CFG_DECORATION_PLUGIN_AVAILABLE
="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
843 CFG_KBD_PLUGIN_AVAILABLE
=
844 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
845 for a
in "$relpath/src/plugins/kbddrivers/"*; do
847 base_a
=`basename "$a"`
848 CFG_KBD_PLUGIN_AVAILABLE
="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
853 CFG_MOUSE_PLUGIN_AVAILABLE
=
854 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
855 for a
in "$relpath/src/plugins/mousedrivers/"*; do
857 base_a
=`basename "$a"`
858 CFG_MOUSE_PLUGIN_AVAILABLE
="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
863 CFG_GFX_PLUGIN_AVAILABLE
=
864 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
865 for a
in "$relpath/src/plugins/gfxdrivers/"*; do
867 base_a
=`basename "$a"`
868 CFG_GFX_PLUGIN_AVAILABLE
="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
871 CFG_GFX_OFF
="$CFG_GFX_AVAILABLE" # assume all off
874 #-------------------------------------------------------------------------------
875 # parse command line arguments
876 #-------------------------------------------------------------------------------
878 # parse the arguments, setting things to "yes" or "no"
879 while [ "$#" -gt 0 ]; do
883 #Autoconf style options
885 VAR
=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
889 VAR
=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
893 VAR
=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
894 VAL
=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
897 VAR
=`echo $1 | sed "s,^--no-\(.*\),\1,"`
901 VAR
=`echo $1 | sed "s,^--\(.*\),\1,"`
905 -no-*-*|
-plugin-*-*|
-qt-*-*)
906 VAR
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
907 VAL
=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
911 VAR
=`echo $1 | sed "s,^-no-\(.*\),\1,"`
914 #Qt style yes options
915 -incremental|
-qvfb|
-profile|
-shared|
-static|
-sm|
-xinerama|
-xshape|
-xinput|
-reduce-exports|
-pch|
-separate-debug-info|
-stl|
-freetype|
-xcursor|
-xfixes|
-xrandr|
-xrender|
-mitshm|
-fontconfig|
-xkb|
-nis|
-qdbus|
-dbus|
-dbus-linked|
-glib|
-gstreamer|
-gtkstyle|
-cups|
-iconv|
-largefile|
-h|
-help|
-v|
-verbose|
-debug|
-release|
-fast|
-accessibility|
-confirm-license|
-gnumake|
-framework|
-qt3support|
-debug-and-release|
-exceptions|
-cocoa|
-universal|
-prefix-install|
-silent|
-armfpa|
-optimized-qmake|
-dwarf2|
-reduce-relocations|
-sse|
-openssl|
-openssl-linked|
-ptmalloc|
-xmlpatterns|
-phonon|
-phonon-backend|
-multimedia|
-svg|
-webkit|
-javascript-jit|
-script|
-scripttools|
-rpath|
-force-pkg-config)
916 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
919 #Qt style options that pass an argument
921 if [ "$PLATFORM_QWS" != "yes" ]; then
923 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
927 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
931 -prefix|
-docdir|
-headerdir|
-plugindir|
-datadir|
-libdir|
-bindir|
-translationdir|
-sysconfdir|
-examplesdir|
-demosdir|
-depths|
-make|
-nomake|
-platform|
-xplatform|
-buildkey|
-sdk|
-arch|
-host-arch|
-mysql_config)
932 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
936 #Qt style complex options in one command
937 -enable-*|
-disable-*)
938 VAR
=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
939 VAL
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
941 #Qt Builtin/System style options
942 -no-*|
-system-*|
-qt-*)
943 VAR
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
944 VAL
=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
946 #Options that cannot be generalized
953 # this option may or may not be followed by an argument
954 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
963 # this option may or may not be followed by an argument
964 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
973 # this option may or may not be followed by an argument
974 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
982 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
983 # this option may or may not be followed by an argument
984 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
993 VAL
=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
997 VAL
=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1005 VAR
="graphicssystem"
1016 if [ "$1" = "-D" ]; then
1020 VAL
=`echo $1 | sed 's,-D,,'`
1025 if [ "$1" = "-I" ]; then
1029 VAL
=`echo $1 | sed 's,-I,,'`
1034 if [ "$1" = "-L" ]; then
1038 VAL
=`echo $1 | sed 's,-L,,'`
1043 if [ "$1" = "-R" ]; then
1047 VAL
=`echo $1 | sed 's,-R,,'`
1052 VAL
=`echo $1 | sed 's,-l,,'`
1056 if [ "$1" = "-F" ]; then
1060 VAL
=`echo $1 | sed 's,-F,,'`
1065 if [ "$1" = "-fw" ]; then
1069 VAL
=`echo $1 | sed 's,-fw,,'`
1073 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
1080 if [ "$UNKNOWN_ARG" = "yes" ]; then
1081 echo "$1: unknown argument"
1092 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1093 CFG_QT3SUPPORT
="$VAL"
1099 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1100 CFG_ACCESSIBILITY
="$VAL"
1109 CFG_USE_GNUMAKE
="$VAL"
1112 CFG_MYSQL_CONFIG
="$VAL"
1115 QT_INSTALL_PREFIX
="$VAL"
1118 QT_HOST_PREFIX
="$VAL"
1121 QT_FORCE_PKGCONFIG
=yes
1124 QT_INSTALL_DOCS
="$VAL"
1127 QT_INSTALL_HEADERS
="$VAL"
1130 QT_INSTALL_PLUGINS
="$VAL"
1133 QT_INSTALL_DATA
="$VAL"
1136 QT_INSTALL_LIBS
="$VAL"
1145 QT_INSTALL_TRANSLATIONS
="$VAL"
1147 sysconfdir|settingsdir
)
1148 QT_INSTALL_SETTINGS
="$VAL"
1151 QT_INSTALL_EXAMPLES
="$VAL"
1154 QT_INSTALL_DEMOS
="$VAL"
1160 QT_INSTALL_BINS
="$VAL"
1163 CFG_USER_BUILD_KEY
="$VAL"
1170 if [ "$PLATFORM_QWS" != "no" ]; then
1171 if [ "$PLATFORM_QWS" = "maybe" ]; then
1177 echo "No license exists to enable Qt for Embedded Linux. Disabling."
1182 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1189 if [ "$VAL" = "little" ]; then
1190 CFG_ENDIAN
="Q_LITTLE_ENDIAN"
1191 elif [ "$VAL" = "big" ]; then
1192 CFG_ENDIAN
="Q_BIG_ENDIAN"
1198 if [ "$VAL" = "little" ]; then
1199 CFG_HOST_ENDIAN
="Q_LITTLE_ENDIAN"
1200 elif [ "$VAL" = "big" ]; then
1201 CFG_HOST_ENDIAN
="Q_BIG_ENDIAN"
1207 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1214 CFG_QWS_DEPTHS
="$VAL"
1217 if [ "$VAL" = "auto" ] ||
[ "$VAL" = "desktop" ] ||
1218 [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
1219 [ "$VAL" = "es1cl" ] ||
[ "$VAL" = "es1" ] ||
[ "$VAL" = "es2" ]; then
1226 if [ "$VAL" = "auto" ] ||
[ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1233 if [ "$PLATFORM_QWS" = "yes" ]; then
1234 echo "Error: Graphics System plugins are not supported on QWS."
1235 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1236 echo " rather than existing as a separate plugin."
1240 if [ "$VAL" = "opengl" ]; then
1241 CFG_GRAPHICS_SYSTEM
="opengl"
1242 elif [ "$VAL" = "openvg" ]; then
1243 CFG_GRAPHICS_SYSTEM
="openvg"
1244 elif [ "$VAL" = "raster" ]; then
1245 CFG_GRAPHICS_SYSTEM
="raster"
1252 qvfb
) # left for commandline compatibility, not documented
1253 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1254 if [ "$VAL" = "yes" ]; then
1255 QMakeVar add gfx-drivers qvfb
1256 QMakeVar add kbd-drivers qvfb
1257 QMakeVar add mouse-drivers qvfb
1258 CFG_GFX_ON
="$CFG_GFX_ON qvfb"
1259 CFG_KBD_ON
="$CFG_KBD_ON qvfb"
1260 CFG_MOUSE_ON
="$CFG_MOUSE_ON qvfb"
1267 CFG_NOBUILD_PARTS
="$CFG_NOBUILD_PARTS $VAL"
1270 CFG_BUILD_PARTS
="$CFG_BUILD_PARTS $VAL"
1273 if [ "$PLATFORM_MAC" = "yes" ]; then
1275 elif [ "$PLATFORM_QWS" = "yes" ]; then
1278 if [ "$CFG_FRAMEWORK" = "auto" ]; then
1284 if [ "$PLATFORM_MAC" = "yes" ]; then
1291 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1292 CFG_MAC_DWARF2
="$VAL"
1298 if [ "$PLATFORM_MAC" = "yes" ]; then
1299 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $VAL"
1308 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1309 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS x86 ppc"
1315 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1316 CFG_MAC_COCOA
="$VAL"
1317 COMMANDLINE_MAC_COCOA
="$VAL"
1323 if [ "$PLATFORM_MAC" = "yes" ]; then
1324 CFG_FRAMEWORK
="$VAL"
1330 if [ "$VAL" = "yes" ]; then
1332 QMakeVar add QMAKE_CFLAGS
-pg
1333 QMakeVar add QMAKE_CXXFLAGS
-pg
1334 QMakeVar add QMAKE_LFLAGS
-pg
1335 QMAKE_VARS
="$QMAKE_VARS CONFIG+=nostrip"
1340 exceptions|g
++-exceptions)
1341 if [ "$VAL" = "no" ]; then
1343 elif [ "$VAL" = "yes" ]; then
1351 # keep compatibility with old platform names
1357 PLATFORM
=hpux-acc-o64
1360 PLATFORM
=hpux-acc-64
1363 PLATFORM
=hpux-acc-64
1375 PLATFORM
=reliant-cds-64
1378 PLATFORM
=solaris-cc-64
1381 PLATFORM
=solaris-cc-64
1384 PLATFORM
=unixware-cc
1387 PLATFORM
=unixware-g
++
1390 PLATFORM
=unixware-cc
1393 PLATFORM
=unixware-g
++
1399 i386
) NATIVE_64_ARCH
="x86_64" ;;
1400 powerpc
) NATIVE_64_ARCH
="ppc64" ;;
1401 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1403 if [ ! -z "$NATIVE_64_ARCH" ]; then
1404 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1405 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1414 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1415 CFG_DEBUG_RELEASE
="$VAL"
1421 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1422 CFG_RELEASE_QMAKE
="$VAL"
1428 if [ "$VAL" = "yes" ]; then
1430 elif [ "$VAL" = "no" ]; then
1437 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1438 CFG_PREFIX_INSTALL
="$VAL"
1446 developer-build|commercial|opensource|nokia-developer
)
1447 # These switches have been dealt with already
1450 if [ "$VAL" = "yes" ]; then
1452 elif [ "$VAL" = "no" ]; then
1459 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1460 CFG_INCREMENTAL
="$VAL"
1466 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1467 CFG_CONFIGURE_EXIT_ON_ERROR
="$VAL"
1473 if [ "$PLATFORM_QWS" = "yes" ]; then
1474 FEATURE
=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1475 if [ "$VAL" = "no" ]; then
1476 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_$FEATURE"
1477 elif [ "$VAL" = "yes" ] ||
[ "$VAL" = "unknown" ]; then
1478 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_$FEATURE"
1487 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1494 [ "$VAL" = "qt" ] && VAL
=yes
1495 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1502 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1510 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1517 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1524 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1531 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1538 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1545 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1546 CFG_PRECOMPILE
="$VAL"
1551 separate-debug-info
)
1552 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1553 CFG_SEPARATE_DEBUG_INFO
="$VAL"
1559 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1560 CFG_REDUCE_EXPORTS
="$VAL"
1566 if [ "$VAL" = "no" ]; then
1573 if [ "$VAL" = "no" ]; then
1580 if [ "$VAL" = "no" ]; then
1587 if [ "$VAL" = "no" ]; then
1597 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1598 CFG_REDUCE_RELOCATIONS
="$VAL"
1604 [ "$VAL" = "qt" ] && VAL
=yes
1605 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1606 CFG_QWS_FREETYPE
="$VAL"
1612 [ "$VAL" = "qt" ] && VAL
=yes
1613 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1618 # No longer supported:
1619 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1622 if [ "$VAL" = "system" ]; then
1629 [ "$VAL" = "yes" ] && VAL
=qt
1630 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1637 [ "$VAL" = "yes" ] && VAL
=qt
1638 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1645 [ "$VAL" = "yes" ] && VAL
=qt
1646 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1653 [ "$VAL" = "yes" ] && VAL
=qt
1654 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1661 if [ "$VAL" = "system" ] ||
[ "$VAL" = "no" ]; then
1668 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1675 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1682 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1689 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1696 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1703 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1704 CFG_FONTCONFIG
="$VAL"
1710 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1717 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1724 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1731 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1738 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1739 CFG_GSTREAMER
="$VAL"
1745 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1746 CFG_QGTKSTYLE
="$VAL"
1752 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "linked" ]; then
1754 elif [ "$VAL" = "runtime" ]; then
1761 if [ "$VAL" = "yes" ]; then
1768 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1775 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1776 CFG_LARGEFILE
="$VAL"
1782 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1789 if [ "$VAL" = "yes" ]; then
1790 CFG_OPENSSL
="linked"
1796 if [ "$VAL" = "yes" ]; then
1804 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1805 CFG_XMLPATTERNS
="yes"
1807 if [ "$VAL" = "no" ]; then
1808 CFG_XMLPATTERNS
="no"
1815 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1818 if [ "$VAL" = "no" ]; then
1826 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1827 CFG_SCRIPTTOOLS
="yes"
1829 if [ "$VAL" = "no" ]; then
1830 CFG_SCRIPTTOOLS
="no"
1837 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1840 if [ "$VAL" = "no" ]; then
1848 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1851 if [ "$VAL" = "no" ]; then
1859 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ] ||
[ "$VAL" = "no" ]; then
1860 CFG_JAVASCRIPTCORE_JIT
="$VAL"
1866 if [ "$VAL" = "yes" ]; then
1867 OPT_CONFIRM_LICENSE
="$VAL"
1873 if [ "$VAL" = "yes" ]; then
1879 sql-
*|gfx-
*|decoration-
*|kbd-
*|mouse-
*)
1880 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1881 # if autoconf style options were used, $VAL can be "yes" or "no"
1882 [ "$VAL" = "yes" ] && VAL
=qt
1883 # now $VAL should be "no", "qt", or "plugin"... double-check
1884 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1887 # now $VAL is "no", "qt", or "plugin"
1889 VAL
=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1890 VAR
=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1892 # Grab the available values
1895 avail
="$CFG_SQL_AVAILABLE"
1898 avail
="$CFG_GFX_AVAILABLE"
1899 if [ "$OPT" = "plugin" ]; then
1900 avail
="$CFG_GFX_PLUGIN_AVAILABLE"
1904 avail
="$CFG_DECORATION_AVAILABLE"
1905 if [ "$OPT" = "plugin" ]; then
1906 avail
="$CFG_DECORATION_PLUGIN_AVAILABLE"
1910 avail
="$CFG_KBD_AVAILABLE"
1911 if [ "$OPT" = "plugin" ]; then
1912 avail
="$CFG_KBD_PLUGIN_AVAILABLE"
1916 avail
="$CFG_MOUSE_AVAILABLE"
1917 if [ "$OPT" = "plugin" ]; then
1918 avail
="$CFG_MOUSE_PLUGIN_AVAILABLE"
1923 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1927 # Check that that user's value is available.
1930 if [ "$VAL" = "$d" ]; then
1935 [ "$found" = yes ] || ERROR
=yes
1937 if [ "$VAR" = "sql" ]; then
1938 # set the CFG_SQL_driver
1939 eval "CFG_SQL_$VAL=\$OPT"
1943 if [ "$OPT" = "plugin" ] ||
[ "$OPT" = "qt" ]; then
1944 if [ "$OPT" = "plugin" ]; then
1945 [ "$VAR" = "decoration" ] && QMakeVar del
"${VAR}s" "$VAL"
1946 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
1947 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
1948 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
1949 [ "$VAR" = "mouse" ] && QMakeVar del
"${VAR}s" "$VAL"
1950 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
1951 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
1952 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
1955 if [ "$VAR" = "gfx" ] ||
[ "$VAR" = "kbd" ] ||
[ "$VAR" = "decoration" ] ||
[ "$VAR" = "mouse" ]; then
1956 [ "$VAR" = "gfx" ] && CFG_GFX_ON
="$CFG_GFX_ON $VAL"
1957 [ "$VAR" = "kbd" ] && CFG_KBD_ON
="$CFG_KBD_ON $VAL"
1958 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
="$CFG_DECORATION_ON $VAL"
1959 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
="$CFG_MOUSE_ON $VAL"
1963 QMakeVar add
"${VAR}s" "${VAL}"
1964 elif [ "$OPT" = "no" ]; then
1965 PLUG_VAR
="${VAR}-plugin"
1966 if [ "$VAR" = "gfx" ] ||
[ "$VAR" = "kbd" ] ||
[ "$VAR" = "mouse" ]; then
1967 IN_VAR
="${VAR}-driver"
1971 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
1972 [ "$VAR" = "gfx" ] && CFG_GFX_ON
=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
1973 [ "$VAR" = "kbd" ] && CFG_KBD_ON
=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
1974 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
1975 QMakeVar del
"${IN_VAR}s" "$VAL"
1976 QMakeVar del
"${PLUG_VAR}s" "$VAL"
1978 if [ "$ERROR" = "yes" ]; then
1979 echo "$CURRENT_OPT: unknown argument"
1984 if [ "$VAL" = "yes" ]; then
1985 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1986 QMAKE_SWITCHES
="$QMAKE_SWITCHES -d"
1990 elif [ "$VAL" = "no" ]; then
1991 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" |
grep ' -d' >/dev
/null
2>&1; then
1992 QMAKE_SWITCHES
=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2001 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2008 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2015 D_FLAGS
="$D_FLAGS \"$VAL\""
2018 I_FLAGS
="$I_FLAGS -I\"${VAL}\""
2021 L_FLAGS
="$L_FLAGS -L\"${VAL}\""
2024 RPATH_FLAGS
="$RPATH_FLAGS \"${VAL}\""
2027 l_FLAGS
="$l_FLAGS -l\"${VAL}\""
2030 if [ "$PLATFORM_MAC" = "yes" ]; then
2031 L_FLAGS
="$L_FLAGS -F\"${VAL}\""
2032 I_FLAGS
="$I_FLAGS -F\"${VAL}\""
2038 if [ "$PLATFORM_MAC" = "yes" ]; then
2039 l_FLAGS
="$l_FLAGS -framework \"${VAL}\""
2048 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2055 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2056 CFG_PHONON_BACKEND
="$VAL"
2062 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2063 CFG_MULTIMEDIA
="$VAL"
2072 if [ "$UNKNOWN_OPT" = "yes" ]; then
2073 echo "${CURRENT_OPT}: invalid command-line switch"
2079 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2080 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2084 # update QT_CONFIG to show our current predefined configuration
2085 case "$CFG_QCONFIG" in
2086 minimal|small|medium|large|full
)
2087 # these are a sequence of increasing functionality
2088 for c
in minimal small medium large full
; do
2089 QT_CONFIG
="$QT_CONFIG $c-config"
2090 [ "$CFG_QCONFIG" = $c ] && break
2094 # not known to be sufficient for anything
2095 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ]; then
2096 echo >&2 "Error: configuration file not found:"
2097 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2102 #-------------------------------------------------------------------------------
2103 # build tree initialization
2104 #-------------------------------------------------------------------------------
2106 # where to find which..
2107 unixtests
="$relpath/config.tests/unix"
2108 mactests
="$relpath/config.tests/mac"
2109 WHICH
="$unixtests/which.test"
2111 PERL
=`$WHICH perl 2>/dev/null`
2113 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2115 for e
in gawk nawk
awk; do
2116 if "$WHICH" $e >/dev
/null
2>&1 && ( $e -f /dev
/null
/dev
/null
) >/dev
/null
2>&1; then
2123 PERL
="/usr/bin/perl"
2124 if "$WHICH" perl
>/dev
/null
2>&1 && ( perl
/dev
/null
) >/dev
/null
2>&1; then
2128 ### skip this if the user just needs help...
2129 if [ "$OPT_HELP" != "yes" ]; then
2131 # is this a shadow build?
2132 if [ "$OPT_SHADOW" = "maybe" ]; then
2134 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2135 if [ -h "$outpath" ]; then
2136 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW
=yes
2142 if [ "$OPT_SHADOW" = "yes" ]; then
2143 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" ]; then
2144 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2145 echo >&2 "Cannot proceed."
2148 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2151 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2153 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2154 echo "By default, Qt is built in release mode with separate debug information, so"
2155 echo "-debug-and-release is not necessary anymore"
2159 # detect build style
2160 if [ "$CFG_DEBUG" = "auto" ]; then
2161 if [ "$PLATFORM_MAC" = "yes" ]; then
2162 CFG_DEBUG_RELEASE
=yes
2164 elif [ "$CFG_DEV" = "yes" ]; then
2165 CFG_DEBUG_RELEASE
=no
2168 CFG_DEBUG_RELEASE
=no
2172 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2173 QMAKE_CONFIG
="$QMAKE_CONFIG build_all"
2176 if [ "$CFG_SILENT" = "yes" ]; then
2177 QMAKE_CONFIG
="$QMAKE_CONFIG silent"
2180 # if the source tree is different from the build tree,
2181 # symlink or copy part of the sources
2182 if [ "$OPT_SHADOW" = "yes" ]; then
2183 echo "Preparing build tree..."
2185 if [ -z "$PERL" ]; then
2187 echo "You need perl in your PATH to make a shadow build."
2188 echo "Cannot proceed."
2192 [ -d "$outpath/bin" ] || mkdir
-p "$outpath/bin"
2194 # symlink the qmake directory
2195 find "$relpath/qmake" |
while read a
; do
2196 my_a
=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2197 if [ '!' -f "$my_a" ]; then
2198 if [ -d "$a" ]; then
2199 # directories are created...
2202 a_dir
=`dirname "$my_a"`
2203 [ -d "$a_dir" ] || mkdir
-p "$a_dir"
2204 # ... and files are symlinked
2205 case `basename "$a"` in
2206 *.o|
*.d|GNUmakefile
*|qmake
)
2217 # make a syncqt script that can be used in the shadow
2218 rm -f "$outpath/bin/syncqt"
2219 if [ -x "$relpath/bin/syncqt" ]; then
2220 mkdir
-p "$outpath/bin"
2221 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2222 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
2223 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" $*" >>"$outpath/bin/syncqt"
2224 chmod 755 "$outpath/bin/syncqt"
2227 # symlink the mkspecs directory
2228 mkdir
-p "$outpath/mkspecs"
2229 rm -f "$outpath"/mkspecs
/*
2230 ln -s "$relpath"/mkspecs
/* "$outpath/mkspecs"
2231 rm -f "$outpath/mkspecs/default"
2233 # symlink the doc directory
2234 rm -rf "$outpath/doc"
2235 ln -s "$relpath/doc" "$outpath/doc"
2237 # make sure q3porting.xml can be found
2238 mkdir
-p "$outpath/tools/porting/src"
2239 rm -f "$outpath/tools/porting/src/q3porting.xml"
2240 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2243 # symlink fonts to be able to run application from build directory
2244 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then
2245 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2246 mkdir
-p "${outpath}/lib"
2247 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2251 if [ "$OPT_FAST" = "auto" ]; then
2252 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2259 # find a make command
2260 if [ -z "$MAKE" ]; then
2262 for mk
in gmake
make; do
2263 if "$WHICH" $mk >/dev
/null
2>&1; then
2268 if [ -z "$MAKE" ]; then
2269 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2270 echo >&2 "Cannot proceed."
2273 # export MAKE, we need it later in the config.tests
2279 #-------------------------------------------------------------------------------
2280 # auto-detect all that hasn't been specified in the arguments
2281 #-------------------------------------------------------------------------------
2283 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED
=auto
2284 if [ "$CFG_EMBEDDED" != "no" ]; then
2285 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2287 [ -z "$PLATFORM" ] && PLATFORM
=qws
/macx-generic-g
++
2288 if [ -z "$XPLATFORM" ]; then
2289 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2290 XPLATFORM
="qws/macx-$CFG_EMBEDDED-g++"
2294 [ -z "$PLATFORM" ] && PLATFORM
=qws
/freebsd-generic-g
++
2295 if [ -z "$XPLATFORM" ]; then
2296 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2297 XPLATFORM
="qws/freebsd-$CFG_EMBEDDED-g++"
2301 [ -z "$PLATFORM" ] && PLATFORM
=qws
/solaris-generic-g
++
2302 if [ -z "$XPLATFORM" ]; then
2303 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2304 XPLATFORM
="qws/solaris-$CFG_EMBEDDED-g++"
2308 if [ -z "$PLATFORM" ]; then
2309 case "$UNAME_MACHINE" in
2311 PLATFORM
=qws
/linux-x86-g
++
2314 PLATFORM
=qws
/linux-x86_64-g
++
2317 PLATFORM
=qws
/linux-generic-g
++
2321 if [ -z "$XPLATFORM" ]; then
2322 if [ "$CFG_EMBEDDED" = "auto" ]; then
2323 if [ -n "$CFG_ARCH" ]; then
2324 CFG_EMBEDDED
=$CFG_ARCH
2326 case "$UNAME_MACHINE" in
2334 CFG_EMBEDDED
=generic
2339 XPLATFORM
="qws/linux-$CFG_EMBEDDED-g++"
2343 [ -z "$PLATFORM" ] && PLATFORM
=unsupported
/qws
/qnx-generic-g
++
2344 if [ -z "$XPLATFORM" ]; then
2345 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2346 XPLATFORM
="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2353 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2359 if [ -z "$PLATFORM" ]; then
2361 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2363 if [ "$PLATFORM_MAC" = "yes" ]; then
2365 # PLATFORM=macx-xcode
2372 #PLATFORM=aix-g++-64
2374 #PLATFORM=aix-xlc-64
2376 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2386 # PLATFORM=dynix-g++
2392 PLATFORM
=freebsd-g
++
2394 - Also available for FreeBSD: freebsd-icc
2398 PLATFORM
=openbsd-g
++
2409 #PLATFORM=irix-cc-64
2411 - Also available for IRIX: irix-g++ irix-cc-64
2415 case "$UNAME_MACHINE" in
2417 #PLATFORM=hpuxi-acc-32
2418 PLATFORM
=hpuxi-acc-64
2420 - Also available for HP-UXi: hpuxi-acc-32
2426 #PLATFORM=hpux-acc-64
2428 #PLATFORM=hpux-acc-o64
2430 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2439 - Also available for Tru64: tru64-g++
2443 case "$UNAME_MACHINE" in
2445 PLATFORM
=linux-g
++-64
2452 - Also available for Linux: linux-kcc linux-icc linux-cxx
2456 #PLATFORM=solaris-g++
2458 #PLATFORM=solaris-cc64
2460 - Also available for Solaris: solaris-g++ solaris-cc-64
2463 ReliantUNIX-
*:*|SINIX-
*:*)
2464 PLATFORM
=reliant-cds
2465 #PLATFORM=reliant-cds-64
2467 - Also available for Reliant UNIX: reliant-cds-64
2477 #PLATFORM=unixware-g++
2478 PLATFORM
=unixware-cc
2480 - Also available for OpenUNIX: unixware-g++
2484 #PLATFORM=unixware-g++
2485 PLATFORM
=unixware-cc
2487 - Also available for UnixWare: unixware-g++
2494 - Also available for SCO OpenServer: sco-g++
2498 PLATFORM
=unixware-g
++
2501 PLATFORM
=unsupported
/qnx-g
++
2504 if [ "$OPT_HELP" != "yes" ]; then
2506 for p
in $PLATFORMS; do
2507 echo " $relconf $* -platform $p"
2510 echo " The build script does not currently recognize all" >&2
2511 echo " platforms supported by Qt." >&2
2512 echo " Rerun this script with a -platform option listed to" >&2
2513 echo " set the system/compiler combination you use." >&2
2520 if [ "$PLATFORM_QWS" = "yes" ]; then
2522 PLATFORMS
=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2524 PLATFORMS
=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2527 [ -z "$XPLATFORM" ] && XPLATFORM
="$PLATFORM"
2528 if [ -d "$PLATFORM" ]; then
2529 QMAKESPEC
="$PLATFORM"
2531 QMAKESPEC
="$relpath/mkspecs/${PLATFORM}"
2533 if [ -d "$XPLATFORM" ]; then
2534 XQMAKESPEC
="$XPLATFORM"
2536 XQMAKESPEC
="$relpath/mkspecs/${XPLATFORM}"
2538 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2539 QT_CROSS_COMPILE
=yes
2540 QMAKE_CONFIG
="$QMAKE_CONFIG cross_compile"
2543 if [ "$PLATFORM_MAC" = "yes" ]; then
2544 if [ `basename $QMAKESPEC` = "macx-xcode" ] ||
[ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2546 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2547 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2548 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2549 echo " built with 'macx-g++'" >&2
2555 # check specified platforms are supported
2556 if [ '!' -d "$QMAKESPEC" ]; then
2558 echo " The specified system/compiler is not supported:"
2562 echo " Please see the README file for a complete list."
2566 if [ '!' -d "$XQMAKESPEC" ]; then
2568 echo " The specified system/compiler is not supported:"
2572 echo " Please see the README file for a complete list."
2576 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2578 echo " The specified system/compiler port is not complete:"
2580 echo " $XQMAKESPEC/qplatformdefs.h"
2582 echo " Please contact qt-bugs@trolltech.com."
2587 # now look at the configs and figure out what platform we are config'd for
2588 [ "$CFG_EMBEDDED" = "no" ] \
2589 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2591 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2593 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2594 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2595 if echo $UNAME_RELEASE |
grep "^5\.[5|6]" >/dev
/null
2>&1; then
2596 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2597 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2601 #-------------------------------------------------------------------------------
2602 # determine the system architecture
2603 #-------------------------------------------------------------------------------
2604 if [ "$OPT_VERBOSE" = "yes" ]; then
2605 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2608 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2609 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2611 echo "You have specified a target architecture with -embedded and -arch."
2612 echo "The two architectures you have specified are different, so we can"
2613 echo "not proceed. Either set both to be the same, or only use -embedded."
2619 if [ -z "${CFG_HOST_ARCH}" ]; then
2620 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2622 CFG_HOST_ARCH
=`uname -p`
2623 if [ "$OPT_VERBOSE" = "yes" ]; then
2624 echo " SGI ($CFG_HOST_ARCH)"
2628 case "$UNAME_MACHINE" in
2630 if [ "$OPT_VERBOSE" = "yes" ]; then
2631 echo " Sun SPARC (sparc)"
2638 if [ "$OPT_VERBOSE" = "yes" ]; then
2639 echo " 64-bit AMD 80x86 (x86_64)"
2641 CFG_HOST_ARCH
=x86_64
2644 if [ "$OPT_VERBOSE" = "yes" ]; then
2645 echo " 32-bit Intel 80x86 (i386)"
2653 case "$UNAME_MACHINE" in
2655 if [ "$OPT_VERBOSE" = "yes" ]; then
2656 echo " 32-bit Apple PowerPC (powerpc)"
2660 if [ "$OPT_VERBOSE" = "yes" ]; then
2661 echo " 32-bit Intel 80x86 (i386)"
2665 CFG_HOST_ARCH
=macosx
2668 if [ "$OPT_VERBOSE" = "yes" ]; then
2669 echo " 64-bit IBM PowerPC (powerpc)"
2671 CFG_HOST_ARCH
=powerpc
2674 if [ "$OPT_VERBOSE" = "yes" ]; then
2675 echo " HP PA-RISC (parisc)"
2677 CFG_HOST_ARCH
=parisc
2680 if [ "$OPT_VERBOSE" = "yes" ]; then
2681 echo " 32-bit Intel 80x86 (i386)"
2685 *:*:x86_64|
*:*:amd64
)
2686 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2687 if [ "$OPT_VERBOSE" = "yes" ]; then
2688 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2692 if [ "$OPT_VERBOSE" = "yes" ]; then
2693 echo " 64-bit AMD 80x86 (x86_64)"
2695 CFG_HOST_ARCH
=x86_64
2699 if [ "$OPT_VERBOSE" = "yes" ]; then
2700 echo " 32-bit PowerPC (powerpc)"
2702 CFG_HOST_ARCH
=powerpc
2705 if [ "$OPT_VERBOSE" = "yes" ]; then
2706 echo " 64-bit PowerPC (powerpc)"
2708 CFG_HOST_ARCH
=powerpc
2711 if [ "$OPT_VERBOSE" = "yes" ]; then
2712 echo " IBM S/390 (s390)"
2717 if [ "$OPT_VERBOSE" = "yes" ]; then
2723 if [ "$OPT_VERBOSE" = "yes" ]; then
2724 echo " Linux on SPARC"
2729 case "$UNAME_MACHINE" in
2731 if [ "$OPT_VERBOSE" = "yes" ]; then
2732 echo " QNX on Intel 80x86 (i386)"
2739 if [ "$OPT_VERBOSE" = "yes" ]; then
2740 echo " Trying '$UNAME_MACHINE'..."
2742 CFG_HOST_ARCH
="$UNAME_MACHINE"
2747 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2748 if [ -n "$CFG_ARCH" ]; then
2749 CFG_EMBEDDED
=$CFG_ARCH
2752 case "$CFG_EMBEDDED" in
2772 CFG_ARCH
="$CFG_EMBEDDED"
2775 elif [ "$PLATFORM_MAC" = "yes" ] ||
[ -z "$CFG_ARCH" ]; then
2776 CFG_ARCH
=$CFG_HOST_ARCH
2779 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
2780 if [ "$OPT_VERBOSE" = "yes" ]; then
2781 echo " '$CFG_ARCH' is supported"
2784 if [ "$OPT_VERBOSE" = "yes" ]; then
2785 echo " '$CFG_ARCH' is unsupported, using 'generic'"
2789 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
2790 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
2791 if [ "$OPT_VERBOSE" = "yes" ]; then
2792 echo " '$CFG_HOST_ARCH' is supported"
2795 if [ "$OPT_VERBOSE" = "yes" ]; then
2796 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
2798 CFG_HOST_ARCH
=generic
2802 if [ "$OPT_VERBOSE" = "yes" ]; then
2803 echo "System architecture: '$CFG_ARCH'"
2804 if [ "$PLATFORM_QWS" = "yes" ]; then
2805 echo "Host architecture: '$CFG_HOST_ARCH'"
2809 #-------------------------------------------------------------------------------
2810 # tests that don't need qmake (must be run before displaying help)
2811 #-------------------------------------------------------------------------------
2813 if [ -z "$PKG_CONFIG" ]; then
2814 # See if PKG_CONFIG is set in the mkspec:
2815 PKG_CONFIG
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
2817 if [ -z "$PKG_CONFIG" ]; then
2818 PKG_CONFIG
=`"$WHICH" pkg-config 2>/dev/null`
2821 # Work out if we can use pkg-config
2822 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2823 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2825 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2826 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2827 echo >&2 "environment!"
2829 if [ -z "$PKG_CONFIG_PATH" ]; then
2831 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2832 echo >&2 "the host compiler's .pc files will be used. This is probably"
2833 echo >&2 "not what you want."
2835 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2837 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2838 echo >&2 "been set. This means your toolchain's .pc files must contain"
2839 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2840 echo >&2 "tests are failing, please check these files."
2848 # process CFG_MAC_ARCHS
2849 if [ "$PLATFORM_MAC" = "yes" ]; then
2850 # check -arch arguments for validity.
2851 ALLOWED
="x86 ppc x86_64 ppc64 i386"
2852 # Save the list so we can re-write it using only valid values
2853 CFG_MAC_ARCHS_IN
="$CFG_MAC_ARCHS"
2855 for i
in $CFG_MAC_ARCHS_IN
2857 if echo "$ALLOWED" |
grep -w -v "$i" > /dev
/null
2>&1; then
2858 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
2861 if [ "$i" = "i386" -o "$i" = "x86" ]; then
2862 # These are synonymous values
2863 # CFG_MAC_ARCHS requires x86 while GCC requires i386
2864 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS x86"
2865 MAC_CONFIG_TEST_COMMANDLINE
="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
2867 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $i"
2868 MAC_CONFIG_TEST_COMMANDLINE
="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
2873 # pass on $CFG_SDK to the configure tests.
2874 if [ '!' -z "$CFG_SDK" ]; then
2875 MAC_CONFIG_TEST_COMMANDLINE
="-sdk $CFG_SDK"
2876 echo "tests command line: $MAC_CONFIG_TEST_COMMANDLINE"
2879 # find the default framework value
2880 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2881 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2882 CFG_FRAMEWORK
="$CFG_SHARED"
2883 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2885 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2893 QMAKE_CONF_COMPILER
=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
2895 [ -z "$TEST_COMPILER" ] && TEST_COMPILER
=$QMAKE_CONF_COMPILER
2897 # auto-detect precompiled header support
2898 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2899 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2901 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2906 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2908 echo "WARNING: Using universal binaries disables precompiled headers."
2913 #auto-detect DWARF2 on the mac
2914 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2915 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2922 # auto-detect support for -Xarch on the mac
2923 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
2924 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2931 # don't autodetect support for separate debug info on objcopy when
2932 # cross-compiling as lots of toolchains seems to have problems with this
2933 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2934 CFG_SEPARATE_DEBUG_INFO
="no"
2937 # auto-detect support for separate debug info in objcopy
2938 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2939 TEST_COMPILER_CFLAGS
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_].*=%%p' | tr '\n' ' '`
2940 TEST_COMPILER_CXXFLAGS
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_].*=%%p' | tr '\n' ' '`
2941 TEST_OBJCOPY
=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
2942 COMPILER_WITH_FLAGS
="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2943 COMPILER_WITH_FLAGS
=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2944 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2945 CFG_SEPARATE_DEBUG_INFO
=no
2949 # binutils on HP-UX is buggy; default to no.
2950 CFG_SEPARATE_DEBUG_INFO
=no
2953 CFG_SEPARATE_DEBUG_INFO
=yes
2959 # auto-detect -fvisibility support
2960 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2961 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2962 CFG_REDUCE_EXPORTS
=no
2964 CFG_REDUCE_EXPORTS
=yes
2968 # detect the availability of the -Bsymbolic-functions linker optimization
2969 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2970 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2971 CFG_REDUCE_RELOCATIONS
=no
2973 CFG_REDUCE_RELOCATIONS
=yes
2977 # auto-detect GNU make support
2978 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v |
grep "GNU Make" >/dev
/null
2>&1; then
2982 # If -opengl wasn't specified, don't try to auto-detect
2983 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
2988 if [ "$PLATFORM_MAC" = "yes" ]; then
2989 if [ "$CFG_OPENGL" = "auto" ] ||
[ "$CFG_OPENGL" = "yes" ]; then
2994 # find the default framework value
2995 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2996 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2997 CFG_FRAMEWORK
="$CFG_SHARED"
2998 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3000 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3008 # x11 tests are done after qmake is built
3011 #setup the build parts
3012 if [ -z "$CFG_BUILD_PARTS" ]; then
3013 CFG_BUILD_PARTS
="$QT_DEFAULT_BUILD_PARTS"
3015 # don't build tools by default when cross-compiling
3016 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3017 CFG_BUILD_PARTS
=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3020 for nobuild
in $CFG_NOBUILD_PARTS; do
3021 CFG_BUILD_PARTS
=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3023 if echo $CFG_BUILD_PARTS |
grep -v libs
>/dev
/null
2>&1; then
3025 # echo "WARNING: libs is a required part of the build."
3027 CFG_BUILD_PARTS
="$CFG_BUILD_PARTS libs"
3030 #-------------------------------------------------------------------------------
3031 # post process QT_INSTALL_* variables
3032 #-------------------------------------------------------------------------------
3035 if [ -z "$QT_INSTALL_PREFIX" ]; then
3036 if [ "$CFG_DEV" = "yes" ]; then
3037 QT_INSTALL_PREFIX
="$outpath" # In Development, we use sandboxed builds by default
3038 elif [ "$PLATFORM_QWS" = "yes" ]; then
3039 QT_INSTALL_PREFIX
="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
3040 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3041 QT_INSTALL_PREFIX
="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
3044 QT_INSTALL_PREFIX
="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
3047 QT_INSTALL_PREFIX
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3050 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3051 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3052 if [ "$PLATFORM_MAC" = "yes" ]; then
3053 QT_INSTALL_DOCS
="/Developer/Documentation/Qt"
3056 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS
="$QT_INSTALL_PREFIX/doc" #fallback
3059 QT_INSTALL_DOCS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3062 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3063 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3064 if [ "$PLATFORM_MAC" = "yes" ]; then
3065 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3070 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS
="$QT_INSTALL_PREFIX/include"
3073 QT_INSTALL_HEADERS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3076 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3077 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3078 if [ "$PLATFORM_MAC" = "yes" ]; then
3079 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3080 QT_INSTALL_LIBS
="/Libraries/Frameworks"
3084 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS
="$QT_INSTALL_PREFIX/lib" #fallback
3086 QT_INSTALL_LIBS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3089 if [ -z "$QT_INSTALL_BINS" ]; then #default
3090 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3091 if [ "$PLATFORM_MAC" = "yes" ]; then
3092 QT_INSTALL_BINS
="/Developer/Applications/Qt"
3095 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS
="$QT_INSTALL_PREFIX/bin" #fallback
3098 QT_INSTALL_BINS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3101 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3102 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3103 if [ "$PLATFORM_MAC" = "yes" ]; then
3104 QT_INSTALL_PLUGINS
="/Developer/Applications/Qt/plugins"
3107 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS
="$QT_INSTALL_PREFIX/plugins" #fallback
3109 QT_INSTALL_PLUGINS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3112 if [ -z "$QT_INSTALL_DATA" ]; then #default
3113 QT_INSTALL_DATA
="$QT_INSTALL_PREFIX"
3115 QT_INSTALL_DATA
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3118 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3119 QT_INSTALL_TRANSLATIONS
="$QT_INSTALL_PREFIX/translations"
3121 QT_INSTALL_TRANSLATIONS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3124 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3125 if [ "$PLATFORM_MAC" = "yes" ]; then
3126 QT_INSTALL_SETTINGS
=/Library
/Preferences
/Qt
3128 QT_INSTALL_SETTINGS
=/etc
/xdg
3131 QT_INSTALL_SETTINGS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3134 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3135 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3136 if [ "$PLATFORM_MAC" = "yes" ]; then
3137 QT_INSTALL_EXAMPLES
="/Developer/Examples/Qt"
3140 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES
="$QT_INSTALL_PREFIX/examples" #fallback
3142 QT_INSTALL_EXAMPLES
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3145 if [ -z "$QT_INSTALL_DEMOS" ]; then #default
3146 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3147 if [ "$PLATFORM_MAC" = "yes" ]; then
3148 QT_INSTALL_DEMOS
="/Developer/Examples/Qt/Demos"
3151 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS
="$QT_INSTALL_PREFIX/demos"
3153 QT_INSTALL_DEMOS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
3155 #-------------------------------------------------------------------------------
3156 # help - interactive parts of the script _after_ this section please
3157 #-------------------------------------------------------------------------------
3159 # next, emit a usage message if something failed.
3160 if [ "$OPT_HELP" = "yes" ]; then
3161 [ "x$ERROR" = "xyes" ] && echo
3162 if [ "$CFG_NIS" = "no" ]; then
3169 if [ "$CFG_CUPS" = "no" ]; then
3176 if [ "$CFG_ICONV" = "no" ]; then
3183 if [ "$CFG_LARGEFILE" = "no" ]; then
3190 if [ "$CFG_STL" = "auto" ] ||
[ "$CFG_STL" = "yes" ]; then
3197 if [ "$CFG_IPV6" = "auto" ]; then
3201 if [ "$CFG_PRECOMPILE" = "auto" ] ||
[ "$CFG_PRECOMPILE" = "no" ]; then
3210 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3211 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
3212 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3213 [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
3214 [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3215 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3216 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3217 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3218 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3219 [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3220 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3221 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3222 [-no-make <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3223 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3224 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
3225 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3226 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3227 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3228 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3229 [-no-openssl] [-openssl] [-openssl-linked]
3230 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
3231 [-no-script] [-script] [-no-scripttools] [-scripttools]
3233 [additional platform specific options (see below)]
3236 Installation options:
3238 These are optional, but you may specify install directories.
3240 -prefix <dir> ...... This will install everything relative to <dir>
3241 (default $QT_INSTALL_PREFIX)
3243 if [ "$PLATFORM_QWS" = "yes" ]; then
3246 -hostprefix [dir] .. Tools and libraries needed when developing
3247 applications are installed in [dir]. If [dir] is
3248 not given, the current build directory will be used.
3253 * -prefix-install .... Force a sandboxed "local" installation of
3254 Qt. This will install into
3255 $QT_INSTALL_PREFIX, if this option is
3256 disabled then some platforms will attempt a
3257 "system" install by placing default values to
3258 be placed in a system location other than
3261 You may use these to separate different parts of the install:
3263 -bindir <dir> ......... Executables will be installed to <dir>
3264 (default PREFIX/bin)
3265 -libdir <dir> ......... Libraries will be installed to <dir>
3266 (default PREFIX/lib)
3267 -docdir <dir> ......... Documentation will be installed to <dir>
3268 (default PREFIX/doc)
3269 -headerdir <dir> ...... Headers will be installed to <dir>
3270 (default PREFIX/include)
3271 -plugindir <dir> ...... Plugins will be installed to <dir>
3272 (default PREFIX/plugins)
3273 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3275 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3276 (default PREFIX/translations)
3277 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3278 (default PREFIX/etc/settings)
3279 -examplesdir <dir> .... Examples will be installed to <dir>
3280 (default PREFIX/examples)
3281 -demosdir <dir> ....... Demos will be installed to <dir>
3282 (default PREFIX/demos)
3284 You may use these options to turn on strict plugin loading.
3286 -buildkey <key> .... Build the Qt library and plugins using the specified
3287 <key>. When the library loads plugins, it will only
3288 load those that have a matching key.
3292 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3293 that needs to be evaluated. If the evaluation succeeds, the feature is
3294 included. Here is a short explanation of each option:
3296 * -release ........... Compile and link Qt with debugging turned off.
3297 -debug ............. Compile and link Qt with debugging turned on.
3298 -debug-and-release . Compile and link two versions of Qt, with and without
3299 debugging turned on (Mac only).
3301 -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting)
3303 -opensource......... Compile and link the Open-Source Edition of Qt.
3304 -commercial......... Compile and link the Commercial Edition of Qt.
3307 * -shared ............ Create and use shared Qt libraries.
3308 -static ............ Create and use static Qt libraries.
3310 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3312 -fast .............. Configure Qt quickly by generating Makefiles only for
3313 library and subdirectory targets. All other Makefiles
3314 are created as wrappers, which will in turn run qmake.
3316 -no-largefile ...... Disables large file support.
3317 + -largefile ......... Enables Qt to access files larger than 4 GB.
3320 if [ "$PLATFORM_QWS" = "yes" ]; then
3327 if [ "$CFG_DBUS" = "no" ]; then
3336 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3337 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3339 -no-accessibility .. Do not compile Accessibility support.
3340 * -accessibility ..... Compile Accessibility support.
3342 $SHN -no-stl ............ Do not compile STL support.
3343 $SHY -stl ............... Compile STL support.
3345 -no-sql-<driver> ... Disable SQL <driver> entirely.
3346 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3348 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3351 Possible values for <driver>:
3352 [ $CFG_SQL_AVAILABLE ]
3354 -system-sqlite ..... Use sqlite from the operating system.
3356 -no-qt3support ..... Disables the Qt 3 support functionality.
3357 * -qt3support ........ Enables the Qt 3 support functionality.
3359 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3360 + -xmlpatterns ....... Build the QtXmlPatterns module.
3361 QtXmlPatterns is built if a decent C++ compiler
3362 is used and exceptions are enabled.
3364 -no-multimedia ..... Do not build the QtMultimedia module.
3365 + -multimedia ........ Build the QtMultimedia module.
3367 -no-phonon ......... Do not build the Phonon module.
3368 + -phonon ............ Build the Phonon module.
3369 Phonon is built if a decent C++ compiler is used.
3370 -no-phonon-backend.. Do not build the platform phonon plugin.
3371 + -phonon-backend..... Build the platform phonon plugin.
3373 -no-svg ............ Do not build the SVG module.
3374 + -svg ............... Build the SVG module.
3376 -no-webkit ......... Do not build the WebKit module.
3377 + -webkit ............ Build the WebKit module.
3378 WebKit is built if a decent C++ compiler is used.
3380 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3381 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3383 -no-script ......... Do not build the QtScript module.
3384 + -script ............ Build the QtScript module.
3386 -no-scripttools .... Do not build the QtScriptTools module.
3387 + -scripttools ....... Build the QtScriptTools module.
3389 -platform target ... The operating system and compiler you are building
3392 See the README file for a list of supported
3393 operating systems and compilers.
3395 if [ "${PLATFORM_QWS}" != "yes" ]; then
3397 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3398 raster - Software rasterizer
3399 opengl - Rendering via OpenGL, Experimental!
3404 -no-mmx ............ Do not compile with use of MMX instructions.
3405 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3406 -no-sse ............ Do not compile with use of SSE instructions.
3407 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3409 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3410 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3412 -D <string> ........ Add an explicit define to the preprocessor.
3413 -I <string> ........ Add an explicit include path.
3414 -L <string> ........ Add an explicit library path.
3416 -help, -h .......... Display this information.
3418 Third Party Libraries:
3420 -qt-zlib ........... Use the zlib bundled with Qt.
3421 + -system-zlib ....... Use zlib from the operating system.
3422 See http://www.gzip.org/zlib
3424 -no-gif ............ Do not compile the plugin for GIF reading support.
3425 * -qt-gif ............ Compile the plugin for GIF reading support.
3426 See also src/plugins/imageformats/gif/qgifhandler.h
3428 -no-libtiff ........ Do not compile the plugin for TIFF support.
3429 -qt-libtiff ........ Use the libtiff bundled with Qt.
3430 + -system-libtiff .... Use libtiff from the operating system.
3431 See http://www.libtiff.org
3433 -no-libpng ......... Do not compile in PNG support.
3434 -qt-libpng ......... Use the libpng bundled with Qt.
3435 + -system-libpng ..... Use libpng from the operating system.
3436 See http://www.libpng.org/pub/png
3438 -no-libmng ......... Do not compile the plugin for MNG support.
3439 -qt-libmng ......... Use the libmng bundled with Qt.
3440 + -system-libmng ..... Use libmng from the operating system.
3441 See http://www.libmng.com
3443 -no-libjpeg ........ Do not compile the plugin for JPEG support.
3444 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3445 + -system-libjpeg .... Use libjpeg from the operating system.
3446 See http://www.ijg.org
3448 -no-openssl ........ Do not compile support for OpenSSL.
3449 + -openssl ........... Enable run-time OpenSSL support.
3450 -openssl-linked .... Enabled linked OpenSSL support.
3452 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3457 -make <part> ....... Add part to the list of parts to be built at make time.
3458 ($QT_DEFAULT_BUILD_PARTS)
3459 -nomake <part> ..... Exclude part from the list of parts to be built.
3461 -R <string> ........ Add an explicit runtime library path to the Qt
3463 -l <string> ........ Add an explicit library.
3465 -no-rpath .......... Do not use the library install path as a runtime
3467 + -rpath ............. Link Qt libraries and executables using the library
3468 install path as a runtime library path. Equivalent
3469 to -R install_libpath
3471 -continue .......... Continue as far as possible if an error occurs.
3473 -verbose, -v ....... Print verbose information about each step of the
3476 -silent ............ Reduce the build output so that warnings and errors
3477 can be seen more easily.
3479 * -no-optimized-qmake ... Do not build qmake optimized.
3480 -optimized-qmake ...... Build qmake optimized.
3482 $NSN -no-nis ............ Do not compile NIS support.
3483 $NSY -nis ............... Compile NIS support.
3485 $CUN -no-cups ........... Do not compile CUPS support.
3486 $CUY -cups .............. Compile CUPS support.
3487 Requires cups/cups.h and libcups.so.2.
3489 $CIN -no-iconv .......... Do not compile support for iconv(3).
3490 $CIY -iconv ............. Compile support for iconv(3).
3492 $PHN -no-pch ............ Do not use precompiled header support.
3493 $PHY -pch ............... Use precompiled header support.
3495 $DBN -no-dbus ........... Do not compile the QtDBus module.
3496 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3497 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3499 -reduce-relocations ..... Reduce relocations in the libraries through extra
3500 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3501 experimental; needs GNU ld >= 2.18).
3504 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3505 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3512 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3520 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
3524 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3525 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3531 if [ "$PLATFORM_X11" = "yes" ]; then
3532 if [ "$CFG_SM" = "no" ]; then
3539 if [ "$CFG_XSHAPE" = "no" ]; then
3546 if [ "$CFG_XINERAMA" = "no" ]; then
3553 if [ "$CFG_FONTCONFIG" = "no" ]; then
3560 if [ "$CFG_XCURSOR" = "no" ]; then
3567 if [ "$CFG_XFIXES" = "no" ]; then
3574 if [ "$CFG_XRANDR" = "no" ]; then
3581 if [ "$CFG_XRENDER" = "no" ]; then
3588 if [ "$CFG_MITSHM" = "no" ]; then
3595 if [ "$CFG_XINPUT" = "no" ]; then
3602 if [ "$CFG_XKB" = "no" ]; then
3609 if [ "$CFG_IM" = "no" ]; then
3620 -no-gtkstyle ....... Do not build the GTK theme integration.
3621 + -gtkstyle .......... Build the GTK theme integration.
3623 * -no-nas-sound ...... Do not compile in NAS sound support.
3624 -system-nas-sound .. Use NAS libaudio from the operating system.
3625 See http://radscan.com/nas.html
3627 -no-opengl ......... Do not support OpenGL.
3628 + -opengl <api> ...... Enable OpenGL support.
3629 With no parameter, this will auto-detect the "best"
3630 OpenGL API to use. If desktop OpenGL is avaliable, it
3631 will be used. Use desktop, es1, es1cl or es2 for <api>
3632 to force the use of the Desktop (OpenGL 1.x or 2.x),
3633 OpenGL ES 1.x Common profile, 1.x Common Lite profile
3634 or 2.x APIs instead. On X11, the EGL API will be used
3635 to manage GL contexts in the case of OpenGL ES
3637 -no-openvg ........ Do not support OpenVG.
3638 + -openvg ........... Enable OpenVG support.
3639 Requires EGL support, typically supplied by an OpenGL
3640 or other graphics implementation.
3642 $SMN -no-sm ............. Do not support X Session Management.
3643 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3645 $SHN -no-xshape ......... Do not compile XShape support.
3646 $SHY -xshape ............ Compile XShape support.
3647 Requires X11/extensions/shape.h.
3649 $SHN -no-xsync .......... Do not compile XSync support.
3650 $SHY -xsync ............. Compile XSync support.
3651 Requires X11/extensions/sync.h.
3653 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3654 $XAY -xinerama .......... Compile Xinerama support.
3655 Requires X11/extensions/Xinerama.h and libXinerama.
3656 By default, Xinerama support will be compiled if
3657 available and the shared libraries are dynamically
3660 $XCN -no-xcursor ........ Do not compile Xcursor support.
3661 $XCY -xcursor ........... Compile Xcursor support.
3662 Requires X11/Xcursor/Xcursor.h and libXcursor.
3663 By default, Xcursor support will be compiled if
3664 available and the shared libraries are dynamically
3667 $XFN -no-xfixes ......... Do not compile Xfixes support.
3668 $XFY -xfixes ............ Compile Xfixes support.
3669 Requires X11/extensions/Xfixes.h and libXfixes.
3670 By default, Xfixes support will be compiled if
3671 available and the shared libraries are dynamically
3674 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3675 $XZY -xrandr ............ Compile Xrandr support.
3676 Requires X11/extensions/Xrandr.h and libXrandr.
3678 $XRN -no-xrender ........ Do not compile Xrender support.
3679 $XRY -xrender ........... Compile Xrender support.
3680 Requires X11/extensions/Xrender.h and libXrender.
3682 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3683 $XMY -mitshm ............ Compile MIT-SHM support.
3684 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3686 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3687 $FCGY -fontconfig ........ Compile FontConfig support.
3688 Requires fontconfig/fontconfig.h, libfontconfig,
3689 freetype.h and libfreetype.
3691 $XIN -no-xinput.......... Do not compile Xinput support.
3692 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3693 which requires IRIX with wacom.h and libXi or
3694 XFree86 with X11/extensions/XInput.h and libXi.
3696 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3697 $XKY -xkb ............... Compile XKB support.
3702 if [ "$PLATFORM_MAC" = "yes" ]; then
3707 -Fstring ........... Add an explicit framework path.
3708 -fw string ......... Add an explicit framework.
3710 -cocoa ............. Build the Cocoa version of Qt. Note that -no-framework
3711 and -static is not supported with -cocoa. Specifying
3712 this option creates Qt binaries that requires Mac OS X
3715 * -framework ......... Build Qt as a series of frameworks and
3716 link tools against those frameworks.
3717 -no-framework ...... Do not build Qt as a series of frameworks.
3719 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3720 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3722 -universal ......... Equivalent to -arch "ppc x86"
3724 -arch <arch> ....... Build Qt for <arch>
3725 Example values for <arch>: x86 ppc x86_64 ppc64
3726 Multiple -arch arguments can be specified, 64-bit archs
3727 will be built with the Cocoa framework.
3729 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3730 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3735 if [ "$PLATFORM_QWS" = "yes" ]; then
3738 Qt for Embedded Linux only:
3740 -xplatform target ... The target platform when cross-compiling.
3742 -no-feature-<feature> Do not compile in <feature>.
3743 -feature-<feature> .. Compile in <feature>. The available features
3744 are described in src/corelib/global/qfeatures.txt
3746 -embedded <arch> .... This will enable the embedded build, you must have a
3747 proper license for this switch to work.
3748 Example values for <arch>: arm mips x86 generic
3750 -armfpa ............. Target platform uses the ARM-FPA floating point format.
3751 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3753 The floating point format is usually autodetected by configure. Use this
3754 to override the detected value.
3756 -little-endian ...... Target platform is little endian (LSB first).
3757 -big-endian ......... Target platform is big endian (MSB first).
3759 -host-little-endian . Host platform is little endian (LSB first).
3760 -host-big-endian .... Host platform is big endian (MSB first).
3762 You only need to specify the endianness when
3763 cross-compiling, otherwise the host
3764 endianness will be used.
3766 -no-freetype ........ Do not compile in Freetype2 support.
3767 -qt-freetype ........ Use the libfreetype bundled with Qt.
3768 * -system-freetype .... Use libfreetype from the operating system.
3769 See http://www.freetype.org/
3771 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3772 default ($CFG_QCONFIG).
3774 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3775 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3777 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3778 by default all available decorations are on.
3779 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3780 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3781 linked to at run time.
3782 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3783 -no-decoration-<style> ....Disable decoration <style> entirely.
3784 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3786 -no-opengl .......... Do not support OpenGL.
3787 -opengl <api> ....... Enable OpenGL ES support
3788 With no parameter, this will attempt to auto-detect OpenGL ES 1.x
3789 or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection.
3791 NOTE: A QGLScreen driver for the hardware is required to support
3792 OpenGL ES on Qt for Embedded Linux.
3794 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3795 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3796 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3797 linked to at run time.
3798 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3799 -no-gfx-<driver> ... Disable graphics <driver> entirely.
3800 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3802 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
3803 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3805 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
3807 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
3809 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
3810 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3812 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
3813 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3814 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
3816 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
3817 -no-mouse-<driver> ... Disable mouse <driver> entirely.
3818 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3820 -iwmmxt ............ Compile using the iWMMXt instruction set
3821 (available on some XScale CPUs).
3827 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3828 if [ "$CFG_GLIB" = "no" ]; then
3836 $GBN -no-glib ........... Do not compile Glib support.
3837 $GBY -glib .............. Compile Glib support.
3842 [ "x$ERROR" = "xyes" ] && exit 1
3847 # -----------------------------------------------------------------------------
3848 # LICENSING, INTERACTIVE PART
3849 # -----------------------------------------------------------------------------
3851 if [ "$PLATFORM_QWS" = "yes" ]; then
3852 Platform
="Qt for Embedded Linux"
3853 elif [ "$PLATFORM_MAC" = "yes" ]; then
3861 echo "This is the $Platform ${EditionString} Edition."
3864 if [ "$Edition" = "NokiaInternalBuild" ]; then
3865 echo "Detected -nokia-developer option"
3866 echo "Nokia employees and agents are allowed to use this software under"
3867 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
3868 elif [ "$Edition" = "OpenSource" ]; then
3870 echo "You are licensed to use this software under the terms of"
3871 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3872 if [ -f "$relpath/LICENSE.GPL3" ]; then
3873 echo "You are also licensed to use this software under the terms of"
3874 echo "the GNU General Public License (GPL) versions 3."
3880 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3881 echo "You have already accepted the terms of the $LicenseType license."
3884 if [ -f "$relpath/LICENSE.GPL3" ]; then
3885 echo "Type '3' to view the GNU General Public License version 3."
3887 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3888 echo "Type 'yes' to accept this license offer."
3889 echo "Type 'no' to decline this license offer."
3891 if echo '\c' |
grep '\c' >/dev
/null
; then
3892 echo -n "Do you accept the terms of $affix license? "
3894 echo "Do you accept the terms of $affix license? \c"
3899 if [ "$acceptance" = "yes" ] ||
[ "$acceptance" = "y" ]; then
3901 elif [ "$acceptance" = "no" ]; then
3902 echo "You are not licensed to use this software."
3905 elif [ "$acceptance" = "3" ]; then
3906 more "$relpath/LICENSE.GPL3"
3907 elif [ "$acceptance" = "L" ]; then
3908 more "$relpath/LICENSE.LGPL"
3911 elif [ "$Edition" = "Preview" ]; then
3912 TheLicense
=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3915 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3916 echo "You have already accepted the terms of the $LicenseType license."
3919 echo "You are licensed to use this software under the terms of"
3920 echo "the $TheLicense"
3922 echo "Type '?' to read the Preview License."
3923 echo "Type 'yes' to accept this license offer."
3924 echo "Type 'no' to decline this license offer."
3926 if echo '\c' |
grep '\c' >/dev
/null
; then
3927 echo -n "Do you accept the terms of the license? "
3929 echo "Do you accept the terms of the license? \c"
3934 if [ "$acceptance" = "yes" ]; then
3936 elif [ "$acceptance" = "no" ] ;then
3937 echo "You are not licensed to use this software."
3940 elif [ "$acceptance" = "?" ]; then
3941 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3944 elif [ "$Edition" != "OpenSource" ]; then
3945 if [ -n "$ExpiryDate" ]; then
3946 ExpiryDate
=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3947 [ -z "$ExpiryDate" ] && ExpiryDate
="0"
3948 Today
=`date +%Y%m%d`
3949 if [ "$Today" -gt "$ExpiryDate" ]; then
3950 case "$LicenseType" in
3951 Commercial|Academic|Educational
)
3952 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3954 echo "NOTICE NOTICE NOTICE NOTICE"
3956 echo " Your support and upgrade period has expired."
3958 echo " You are no longer licensed to use this version of Qt."
3959 echo " Please contact qt-info@nokia.com to renew your support"
3960 echo " and upgrades for this license."
3962 echo "NOTICE NOTICE NOTICE NOTICE"
3967 echo "WARNING WARNING WARNING WARNING"
3969 echo " Your support and upgrade period has expired."
3971 echo " You may continue to use your last licensed release"
3972 echo " of Qt under the terms of your existing license"
3973 echo " agreement. But you are not entitled to technical"
3974 echo " support, nor are you entitled to use any more recent"
3975 echo " Qt releases."
3977 echo " Please contact qt-info@nokia.com to renew your"
3978 echo " support and upgrades for this license."
3980 echo "WARNING WARNING WARNING WARNING"
3987 echo "NOTICE NOTICE NOTICE NOTICE"
3989 echo " Your Evaluation license has expired."
3991 echo " You are no longer licensed to use this software. Please"
3992 echo " contact qt-info@nokia.com to purchase license, or install"
3993 echo " the Qt Open Source Edition if you intend to develop free"
3996 echo "NOTICE NOTICE NOTICE NOTICE"
4003 TheLicense
=`head -n 1 "$outpath/LICENSE"`
4005 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4006 echo "You have already accepted the terms of the $TheLicense."
4009 echo "You are licensed to use this software under the terms of"
4010 echo "the $TheLicense."
4012 echo "Type '?' to view the $TheLicense."
4013 echo "Type 'yes' to accept this license offer."
4014 echo "Type 'no' to decline this license offer."
4016 if echo '\c' |
grep '\c' >/dev
/null
; then
4017 echo -n "Do you accept the terms of the $TheLicense? "
4019 echo "Do you accept the terms of the $TheLicense? \c"
4024 if [ "$acceptance" = "yes" ]; then
4026 elif [ "$acceptance" = "no" ]; then
4027 echo "You are not licensed to use this software."
4030 else [ "$acceptance" = "?" ]
4031 more "$outpath/LICENSE"
4036 # this should be moved somewhere else
4039 AIX_VERSION
=`uname -v`
4040 if [ "$AIX_VERSION" -lt "5" ]; then
4041 QMakeVar add QMAKE_LIBS_X11
-lbind
4048 #-------------------------------------------------------------------------------
4049 # generate qconfig.cpp
4050 #-------------------------------------------------------------------------------
4051 [ -d "$outpath/src/corelib/global" ] || mkdir
-p "$outpath/src/corelib/global"
4053 LICENSE_USER_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4054 LICENSE_PRODUCTS_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4055 PREFIX_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4056 DOCUMENTATION_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4057 HEADERS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4058 LIBRARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4059 BINARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4060 PLUGINS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4061 DATA_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4062 TRANSLATIONS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4063 SETTINGS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4064 EXAMPLES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4065 DEMOS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4067 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4069 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4070 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4073 if [ ! -z "$QT_HOST_PREFIX" ]; then
4074 HOSTPREFIX_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4075 HOSTDOCUMENTATION_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4076 HOSTHEADERS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4077 HOSTLIBRARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4078 HOSTBINARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4079 HOSTPLUGINS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4080 HOSTDATA_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4081 HOSTTRANSLATIONS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4082 HOSTSETTINGS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4083 HOSTEXAMPLES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4084 HOSTDEMOS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4086 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4088 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4089 /* Installation Info */
4090 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4091 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4092 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4093 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4094 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4095 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4096 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4097 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4098 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4099 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4100 static const char qt_configure_demos_path_str [256 + 12] = "$HOSTDEMOS_PATH_STR";
4101 #else // QT_BOOTSTRAPPED
4105 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4106 /* Installation Info */
4107 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4108 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4109 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4110 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4111 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4112 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4113 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4114 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4115 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4116 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4117 static const char qt_configure_demos_path_str [256 + 12] = "$DEMOS_PATH_STR";
4120 if [ ! -z "$QT_HOST_PREFIX" ]; then
4121 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4122 #endif // QT_BOOTSTRAPPED
4127 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4128 /* strlen( "qt_lcnsxxxx" ) == 12 */
4129 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4130 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4131 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4132 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4133 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4134 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4135 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4136 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4137 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4138 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4139 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4140 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4141 #define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;
4144 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4145 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4146 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4148 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w
"$outpath/src/corelib/global/qconfig.cpp"
4149 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4150 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4153 # -----------------------------------------------------------------------------
4155 # -----------------------------------------------------------------------------
4158 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4160 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS
="$SYNCQT_OPTS -check-includes"
4161 if [ "$OPT_SHADOW" = "yes" ]; then
4162 "$outpath/bin/syncqt" $SYNCQT_OPTS
4163 elif [ "$CFG_DEV" = "yes" ] ||
[ ! -d $relpath/include
]; then
4164 QTDIR
="$relpath" perl
"$outpath/bin/syncqt" $SYNCQT_OPTS
4169 # $2: optional transformation
4170 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4171 # is where the resulting variable is written to
4172 setBootstrapVariable
()
4174 variableRegExp
="^$1[^_A-Z0-9]"
4175 getQMakeConf |
grep "$variableRegExp" |
( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) |
$AWK '
4177 varLength = index($0, "=") - 1
4178 valStart = varLength + 2
4179 if (substr($0, varLength, 1) == "+") {
4180 varLength = varLength - 1
4181 valStart = valStart + 1
4183 var = substr($0, 0, varLength)
4184 gsub("[ \t]+", "", var)
4185 val = substr($0, valStart)
4186 printf "%s_%s = %s\n", var, NR, val
4189 if (length(var) > 0) {
4191 for (i = 1; i <= NR; ++i)
4192 printf " $(%s_%s)", var, i
4199 if true
; then ###[ '!' -f "$outpath/bin/qmake" ];
4200 echo "Creating qmake. Please wait..."
4203 QCONFIG_H
="$outpath/src/corelib/global/qconfig.h"
4204 QMAKE_QCONFIG_H
="${QCONFIG_H}.qmake"
4205 if [ -f "$QCONFIG_H" ]; then
4206 OLD_QCONFIG_H
=$QCONFIG_H
4207 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4210 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4211 # when building qmake, we use #defines for the install paths,
4212 # however they are real functions in the library
4213 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4214 mkdir
-p "$outpath/src/corelib/global"
4215 [ -f "$QCONFIG_H" ] && chmod +w
"$QCONFIG_H"
4216 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4219 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4220 for conf
in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
4221 if [ '!' -f "$conf" ]; then
4222 ln -s "$QCONFIG_H" "$conf"
4226 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4227 rm -f mkspecs
/default
4228 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs
/default
4230 for mkfile
in GNUmakefile Makefile
; do
4233 in_mkfile
="${mkfile}.in"
4234 if [ "$mkfile" = "Makefile" ]; then
4235 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4236 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4238 in_mkfile
="${mkfile}.unix"
4240 in_mkfile
="$relpath/qmake/$in_mkfile"
4241 mkfile
="$outpath/qmake/$mkfile"
4242 if [ -f "$mkfile" ]; then
4243 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags
>/dev
/null
2>&1 && chflags nouchg
"$mkfile"
4246 [ -f "$in_mkfile" ] ||
continue
4248 echo "########################################################################" > "$mkfile"
4249 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4250 echo "########################################################################" >> "$mkfile"
4253 EXTRA_CFLAGS
="\$(QMAKE_CFLAGS)"
4254 EXTRA_CXXFLAGS
="\$(QMAKE_CXXFLAGS)"
4255 EXTRA_LFLAGS
="\$(QMAKE_LFLAGS)"
4257 if [ "$PLATFORM" = "irix-cc" ] ||
[ "$PLATFORM" = "irix-cc-64" ]; then
4258 EXTRA_LFLAGS
="$EXTRA_LFLAGS -lm"
4261 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4262 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4263 if [ "$CFG_SILENT" = "yes" ]; then
4264 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC
's,QMAKE_CC.*=,CC=\@,'
4265 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX
's,QMAKE_CXX.*=,CXX=\@,'
4267 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC
's,QMAKE_CC,CC,'
4268 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX
's,QMAKE_CXX,CXX,'
4270 setBootstrapVariable QMAKE_CFLAGS
4271 setBootstrapVariable QMAKE_CXXFLAGS
's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4272 setBootstrapVariable QMAKE_LFLAGS
4274 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4275 EXTRA_CFLAGS
="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4276 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4278 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4279 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4280 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4281 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4282 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4283 elif [ "$CFG_DEBUG" = "yes" ]; then
4284 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4285 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4286 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4287 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4290 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
4291 setBootstrapVariable QMAKE_RPATH
's,\$\$LITERAL_WHITESPACE, ,'
4292 for rpath
in $RPATH_FLAGS; do
4293 EXTRA_LFLAGS
="\$(QMAKE_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4296 if [ "$PLATFORM_MAC" = "yes" ]; then
4297 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4298 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4299 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4300 EXTRA_LFLAGS
="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4301 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4302 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4303 EXTRA_OBJS
="qsettings_mac.o qcore_mac.o"
4304 EXTRA_SRCS
="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4305 if echo "$CFG_MAC_ARCHS" |
grep x86
> /dev
/null
2>&1; then # matches both x86 and x86_64
4306 X86_CFLAGS
="-arch i386"
4307 X86_LFLAGS
="-arch i386"
4308 EXTRA_CFLAGS
="$X86_CFLAGS $EXTRA_CFLAGS"
4309 EXTRA_CXXFLAGS
="$X86_CFLAGS $EXTRA_CXXFLAGS"
4310 EXTRA_LFLAGS
="$EXTRA_LFLAGS $X86_LFLAGS"
4312 if echo "$CFG_MAC_ARCHS" |
grep ppc
> /dev
/null
2>&1; then # matches both ppc and ppc64
4313 PPC_CFLAGS
="-arch ppc"
4314 PPC_LFLAGS
="-arch ppc"
4315 EXTRA_CFLAGS
="$PPC_CFLAGS $EXTRA_CFLAGS"
4316 EXTRA_CXXFLAGS
="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4317 EXTRA_LFLAGS
="$EXTRA_LFLAGS $PPC_LFLAGS"
4319 if [ '!' -z "$CFG_SDK" ]; then
4320 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4321 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4322 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4323 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4324 EXTRA_LFLAGS
="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4327 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS
="$EXTRA_CFLAGS -DQWS"
4328 if [ '!' -z "$D_FLAGS" ]; then
4329 for DEF
in $D_FLAGS; do
4330 EXTRA_CFLAGS
="$EXTRA_CFLAGS \"-D${DEF}\""
4333 QMAKE_BIN_DIR
="$QT_INSTALL_BINS"
4334 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR
="${QT_INSTALL_PREFIX}/bin"
4335 QMAKE_DATA_DIR
="$QT_INSTALL_DATA"
4336 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR
="${QT_INSTALL_PREFIX}"
4338 adjrelpath
=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4339 adjoutpath
=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4340 adjqmakespec
=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4341 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4342 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4343 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4344 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4345 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4346 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4347 -e "s,@QMAKESPEC@,$adjqmakespec,g" "$in_mkfile" >>"$mkfile"
4349 if "$WHICH" makedepend
>/dev
/null
2>&1 && grep 'depend:' "$mkfile" >/dev
/null
2>&1; then
4350 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend
) >/dev
/null
2>&1
4351 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4352 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4357 QMAKE_BUILD_ERROR
=no
4358 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR
=yes
4359 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4360 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4361 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4364 #-------------------------------------------------------------------------------
4365 # tests that need qmake
4366 #-------------------------------------------------------------------------------
4368 # detect availability of float math.h functions
4369 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/floatmath
"floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4370 CFG_USE_FLOATMATH
=yes
4372 CFG_USE_FLOATMATH
=no
4375 # detect mmx support
4376 if [ "${CFG_MMX}" = "auto" ]; then
4377 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mmx
"mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4384 # detect 3dnow support
4385 if [ "${CFG_3DNOW}" = "auto" ]; then
4386 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/3dnow
"3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4393 # detect sse support
4394 if [ "${CFG_SSE}" = "auto" ]; then
4395 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sse
"sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4402 # detect sse2 support
4403 if [ "${CFG_SSE2}" = "auto" ]; then
4404 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sse2
"sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4411 # check iWMMXt support
4412 if [ "$CFG_IWMMXT" = "yes" ]; then
4413 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/iwmmxt
"iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4414 if [ $?
!= "0" ]; then
4415 echo "The iWMMXt functionality test failed!"
4416 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4422 if [ "$CFG_ZLIB" = "no" ]; then
4423 # Note: Qt no longer support builds without zlib
4424 # So we force a "no" to be "auto" here.
4425 # If you REALLY really need no zlib support, you can still disable
4426 # it by doing the following:
4427 # add "no-zlib" to mkspecs/qconfig.pri
4428 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4430 # There's no guarantee that Qt will build under those conditions
4435 if [ "$CFG_ZLIB" = "auto" ]; then
4436 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
4443 # detect how jpeg should be built
4444 if [ "$CFG_JPEG" = "auto" ]; then
4445 if [ "$CFG_SHARED" = "yes" ]; then
4452 if [ "$CFG_LIBJPEG" = "auto" ]; then
4453 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
4460 # detect how gif should be built
4461 if [ "$CFG_GIF" = "auto" ]; then
4462 if [ "$CFG_SHARED" = "yes" ]; then
4469 # detect how tiff should be built
4470 if [ "$CFG_TIFF" = "auto" ]; then
4471 if [ "$CFG_SHARED" = "yes" ]; then
4479 if [ "$CFG_LIBTIFF" = "auto" ]; then
4480 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
4487 # detect how mng should be built
4488 if [ "$CFG_MNG" = "auto" ]; then
4489 if [ "$CFG_SHARED" = "yes" ]; then
4496 if [ "$CFG_LIBMNG" = "auto" ]; then
4497 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
4505 if [ "$CFG_LIBPNG" = "auto" ]; then
4506 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
4513 # detect accessibility
4514 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4515 CFG_ACCESSIBILITY
=yes
4518 # auto-detect SQL-modules support
4519 for _SQLDR
in $CFG_SQL_AVAILABLE; do
4522 if [ "$CFG_SQL_mysql" != "no" ]; then
4523 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG
=`"$WHICH" mysql_config`
4524 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4525 QT_CFLAGS_MYSQL
=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4526 QT_LFLAGS_MYSQL_R
=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4527 QT_LFLAGS_MYSQL
=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4528 QT_MYSQL_VERSION
=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4529 QT_MYSQL_VERSION_MAJOR
=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4531 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4532 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4533 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4534 echo " You need MySql 4 or higher."
4535 echo " If you believe this message is in error you may use the continue"
4536 echo " switch (-continue) to $0 to continue."
4541 QT_LFLAGS_MYSQL_R
=""
4545 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
4546 QMakeVar add CONFIG use_libmysqlclient_r
4547 if [ "$CFG_SQL_mysql" = "auto" ]; then
4548 CFG_SQL_mysql
=plugin
4550 QT_LFLAGS_MYSQL
="$QT_LFLAGS_MYSQL_R"
4551 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
4552 if [ "$CFG_SQL_mysql" = "auto" ]; then
4553 CFG_SQL_mysql
=plugin
4556 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4557 echo "MySQL support cannot be enabled due to functionality tests!"
4558 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4559 echo " If you believe this message is in error you may use the continue"
4560 echo " switch (-continue) to $0 to continue."
4565 QT_LFLAGS_MYSQL_R
=""
4573 if [ "$CFG_SQL_psql" != "no" ]; then
4574 if "$WHICH" pg_config
>/dev
/null
2>&1; then
4575 QT_CFLAGS_PSQL
=`pg_config --includedir 2>/dev/null`
4576 QT_LFLAGS_PSQL
=`pg_config --libdir 2>/dev/null`
4578 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL
="-I$QT_CFLAGS_PSQL"
4579 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL
="-L$QT_LFLAGS_PSQL"
4580 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
4581 if [ "$CFG_SQL_psql" = "auto" ]; then
4585 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4586 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4587 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4588 echo " If you believe this message is in error you may use the continue"
4589 echo " switch (-continue) to $0 to continue."
4600 if [ "$CFG_SQL_odbc" != "no" ]; then
4601 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
4602 if [ "$CFG_SQL_odbc" = "auto" ]; then
4606 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
4607 QT_LFLAGS_ODBC
="-liodbc"
4608 if [ "$CFG_SQL_odbc" = "auto" ]; then
4612 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4613 echo "ODBC support cannot be enabled due to functionality tests!"
4614 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4615 echo " If you believe this message is in error you may use the continue"
4616 echo " switch (-continue) to $0 to continue."
4626 if [ "$CFG_SQL_oci" != "no" ]; then
4627 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
4628 if [ "$CFG_SQL_oci" = "auto" ]; then
4632 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4633 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4634 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4635 echo " If you believe this message is in error you may use the continue"
4636 echo " switch (-continue) to $0 to continue."
4645 if [ "$CFG_SQL_tds" != "no" ]; then
4646 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
4647 if [ "$CFG_SQL_tds" = "auto" ]; then
4651 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4652 echo "TDS support cannot be enabled due to functionality tests!"
4653 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4654 echo " If you believe this message is in error you may use the continue"
4655 echo " switch (-continue) to $0 to continue."
4664 if [ "$CFG_SQL_db2" != "no" ]; then
4665 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
4666 if [ "$CFG_SQL_db2" = "auto" ]; then
4670 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4671 echo "ODBC support cannot be enabled due to functionality tests!"
4672 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4673 echo " If you believe this message is in error you may use the continue"
4674 echo " switch (-continue) to $0 to continue."
4683 if [ "$CFG_SQL_ibase" != "no" ]; then
4684 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
4685 if [ "$CFG_SQL_ibase" = "auto" ]; then
4686 CFG_SQL_ibase
=plugin
4689 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4690 echo "InterBase support cannot be enabled due to functionality tests!"
4691 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4692 echo " If you believe this message is in error you may use the continue"
4693 echo " switch (-continue) to $0 to continue."
4702 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4703 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
4704 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4705 CFG_SQL_sqlite2
=plugin
4708 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4709 echo "SQLite2 support cannot be enabled due to functionality tests!"
4710 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4711 echo " If you believe this message is in error you may use the continue"
4712 echo " switch (-continue) to $0 to continue."
4721 if [ "$CFG_SQL_sqlite" != "no" ]; then
4722 SQLITE_AUTODETECT_FAILED
="no"
4723 if [ "$CFG_SQLITE" = "system" ]; then
4724 if [ -n "$PKG_CONFIG" ]; then
4725 QT_CFLAGS_SQLITE
=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4726 QT_LFLAGS_SQLITE
=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4728 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
4729 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4730 CFG_SQL_sqlite
=plugin
4732 QMAKE_CONFIG
="$QMAKE_CONFIG system-sqlite"
4734 SQLITE_AUTODETECT_FAILED
="yes"
4737 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4738 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4739 CFG_SQL_sqlite
=plugin
4742 SQLITE_AUTODETECT_FAILED
="yes"
4746 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4747 echo "SQLite support cannot be enabled due to functionality tests!"
4748 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4749 echo " If you believe this message is in error you may use the continue"
4750 echo " switch (-continue) to $0 to continue."
4756 if [ "$OPT_VERBOSE" = "yes" ]; then
4757 echo "unknown SQL driver: $_SQLDR"
4763 # auto-detect NIS support
4764 if [ "$CFG_NIS" != "no" ]; then
4765 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
4768 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4769 echo "NIS support cannot be enabled due to functionality tests!"
4770 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4771 echo " If you believe this message is in error you may use the continue"
4772 echo " switch (-continue) to $0 to continue."
4780 # auto-detect CUPS support
4781 if [ "$CFG_CUPS" != "no" ]; then
4782 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
4785 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4786 echo "Cups support cannot be enabled due to functionality tests!"
4787 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4788 echo " If you believe this message is in error you may use the continue"
4789 echo " switch (-continue) to $0 to continue."
4797 # auto-detect iconv(3) support
4798 if [ "$CFG_ICONV" != "no" ]; then
4799 if [ "$PLATFORM_QWS" = "yes" ]; then
4801 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
4803 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
4806 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4807 echo "Iconv support cannot be enabled due to functionality tests!"
4808 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4809 echo " If you believe this message is in error you may use the continue"
4810 echo " switch (-continue) to $0 to continue."
4818 # auto-detect libdbus-1 support
4819 if [ "$CFG_DBUS" != "no" ]; then
4820 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1
2>/dev
/null
; then
4821 QT_CFLAGS_DBUS
=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4822 QT_LIBS_DBUS
=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4824 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
4825 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS
=yes
4826 QMakeVar
set QT_CFLAGS_DBUS
"$QT_CFLAGS_DBUS"
4827 QMakeVar
set QT_LIBS_DBUS
"$QT_LIBS_DBUS"
4829 if [ "$CFG_DBUS" = "auto" ]; then
4831 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4832 # CFG_DBUS is "yes" or "linked" here
4834 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4835 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4836 echo " If you believe this message is in error you may use the continue"
4837 echo " switch (-continue) to $0 to continue."
4843 # Generate a CRC of the namespace for using in constants for the Carbon port.
4844 # This should mean that you really *can* load two Qt's and have our custom
4845 # Carbon events work.
4846 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
4847 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`
4850 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
4852 # detect EGL support
4853 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
4854 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
4856 CFG_EGL_GLES_INCLUDES
=no
4857 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
4858 # EGL specified by QMAKE_*_EGL, included with <GLES/egl.h>
4860 CFG_EGL_GLES_INCLUDES
=yes
4862 if ( [ "$CFG_OPENGL" = "es1" ] ||
[ "$CFG_OPENGL" = "es1cl" ] ||
[ "$CFG_OPENGL" = "es2" ] ) && [ "$CFG_EGL" != "yes" ]; then
4863 echo "The EGL functionality test failed!"
4864 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
4865 echo " You might need to modify the include and library search paths by editing"
4866 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
4867 echo " ${XQMAKESPEC}."
4872 # auto-detect Glib support
4873 if [ "$CFG_GLIB" != "no" ]; then
4874 if [ -n "$PKG_CONFIG" ]; then
4875 QT_CFLAGS_GLIB
=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4876 QT_LIBS_GLIB
=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4878 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
4880 QMakeVar
set QT_CFLAGS_GLIB
"$QT_CFLAGS_GLIB"
4881 QMakeVar
set QT_LIBS_GLIB
"$QT_LIBS_GLIB"
4883 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4884 echo "Glib support cannot be enabled due to functionality tests!"
4885 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4886 echo " If you believe this message is in error you may use the continue"
4887 echo " switch (-continue) to $0 to continue."
4895 if [ "$CFG_PHONON" != "no" ]; then
4896 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
4897 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4898 if [ -n "$PKG_CONFIG" ]; then
4899 QT_CFLAGS_GSTREAMER
=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4900 QT_LIBS_GSTREAMER
=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4902 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
4904 QMakeVar
set QT_CFLAGS_GSTREAMER
"$QT_CFLAGS_GSTREAMER"
4905 QMakeVar
set QT_LIBS_GSTREAMER
"$QT_LIBS_GSTREAMER"
4907 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4908 echo "Gstreamer support cannot be enabled due to functionality tests!"
4909 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4910 echo " If you believe this message is in error you may use the continue"
4911 echo " switch (-continue) to $0 to continue."
4917 elif [ "$CFG_GLIB" = "no" ]; then
4921 if [ "$CFG_GSTREAMER" = "yes" ]; then
4924 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4925 echo "Phonon support cannot be enabled due to functionality tests!"
4926 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4927 echo " If you believe this message is in error you may use the continue"
4928 echo " switch (-continue) to $0 to continue."
4941 if [ "$PLATFORM_X11" = "yes" ]; then
4942 x11tests
="$relpath/config.tests/x11"
4945 # work around broken X11 headers when using GCC 2.95 or later
4947 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE
=yes
4948 if [ $NOTYPE = "yes" ]; then
4949 QMakeVar add QMAKE_CXXFLAGS
-fpermissive
4950 X11TESTS_FLAGS
="$X11TESTS_FLAGS -fpermissive"
4953 # Check we actually have X11 :-)
4954 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xlib
"XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4955 if [ $?
!= "0" ]; then
4956 echo "Basic XLib functionality test failed!"
4957 echo " You might need to modify the include and library search paths by editing"
4958 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4962 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
4963 if [ "$CFG_OPENGL" = "auto" ] ||
[ "$CFG_OPENGL" = "yes" ]; then
4964 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
4966 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
4968 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
4970 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
4973 if [ "$CFG_OPENGL" = "yes" ]; then
4974 echo "All the OpenGL functionality tests failed!"
4975 echo " You might need to modify the include and library search paths by editing"
4976 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4977 echo " ${XQMAKESPEC}."
4984 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4985 if [ "$CFG_OPENGL" = "desktop" ]; then
4986 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/glxfbconfig
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4987 if [ $?
!= "0" ]; then
4988 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4995 elif [ "$CFG_OPENGL" = "es1cl" ]; then
4996 # OpenGL ES 1.x common lite
4997 "$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
4998 if [ $?
!= "0" ]; then
4999 echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
5000 echo " You might need to modify the include and library search paths by editing"
5001 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5002 echo " ${XQMAKESPEC}."
5005 elif [ "$CFG_OPENGL" = "es1" ]; then
5007 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1
"OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5008 if [ $?
!= "0" ]; then
5009 echo "The OpenGL ES 1.x functionality test failed!"
5010 echo " You might need to modify the include and library search paths by editing"
5011 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5012 echo " ${XQMAKESPEC}."
5015 elif [ "$CFG_OPENGL" = "es2" ]; then
5017 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles2
"OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5018 if [ $?
!= "0" ]; then
5019 echo "The OpenGL ES 2.0 functionality test failed!"
5020 echo " You might need to modify the include and library search paths by editing"
5021 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5022 echo " ${XQMAKESPEC}."
5025 elif [ "$CFG_OPENGL" = "desktop" ]; then
5026 # Desktop OpenGL support
5027 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/opengl
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5028 if [ $?
!= "0" ]; then
5029 echo "The OpenGL functionality test failed!"
5030 echo " You might need to modify the include and library search paths by editing"
5031 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5032 echo " ${XQMAKESPEC}."
5037 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5038 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/glxfbconfig
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5039 if [ $?
!= "0" ]; then
5040 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5048 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5049 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5050 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5051 CFG_GRAPHICS_SYSTEM
=default
5054 # auto-detect Xcursor support
5055 if [ "$CFG_XCURSOR" != "no" ]; then
5056 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
5057 if [ "$CFG_XCURSOR" != "runtime" ]; then
5061 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5062 echo "Xcursor support cannot be enabled due to functionality tests!"
5063 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5064 echo " If you believe this message is in error you may use the continue"
5065 echo " switch (-continue) to $0 to continue."
5073 # auto-detect Xfixes support
5074 if [ "$CFG_XFIXES" != "no" ]; then
5075 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xfixes
"Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5076 if [ "$CFG_XFIXES" != "runtime" ]; then
5080 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5081 echo "Xfixes support cannot be enabled due to functionality tests!"
5082 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5083 echo " If you believe this message is in error you may use the continue"
5084 echo " switch (-continue) to $0 to continue."
5092 # auto-detect Xrandr support (resize and rotate extension)
5093 if [ "$CFG_XRANDR" != "no" ]; then
5094 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
5095 if [ "$CFG_XRANDR" != "runtime" ]; then
5099 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5100 echo "Xrandr support cannot be enabled due to functionality tests!"
5101 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5102 echo " If you believe this message is in error you may use the continue"
5103 echo " switch (-continue) to $0 to continue."
5111 # auto-detect Xrender support
5112 if [ "$CFG_XRENDER" != "no" ]; then
5113 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
5116 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5117 echo "Xrender support cannot be enabled due to functionality tests!"
5118 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5119 echo " If you believe this message is in error you may use the continue"
5120 echo " switch (-continue) to $0 to continue."
5128 # auto-detect MIT-SHM support
5129 if [ "$CFG_MITSHM" != "no" ]; then
5130 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
5133 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5134 echo "MITSHM support cannot be enabled due to functionality tests!"
5135 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5136 echo " If you believe this message is in error you may use the continue"
5137 echo " switch (-continue) to $0 to continue."
5145 # auto-detect FontConfig support
5146 if [ "$CFG_FONTCONFIG" != "no" ]; then
5147 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig
--exists freetype2
2>/dev
/null
; then
5148 QT_CFLAGS_FONTCONFIG
=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5149 QT_LIBS_FONTCONFIG
=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5151 QT_CFLAGS_FONTCONFIG
=
5152 QT_LIBS_FONTCONFIG
="-lfreetype -lfontconfig"
5154 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
5156 QMakeVar
set QMAKE_CFLAGS_X11
"$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5157 QMakeVar
set QMAKE_LIBS_X11
"$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5158 CFG_LIBFREETYPE
=system
5160 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5161 echo "FontConfig support cannot be enabled due to functionality tests!"
5162 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5163 echo " If you believe this message is in error you may use the continue"
5164 echo " switch (-continue) to $0 to continue."
5172 # auto-detect Session Management support
5173 if [ "$CFG_SM" = "auto" ]; then
5174 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
5177 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5178 echo "Session Management support cannot be enabled due to functionality tests!"
5179 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5180 echo " If you believe this message is in error you may use the continue"
5181 echo " switch (-continue) to $0 to continue."
5189 # auto-detect SHAPE support
5190 if [ "$CFG_XSHAPE" != "no" ]; then
5191 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
5194 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5195 echo "XShape support cannot be enabled due to functionality tests!"
5196 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5197 echo " If you believe this message is in error you may use the continue"
5198 echo " switch (-continue) to $0 to continue."
5206 # auto-detect XSync support
5207 if [ "$CFG_XSYNC" != "no" ]; then
5208 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
5211 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5212 echo "XSync support cannot be enabled due to functionality tests!"
5213 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5214 echo " If you believe this message is in error you may use the continue"
5215 echo " switch (-continue) to $0 to continue."
5223 # auto-detect Xinerama support
5224 if [ "$CFG_XINERAMA" != "no" ]; then
5225 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
5226 if [ "$CFG_XINERAMA" != "runtime" ]; then
5230 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5231 echo "Xinerama support cannot be enabled due to functionality tests!"
5232 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5233 echo " If you believe this message is in error you may use the continue"
5234 echo " switch (-continue) to $0 to continue."
5242 # auto-detect Xinput support
5243 if [ "$CFG_XINPUT" != "no" ]; then
5244 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
5245 if [ "$CFG_XINPUT" != "runtime" ]; then
5249 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5250 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5251 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5252 echo " If you believe this message is in error you may use the continue"
5253 echo " switch (-continue) to $0 to continue."
5261 # auto-detect XKB support
5262 if [ "$CFG_XKB" != "no" ]; then
5263 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
5266 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5267 echo "XKB support cannot be enabled due to functionality tests!"
5268 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5269 echo " If you believe this message is in error you may use the continue"
5270 echo " switch (-continue) to $0 to continue."
5278 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5279 if [ -n "$PKG_CONFIG" ]; then
5280 QT_CFLAGS_QGTKSTYLE
=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5281 QT_LIBS_QGTKSTYLE
=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5283 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5285 QMakeVar
set QT_CFLAGS_QGTKSTYLE
"$QT_CFLAGS_QGTKSTYLE"
5286 QMakeVar
set QT_LIBS_QGTKSTYLE
"$QT_LIBS_QGTKSTYLE"
5288 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5289 echo "Gtk theme support cannot be enabled due to functionality tests!"
5290 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5291 echo " If you believe this message is in error you may use the continue"
5292 echo " switch (-continue) to $0 to continue."
5298 elif [ "$CFG_GLIB" = "no" ]; then
5304 if [ "$PLATFORM_MAC" = "yes" ]; then
5305 if [ "$CFG_PHONON" != "no" ]; then
5306 # Always enable Phonon (unless it was explicitly disabled)
5312 if [ "$PLATFORM_QWS" = "yes" ]; then
5314 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5315 if [ "$CFG_OPENGL" = "yes" ]; then
5316 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
5318 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
5320 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
5323 echo "All the OpenGL ES functionality tests failed!"
5324 echo " You might need to modify the include and library search paths by editing"
5325 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5326 echo " ${XQMAKESPEC}."
5329 elif [ "$CFG_OPENGL" = "es1" ]; then
5331 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1
"OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5332 if [ $?
!= "0" ]; then
5333 echo "The OpenGL ES 1.x functionality test failed!"
5334 echo " You might need to modify the include and library search paths by editing"
5335 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5336 echo " ${XQMAKESPEC}."
5339 elif [ "$CFG_OPENGL" = "es2" ]; then
5341 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles2
"OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5342 if [ $?
!= "0" ]; then
5343 echo "The OpenGL ES 2.0 functionality test failed!"
5344 echo " You might need to modify the include and library search paths by editing"
5345 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5346 echo " ${XQMAKESPEC}."
5349 elif [ "$CFG_OPENGL" = "desktop" ]; then
5350 # Desktop OpenGL support
5351 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5356 for screen
in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5357 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5358 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/ahi
"Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
5359 if [ $?
!= "0" ]; then
5360 echo "The Ahi screen driver functionality test failed!"
5361 echo " You might need to modify the include and library search paths by editing"
5362 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5363 echo " ${XQMAKESPEC}."
5368 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5369 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/svgalib
"SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
5370 if [ $?
!= "0" ]; then
5371 echo "The SVGAlib screen driver functionality test failed!"
5372 echo " You might need to modify the include and library search paths by editing"
5373 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5374 echo " ${XQMAKESPEC}."
5379 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5380 if [ -n "$PKG_CONFIG" ]; then
5381 if $PKG_CONFIG --exists directfb
2>/dev
/null
; then
5382 QT_CFLAGS_DIRECTFB
=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5383 QT_LIBS_DIRECTFB
=`$PKG_CONFIG --libs directfb 2>/dev/null`
5384 elif directfb-config
--version >/dev
/null
2>&1; then
5385 QT_CFLAGS_DIRECTFB
=`directfb-config --cflags 2>/dev/null`
5386 QT_LIBS_DIRECTFB
=`directfb-config --libs 2>/dev/null`
5390 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5391 if [ -n "$QT_CFLAGS_DIRECTFB" ] ||
[ -n "$QT_LIBS_DIRECTFB" ]; then
5392 QMakeVar
set QT_CFLAGS_DIRECTFB
"$QT_CFLAGS_DIRECTFB"
5393 QMakeVar
set QT_LIBS_DIRECTFB
"$QT_LIBS_DIRECTFB"
5395 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5396 QMakeVar
set QT_DEFINES_DIRECTFB
"QT3_SUPPORT"
5399 "$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
5400 if [ $?
!= "0" ]; then
5401 echo "The DirectFB screen driver functionality test failed!"
5402 echo " You might need to modify the include and library search paths by editing"
5403 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5404 echo " ${XQMAKESPEC}."
5412 for mouse
in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5413 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5414 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/tslib
"tslib" $L_FLAGS $I_FLAGS $l_FLAGS
5415 if [ $?
!= "0" ]; then
5416 echo "The tslib functionality test failed!"
5417 echo " You might need to modify the include and library search paths by editing"
5418 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5419 echo " ${XQMAKESPEC}."
5428 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/sound
"sound" $L_FLAGS $I_FLAGS $l_FLAGS
5429 if [ $?
!= "0" ]; then
5430 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SOUND"
5436 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE
="$CFG_QWS_FREETYPE"
5437 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE
=no
5438 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5439 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
5440 CFG_LIBFREETYPE
=system
5446 if [ "$CFG_ENDIAN" = "auto" ]; then
5447 if [ "$PLATFORM_MAC" = "yes" ]; then
5450 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5452 if [ "$F" -eq 0 ]; then
5453 CFG_ENDIAN
="Q_LITTLE_ENDIAN"
5454 elif [ "$F" -eq 1 ]; then
5455 CFG_ENDIAN
="Q_BIG_ENDIAN"
5458 echo "The target system byte order could not be detected!"
5459 echo "Turn on verbose messaging (-v) to see the final report."
5460 echo "You can use the -little-endian or -big-endian switch to"
5461 echo "$0 to continue."
5467 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5468 if [ "$PLATFORM_MAC" = "yes" ]; then
5471 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5473 if [ "$F" -eq 0 ]; then
5474 CFG_HOST_ENDIAN
="Q_LITTLE_ENDIAN"
5475 elif [ "$F" -eq 1 ]; then
5476 CFG_HOST_ENDIAN
="Q_BIG_ENDIAN"
5479 echo "The host system byte order could not be detected!"
5480 echo "Turn on verbose messaging (-v) to see the final report."
5481 echo "You can use the -host-little-endian or -host-big-endian switch to"
5482 echo "$0 to continue."
5488 if [ "$CFG_ARMFPA" != "auto" ]; then
5489 if [ "$CFG_ARMFPA" = "yes" ]; then
5490 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5491 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5493 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5496 CFG_DOUBLEFORMAT
="normal"
5501 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5502 if [ "$PLATFORM_QWS" != "yes" ]; then
5503 CFG_DOUBLEFORMAT
=normal
5505 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5507 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5508 CFG_DOUBLEFORMAT
=normal
5509 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
5510 CFG_DOUBLEFORMAT
=normal
5511 elif [ "$F" -eq 10 ]; then
5512 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE"
5513 elif [ "$F" -eq 11 ]; then
5514 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG"
5515 elif [ "$F" -eq 12 ]; then
5516 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5518 elif [ "$F" -eq 13 ]; then
5519 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5523 echo "The system floating point format could not be detected."
5524 echo "This may cause data to be generated in a wrong format"
5525 echo "Turn on verbose messaging (-v) to see the final report."
5526 # we do not fail on this since this is a new test, and if it fails,
5527 # the old behavior should be correct in most cases
5528 CFG_DOUBLEFORMAT
=normal
5534 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stl
"STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5538 if [ "$CFG_STL" != "no" ]; then
5539 if [ "$HAVE_STL" = "yes" ]; then
5542 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5543 echo "STL support cannot be enabled due to functionality tests!"
5544 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5545 echo " If you believe this message is in error you may use the continue"
5546 echo " switch (-continue) to $0 to continue."
5554 # find if the platform supports IPv6
5555 if [ "$CFG_IPV6" != "no" ]; then
5556 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
5559 if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5560 echo "IPv6 support cannot be enabled due to functionality tests!"
5561 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5562 echo " If you believe this message is in error you may use the continue"
5563 echo " switch (-continue) to $0 to continue."
5571 # detect POSIX clock_gettime()
5572 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5573 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
5574 CFG_CLOCK_GETTIME
=yes
5576 CFG_CLOCK_GETTIME
=no
5580 # detect POSIX monotonic clocks
5581 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5582 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
5583 CFG_CLOCK_MONOTONIC
=yes
5585 CFG_CLOCK_MONOTONIC
=no
5587 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5588 CFG_CLOCK_MONOTONIC
=no
5592 if [ "$CFG_MREMAP" = "auto" ]; then
5593 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mremap
"mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5600 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5601 if [ "$CFG_GETADDRINFO" != "no" ]; then
5602 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getaddrinfo
"getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5605 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5606 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5607 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5608 echo " If you believe this message is in error you may use the continue"
5609 echo " switch (-continue) to $0 to continue."
5617 # find if the platform provides inotify
5618 if [ "$CFG_INOTIFY" != "no" ]; then
5619 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/inotify
"inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5622 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5623 echo "inotify support cannot be enabled due to functionality tests!"
5624 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5625 echo " If you believe this message is in error you may use the continue"
5626 echo " switch (-continue) to $0 to continue."
5634 # find if the platform provides if_nametoindex (ipv6 interface name support)
5635 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5636 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
5639 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5640 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5641 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5642 echo " If you believe this message is in error you may use the continue"
5643 echo " switch (-continue) to $0 to continue."
5651 # find if the platform provides getifaddrs (network interface enumeration)
5652 if [ "$CFG_GETIFADDRS" != "no" ]; then
5653 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getifaddrs
"getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5656 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5657 echo "getifaddrs support cannot be enabled due to functionality tests!"
5658 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5659 echo " If you believe this message is in error you may use the continue"
5660 echo " switch (-continue) to $0 to continue."
5668 # find if the platform supports X/Open Large File compilation environment
5669 if [ "$CFG_LARGEFILE" != "no" ]; then
5670 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
5673 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5674 echo "X/Open Large File support cannot be enabled due to functionality tests!"
5675 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5676 echo " If you believe this message is in error you may use the continue"
5677 echo " switch (-continue) to $0 to continue."
5686 if [ "$CFG_OPENSSL" != "no" ]; then
5687 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
5688 if [ "$CFG_OPENSSL" = "auto" ]; then
5692 if ( [ "$CFG_OPENSSL" = "yes" ] ||
[ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5693 echo "OpenSSL support cannot be enabled due to functionality tests!"
5694 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5695 echo " If you believe this message is in error you may use the continue"
5696 echo " switch (-continue) to $0 to continue."
5704 # detect OpenVG support
5705 if [ "$CFG_OPENVG" != "no" ]; then
5706 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
5707 if [ "$CFG_OPENVG" = "auto" ]; then
5710 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
5711 if [ "$CFG_OPENVG" = "auto" ]; then
5714 CFG_OPENVG_ON_OPENGL
=yes
5715 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
5716 if [ "$CFG_OPENVG" = "auto" ]; then
5719 CFG_OPENVG_LC_INCLUDES
=yes
5720 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
5721 if [ "$CFG_OPENVG" = "auto" ]; then
5724 CFG_OPENVG_LC_INCLUDES
=yes
5725 CFG_OPENVG_ON_OPENGL
=yes
5727 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5728 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5729 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5730 echo " If you believe this message is in error you may use the continue"
5731 echo " switch (-continue) to $0 to continue."
5737 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
5738 CFG_OPENVG_SHIVA
=yes
5742 # if openvg is disabled and the user specified graphicssystem vg, disable it...
5743 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
5744 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
5745 CFG_GRAPHICS_SYSTEM
=default
5748 if [ "$CFG_PTMALLOC" != "no" ]; then
5749 # build ptmalloc, copy .a file to lib/
5750 echo "Building ptmalloc. Please wait..."
5751 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
5752 mkdir
"$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
5754 QMakeVar add QMAKE_LFLAGS
"$outpath/lib/libptmalloc3.a"
5757 if [ "$CFG_ALSA" = "auto" ]; then
5758 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/alsa
"alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5765 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] ||
[ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5766 if [ "$CFG_ARCH" = "arm" ] ||
[ "$CFG_ARCH" = "armv6" ]; then
5767 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/javascriptcore-jit
"javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5768 if [ $?
!= "0" ]; then
5769 CFG_JAVASCRIPTCORE_JIT
=no
5774 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5775 QMakeVar
set JAVASCRIPTCORE_JIT
yes
5776 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5777 QMakeVar
set JAVASCRIPTCORE_JIT no
5780 #-------------------------------------------------------------------------------
5781 # ask for all that hasn't been auto-detected or specified in the arguments
5782 #-------------------------------------------------------------------------------
5784 ### fix this: user input should be validated in a loop
5785 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PLATFORM_QWS" = "yes" ]; then
5787 echo "Choose pixel-depths to support:"
5789 echo " 1. 1bpp, black/white"
5790 echo " 4. 4bpp, grayscale"
5791 echo " 8. 8bpp, paletted"
5792 echo " 12. 12bpp, rgb 4-4-4"
5793 echo " 15. 15bpp, rgb 5-5-5"
5794 echo " 16. 16bpp, rgb 5-6-5"
5795 echo " 18. 18bpp, rgb 6-6-6"
5796 echo " 24. 24bpp, rgb 8-8-8"
5797 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
5798 echo " all. All supported depths"
5800 echo "Your choices (default 8,16,32):"
5802 if [ -z "$CFG_QWS_DEPTHS" ] ||
[ "$CFG_QWS_DEPTHS" = "yes" ]; then
5803 CFG_QWS_DEPTHS
=8,16,32
5806 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
5807 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
5808 CFG_QWS_DEPTHS
="1 4 8 12 15 16 18 24 32 generic"
5810 for D
in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
5812 1|
4|
8|
12|
15|
16|
18|
24|
32) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
5813 generic
) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
5818 # enable dwarf2 support on Mac
5819 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5820 QT_CONFIG
="$QT_CONFIG dwarf2"
5823 # Set the default arch.
5824 # Carbon builds: 32 bit x86/ppc.
5825 # For "-cocoa" builds on snow leopard : compiler default (64-bit).
5826 # For "-cocoa" builds on leopard : compiler default (32-bit).
5827 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
5828 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
5830 if [ "$CFG_MAC_COCOA" != "yes" ]; then
5831 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
5832 CFG_MAC_ARCHS
=" x86"
5833 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
5834 CFG_MAC_ARCHS
=" ppc"
5836 CFG_MAC_ARCHS
=" $QT_MAC_DEFAULT_ARCH"
5839 CFG_MAC_ARCHS
=" $QT_MAC_DEFAULT_ARCH"
5842 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
5845 # enable cocoa and/or carbon on Mac
5846 if [ "$CFG_MAC_COCOA" = "yes" ]; then
5847 # -cocoa on the command line disables carbon completely (i.e. use cocoa for 32-bit as well)
5850 # check which archs are in use, enable cocoa if we find a 64-bit one
5851 if echo "$CFG_MAC_ARCHS" |
grep 64 > /dev
/null
2>&1; then
5852 CFG_MAC_COCOA
="yes";
5853 CFG_MAC_CARBON
="no";
5854 if echo "$CFG_MAC_ARCHS" |
grep -w ppc
> /dev
/null
2>&1; then
5855 CFG_MAC_CARBON
="yes";
5857 if echo "$CFG_MAC_ARCHS" |
grep -w x86
> /dev
/null
2>&1; then
5858 CFG_MAC_CARBON
="yes";
5861 # no 64-bit archs found.
5866 # set the global Mac deployment target. This is overridden on an arch-by-arch basis
5867 # in some cases, see code further down
5868 case "$PLATFORM,$CFG_MAC_COCOA" in
5871 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.5
5875 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.4
5879 # disable Qt 3 support on VxWorks
5880 case "$XPLATFORM" in
5881 unsupported
/vxworks
*)
5886 # enable Qt 3 support functionality
5887 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5888 QT_CONFIG
="$QT_CONFIG qt3support"
5892 if [ "$CFG_PHONON" = "yes" ]; then
5893 QT_CONFIG
="$QT_CONFIG phonon"
5894 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5895 QT_CONFIG
="$QT_CONFIG phonon-backend"
5898 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_PHONON"
5901 # disable accessibility
5902 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5903 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5905 QT_CONFIG
="$QT_CONFIG accessibility"
5909 if [ "$CFG_EGL" = "no" ]; then
5910 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_EGL"
5912 QT_CONFIG
="$QT_CONFIG egl"
5913 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
5914 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GLES_EGL"
5919 if [ "$CFG_OPENVG" = "no" ]; then
5920 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENVG"
5922 QT_CONFIG
="$QT_CONFIG openvg"
5923 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5924 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5926 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5927 QT_CONFIG
="$QT_CONFIG openvg_on_opengl"
5929 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5930 QT_CONFIG
="$QT_CONFIG shivavg"
5931 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_SHIVAVG"
5936 if [ "$CFG_OPENGL" = "no" ]; then
5937 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENGL"
5939 QT_CONFIG
="$QT_CONFIG opengl"
5942 if [ "$CFG_OPENGL" = "es1" ] ||
[ "$CFG_OPENGL" = "es1cl" ] ||
[ "$CFG_OPENGL" = "es2" ]; then
5943 if [ "$PLATFORM_QWS" = "yes" ]; then
5944 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
5945 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_USE_EGLWINDOWSURFACE"
5947 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES"
5950 if [ "$CFG_OPENGL" = "es1" ]; then
5951 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1"
5952 QT_CONFIG
="$QT_CONFIG opengles1"
5955 if [ "$CFG_OPENGL" = "es1cl" ]; then
5956 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1_CL"
5957 QT_CONFIG
="$QT_CONFIG opengles1cl"
5960 if [ "$CFG_OPENGL" = "es2" ]; then
5961 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5962 QT_CONFIG
="$QT_CONFIG opengles2"
5965 # safe execution environment
5966 if [ "$CFG_SXE" != "no" ]; then
5967 QT_CONFIG
="$QT_CONFIG sxe"
5970 # build up the variables for output
5971 if [ "$CFG_DEBUG" = "yes" ]; then
5972 QMAKE_OUTDIR
="${QMAKE_OUTDIR}debug"
5973 QMAKE_CONFIG
="$QMAKE_CONFIG debug"
5974 elif [ "$CFG_DEBUG" = "no" ]; then
5975 QMAKE_OUTDIR
="${QMAKE_OUTDIR}release"
5976 QMAKE_CONFIG
="$QMAKE_CONFIG release"
5978 if [ "$CFG_SHARED" = "yes" ]; then
5979 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-shared"
5980 QMAKE_CONFIG
="$QMAKE_CONFIG shared dll"
5981 elif [ "$CFG_SHARED" = "no" ]; then
5982 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-static"
5983 QMAKE_CONFIG
="$QMAKE_CONFIG static"
5985 if [ "$PLATFORM_QWS" = "yes" ]; then
5986 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
5987 QMAKE_CONFIG
="$QMAKE_CONFIG embedded"
5988 QT_CONFIG
="$QT_CONFIG embedded"
5989 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5991 QMakeVar
set PRECOMPILED_DIR
".pch/$QMAKE_OUTDIR"
5992 QMakeVar
set OBJECTS_DIR
".obj/$QMAKE_OUTDIR"
5993 QMakeVar
set MOC_DIR
".moc/$QMAKE_OUTDIR"
5994 QMakeVar
set RCC_DIR
".rcc/$QMAKE_OUTDIR"
5995 QMakeVar
set UI_DIR
".uic/$QMAKE_OUTDIR"
5996 if [ "$CFG_LARGEFILE" = "yes" ]; then
5997 QMAKE_CONFIG
="$QMAKE_CONFIG largefile"
5999 if [ "$CFG_STL" = "no" ]; then
6000 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STL"
6002 QMAKE_CONFIG
="$QMAKE_CONFIG stl"
6004 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6005 QMAKE_CONFIG
="$QMAKE_CONFIG GNUmake"
6007 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_exports"
6008 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_relocations"
6009 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG precompile_header"
6010 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6011 QMakeVar add QMAKE_CFLAGS
-g
6012 QMakeVar add QMAKE_CXXFLAGS
-g
6013 QMAKE_CONFIG
="$QMAKE_CONFIG separate_debug_info"
6015 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG mmx"
6016 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG 3dnow"
6017 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse"
6018 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse2"
6019 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG iwmmxt"
6020 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6021 if [ "$CFG_IPV6" = "yes" ]; then
6022 QT_CONFIG
="$QT_CONFIG ipv6"
6024 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6025 QT_CONFIG
="$QT_CONFIG clock-gettime"
6027 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6028 QT_CONFIG
="$QT_CONFIG clock-monotonic"
6030 if [ "$CFG_MREMAP" = "yes" ]; then
6031 QT_CONFIG
="$QT_CONFIG mremap"
6033 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6034 QT_CONFIG
="$QT_CONFIG getaddrinfo"
6036 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6037 QT_CONFIG
="$QT_CONFIG ipv6ifname"
6039 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6040 QT_CONFIG
="$QT_CONFIG getifaddrs"
6042 if [ "$CFG_INOTIFY" = "yes" ]; then
6043 QT_CONFIG
="$QT_CONFIG inotify"
6045 if [ "$CFG_LIBJPEG" = "no" ]; then
6047 elif [ "$CFG_LIBJPEG" = "system" ]; then
6048 QT_CONFIG
="$QT_CONFIG system-jpeg"
6050 if [ "$CFG_JPEG" = "no" ]; then
6051 QT_CONFIG
="$QT_CONFIG no-jpeg"
6052 elif [ "$CFG_JPEG" = "yes" ]; then
6053 QT_CONFIG
="$QT_CONFIG jpeg"
6055 if [ "$CFG_LIBMNG" = "no" ]; then
6057 elif [ "$CFG_LIBMNG" = "system" ]; then
6058 QT_CONFIG
="$QT_CONFIG system-mng"
6060 if [ "$CFG_MNG" = "no" ]; then
6061 QT_CONFIG
="$QT_CONFIG no-mng"
6062 elif [ "$CFG_MNG" = "yes" ]; then
6063 QT_CONFIG
="$QT_CONFIG mng"
6065 if [ "$CFG_LIBPNG" = "no" ]; then
6068 if [ "$CFG_LIBPNG" = "system" ]; then
6069 QT_CONFIG
="$QT_CONFIG system-png"
6071 if [ "$CFG_PNG" = "no" ]; then
6072 QT_CONFIG
="$QT_CONFIG no-png"
6073 elif [ "$CFG_PNG" = "yes" ]; then
6074 QT_CONFIG
="$QT_CONFIG png"
6076 if [ "$CFG_GIF" = "no" ]; then
6077 QT_CONFIG
="$QT_CONFIG no-gif"
6078 elif [ "$CFG_GIF" = "yes" ]; then
6079 QT_CONFIG
="$QT_CONFIG gif"
6081 if [ "$CFG_LIBTIFF" = "no" ]; then
6083 elif [ "$CFG_LIBTIFF" = "system" ]; then
6084 QT_CONFIG
="$QT_CONFIG system-tiff"
6086 if [ "$CFG_TIFF" = "no" ]; then
6087 QT_CONFIG
="$QT_CONFIG no-tiff"
6088 elif [ "$CFG_TIFF" = "yes" ]; then
6089 QT_CONFIG
="$QT_CONFIG tiff"
6091 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6092 QT_CONFIG
="$QT_CONFIG no-freetype"
6093 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6094 QT_CONFIG
="$QT_CONFIG system-freetype"
6096 QT_CONFIG
="$QT_CONFIG freetype"
6099 if [ "x$PLATFORM_MAC" = "xyes" ]; then
6100 #On Mac we implicitly link against libz, so we
6101 #never use the 3rdparty stuff.
6102 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB
="system"
6104 if [ "$CFG_ZLIB" = "yes" ]; then
6105 QT_CONFIG
="$QT_CONFIG zlib"
6106 elif [ "$CFG_ZLIB" = "system" ]; then
6107 QT_CONFIG
="$QT_CONFIG system-zlib"
6110 [ "$CFG_NIS" = "yes" ] && QT_CONFIG
="$QT_CONFIG nis"
6111 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG
="$QT_CONFIG cups"
6112 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG
="$QT_CONFIG iconv"
6113 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG
="$QT_CONFIG gnu-libiconv"
6114 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG
="$QT_CONFIG glib"
6115 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG
="$QT_CONFIG gstreamer"
6116 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG
="$QT_CONFIG dbus"
6117 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG
="$QT_CONFIG dbus dbus-linked"
6118 [ "$CFG_NAS" = "system" ] && QT_CONFIG
="$QT_CONFIG nas"
6119 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG
="$QT_CONFIG openssl"
6120 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG
="$QT_CONFIG openssl-linked"
6122 if [ "$PLATFORM_X11" = "yes" ]; then
6123 [ "$CFG_SM" = "yes" ] && QT_CONFIG
="$QT_CONFIG x11sm"
6125 # for some reason, the following libraries are not always built shared,
6126 # so *every* program/lib (including Qt) has to link against them
6127 if [ "$CFG_XSHAPE" = "yes" ]; then
6128 QT_CONFIG
="$QT_CONFIG xshape"
6130 if [ "$CFG_XSYNC" = "yes" ]; then
6131 QT_CONFIG
="$QT_CONFIG xsync"
6133 if [ "$CFG_XINERAMA" = "yes" ]; then
6134 QT_CONFIG
="$QT_CONFIG xinerama"
6135 QMakeVar
set QMAKE_LIBS_X11
'-lXinerama $$QMAKE_LIBS_X11'
6137 if [ "$CFG_XCURSOR" = "yes" ]; then
6138 QT_CONFIG
="$QT_CONFIG xcursor"
6139 QMakeVar
set QMAKE_LIBS_X11
'-lXcursor $$QMAKE_LIBS_X11'
6141 if [ "$CFG_XFIXES" = "yes" ]; then
6142 QT_CONFIG
="$QT_CONFIG xfixes"
6143 QMakeVar
set QMAKE_LIBS_X11
'-lXfixes $$QMAKE_LIBS_X11'
6145 if [ "$CFG_XRANDR" = "yes" ]; then
6146 QT_CONFIG
="$QT_CONFIG xrandr"
6147 if [ "$CFG_XRENDER" != "yes" ]; then
6148 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6149 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr -lXrender $$QMAKE_LIBS_X11'
6151 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr $$QMAKE_LIBS_X11'
6154 if [ "$CFG_XRENDER" = "yes" ]; then
6155 QT_CONFIG
="$QT_CONFIG xrender"
6156 QMakeVar
set QMAKE_LIBS_X11
'-lXrender $$QMAKE_LIBS_X11'
6158 if [ "$CFG_MITSHM" = "yes" ]; then
6159 QT_CONFIG
="$QT_CONFIG mitshm"
6161 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6162 QT_CONFIG
="$QT_CONFIG fontconfig"
6164 if [ "$CFG_XINPUT" = "yes" ]; then
6165 QMakeVar
set QMAKE_LIBS_X11
'-lXi $$QMAKE_LIBS_X11'
6167 if [ "$CFG_XINPUT" = "yes" ]; then
6168 QT_CONFIG
="$QT_CONFIG xinput tablet"
6170 if [ "$CFG_XKB" = "yes" ]; then
6171 QT_CONFIG
="$QT_CONFIG xkb"
6175 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES
"$D_FLAGS"
6176 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS
"$L_FLAGS"
6177 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS
"$l_FLAGS"
6179 if [ "$PLATFORM_MAC" = "yes" ]; then
6180 if [ "$CFG_RPATH" = "yes" ]; then
6181 QMAKE_CONFIG
="$QMAKE_CONFIG absolute_library_soname"
6183 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
6184 if [ -n "$RPATH_FLAGS" ]; then
6186 echo "ERROR: -R cannot be used on this platform as \$QMAKE_RPATH is"
6190 elif [ "$CFG_RPATH" = "yes" ]; then
6191 RPATH_MESSAGE
=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6195 if [ "$CFG_RPATH" = "yes" ]; then
6196 # set the default rpath to the library installation directory
6197 RPATH_FLAGS
="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6199 if [ -n "$RPATH_FLAGS" ]; then
6200 # add the user defined rpaths
6201 QMakeVar add QMAKE_RPATHDIR
"$RPATH_FLAGS"
6205 if [ '!' -z "$I_FLAGS" ]; then
6206 # add the user define include paths
6207 QMakeVar add QMAKE_CFLAGS
"$I_FLAGS"
6208 QMakeVar add QMAKE_CXXFLAGS
"$I_FLAGS"
6211 # turn off exceptions for the compilers that support it
6212 if [ "$PLATFORM_QWS" = "yes" ]; then
6213 COMPILER
=`echo $XPLATFORM | cut -f 3- -d-`
6215 COMPILER
=`echo $PLATFORM | cut -f 2- -d-`
6217 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6221 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6222 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG exceptions"
6225 if [ "$CFG_ALSA" = "yes" ]; then
6226 QT_CONFIG
="$QT_CONFIG alsa"
6230 # Some Qt modules are too advanced in C++ for some old compilers
6231 # Detect here the platforms where they are known to work.
6233 # See Qt documentation for more information on which features are
6234 # supported and on which compilers.
6236 canBuildQtXmlPatterns
="yes"
6237 canBuildWebKit
="$HAVE_STL"
6238 canBuildQtConcurrent
="yes"
6240 # WebKit requires stdint.h
6241 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stdint
"Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
6242 if [ $?
!= "0" ]; then
6246 case "$XPLATFORM" in
6248 # PA-RISC's assembly is too limited
6249 # gcc 3.4 on that platform can't build QtXmlPatterns
6250 # the assembly it generates cannot be compiled
6252 # Check gcc's version
6253 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6257 canBuildQtXmlPatterns
="no"
6261 canBuildQtXmlPatterns
="no"
6265 unsupported
/vxworks-
*-g++*)
6268 unsupported
/vxworks-
*-dcc*)
6270 canBuildQtXmlPatterns
="no"
6273 # Check gcc's version
6274 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6282 canBuildQtXmlPatterns
="no"
6287 # Check the compiler version
6288 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6291 canBuildQtXmlPatterns
="no"
6292 canBuildQtConcurrent
="no"
6296 canBuildQtConcurrent
="no"
6302 canBuildQtXmlPatterns
="no"
6303 canBuildQtConcurrent
="no"
6309 # Get the xlC version
6310 cat > xlcver.c
<<EOF
6314 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6319 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c
>/dev
/null
2>/dev
/null
; then
6320 xlcver
=`./xlcver 2>/dev/null`
6323 if [ "$OPT_VERBOSE" = "yes" ]; then
6324 if [ -n "$xlcver" ]; then
6325 echo Found IBM xlC version
: $xlcver.
6327 echo Could not determine IBM xlC version
, assuming oldest supported.
6334 canBuildQtXmlPatterns
="no"
6335 canBuildQtConcurrent
="no"
6339 canBuildQtConcurrent
="no"
6345 canBuildQtConcurrent
="no"
6349 CFG_CONCURRENT
="yes"
6350 if [ "$canBuildQtConcurrent" = "no" ]; then
6351 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6355 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
6356 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
6359 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
6360 CFG_XMLPATTERNS
="$canBuildQtXmlPatterns"
6361 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
6362 CFG_XMLPATTERNS
="no"
6364 if [ "$CFG_XMLPATTERNS" = "yes" ]; then
6365 QT_CONFIG
="$QT_CONFIG xmlpatterns"
6367 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
6370 if [ "$CFG_MULTIMEDIA" = "no" ]; then
6371 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
6373 QT_CONFIG
="$QT_CONFIG multimedia"
6376 if [ "$CFG_SVG" = "yes" ]; then
6377 QT_CONFIG
="$QT_CONFIG svg"
6379 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SVG"
6382 if [ "$CFG_WEBKIT" = "auto" ]; then
6383 CFG_WEBKIT
="$canBuildWebKit"
6386 if [ "$CFG_WEBKIT" = "yes" ]; then
6387 QT_CONFIG
="$QT_CONFIG webkit"
6388 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
6392 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_WEBKIT"
6395 if [ "$CFG_SCRIPT" = "auto" ]; then
6399 if [ "$CFG_SCRIPT" = "yes" ]; then
6400 QT_CONFIG
="$QT_CONFIG script"
6402 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SCRIPT"
6405 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
6406 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
6409 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
6410 CFG_SCRIPTTOOLS
="yes"
6411 elif [ "$CFG_SCRIPT" = "no" ]; then
6412 CFG_SCRIPTTOOLS
="no"
6415 if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
6416 QT_CONFIG
="$QT_CONFIG scripttools"
6418 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
6421 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6424 QMakeVar add QMAKE_CFLAGS
-fno-exceptions
6425 QMakeVar add QMAKE_CXXFLAGS
-fno-exceptions
6426 QMakeVar add QMAKE_LFLAGS
-fno-exceptions
6431 QMakeVar add QMAKE_CFLAGS
-LANG:exceptions
=off
6432 QMakeVar add QMAKE_CXXFLAGS
-LANG:exceptions
=off
6433 QMakeVar add QMAKE_LFLAGS
-LANG:exceptions
=off
6440 QMAKE_CONFIG
="$QMAKE_CONFIG exceptions_off"
6443 # On Mac, set the minimum deployment target for the different architechtures
6444 # using the Xarch compiler option when supported (10.5 and up). On 10.4 the
6445 # deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
6446 # env. variable. "-cocoa" on the command line means Cocoa is used in 32-bit mode also,
6447 # in this case fall back on QMAKE_MACOSX_DEPLOYMENT_TARGET which will be set to 10.5.
6448 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] && [ "$COMMANDLINE_MAC_COCOA" != "yes" ]; then
6449 if echo "$CFG_MAC_ARCHS" |
grep '\<x86\>' > /dev
/null
2>&1; then
6450 QMakeVar add QMAKE_CFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6451 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6452 QMakeVar add QMAKE_LFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6453 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86
"-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
6455 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc\>' > /dev
/null
2>&1; then
6456 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc -mmacosx-version-min=10.4"
6457 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc -mmacosx-version-min=10.4"
6458 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc -mmacosx-version-min=10.4"
6459 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC
"-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
6461 if echo "$CFG_MAC_ARCHS" |
grep '\<x86_64\>' > /dev
/null
2>&1; then
6462 QMakeVar add QMAKE_CFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6463 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6464 QMakeVar add QMAKE_LFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6465 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64
"-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
6467 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc64\>' > /dev
/null
2>&1; then
6468 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6469 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6470 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6471 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64
"-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
6475 #-------------------------------------------------------------------------------
6476 # generate QT_BUILD_KEY
6477 #-------------------------------------------------------------------------------
6479 # some compilers generate binary incompatible code between different versions,
6480 # so we need to generate a build key that is different between these compilers
6484 COMPILER_VERSION
=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6486 case "$COMPILER_VERSION" in
6488 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6489 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6490 QT_GCC_PATCH_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6493 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6494 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6495 QT_GCC_PATCH_VERSION
=0
6499 case "$COMPILER_VERSION" in
6501 COMPILER_VERSION
="2.95.*"
6504 COMPILER_VERSION
="3.*"
6507 COMPILER_VERSION
="4"
6512 [ '!' -z "$COMPILER_VERSION" ] && COMPILER
="g++-${COMPILER_VERSION}"
6519 # QT_CONFIG can contain the following:
6521 # Things that affect the Qt API/ABI:
6524 # minimal-config small-config medium-config large-config full-config
6526 # Different edition modules:
6527 # network canvas table xml opengl sql
6529 # Things that do not affect the Qt API/ABI:
6531 # system-jpeg no-jpeg jpeg
6532 # system-mng no-mng mng
6533 # system-png no-png png
6534 # system-zlib no-zlib zlib
6535 # system-libtiff no-libtiff
6548 # X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb
6549 # Embedded: embedded freetype
6555 # determine the build options
6556 for config_option
in $QMAKE_CONFIG $QT_CONFIG; do
6558 case "$config_option" in
6560 # take the last *-config setting. this is the highest config being used,
6561 # and is the one that we will use for tagging plugins
6562 BUILD_CONFIG
="$config_option"
6565 *) # skip all other options since they don't affect the Qt API/ABI.
6569 if [ "$SKIP" = "no" ]; then
6570 BUILD_OPTIONS
="$BUILD_OPTIONS $config_option"
6574 # put the options that we are missing into .options
6576 for opt
in `echo $ALL_OPTIONS`; do
6578 if echo $BUILD_OPTIONS |
grep $opt >/dev
/null
2>&1; then
6581 if [ "$SKIP" = "no" ]; then
6582 echo "$opt" >> .options
6586 # reconstruct BUILD_OPTIONS with a sorted negative feature list
6587 # (ie. only things that are missing are will be put into the build key)
6589 if [ -f .options
]; then
6590 for opt
in `sort -f .options | uniq`; do
6591 BUILD_OPTIONS
="$BUILD_OPTIONS no-$opt"
6596 # QT_NO* defines affect the Qt API (and binary compatibility). they need
6597 # to be included in the build key
6598 for build_option
in $D_FLAGS; do
6599 build_option
=`echo $build_option | cut -d \" -f 2 -`
6600 case "$build_option" in
6602 echo "$build_option" >> .options
6605 # skip all other compiler defines
6610 # sort the compile time defines (helps ensure that changes in this configure
6611 # script don't affect the QT_BUILD_KEY generation)
6612 if [ -f .options
]; then
6613 for opt
in `sort -f .options | uniq`; do
6614 BUILD_OPTIONS
="$BUILD_OPTIONS $opt"
6619 BUILD_OPTIONS
="$BUILD_CONFIG $BUILD_OPTIONS"
6620 # extract the operating system from the XPLATFORM
6621 TARGET_OPERATING_SYSTEM
=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
6623 # when cross-compiling, don't include build-host information (build key is target specific)
6624 QT_BUILD_KEY
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6625 if [ -n "$QT_NAMESPACE" ]; then
6626 QT_BUILD_KEY
="$QT_BUILD_KEY $QT_NAMESPACE"
6628 MAC_NEED_TWO_BUILD_KEYS
="no"
6629 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
6630 QT_BUILD_KEY_CARBON
=$QT_BUILD_KEY
6631 TARGET_OPERATING_SYSTEM
="$TARGET_OPERATING_SYSTEM-cocoa"
6632 QT_BUILD_KEY_COCOA
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6633 if [ "$CFG_MAC_CARBON" = "no" ]; then
6634 QT_BUILD_KEY
=$QT_BUILD_KEY_COCOA
6636 MAC_NEED_TWO_BUILD_KEYS
="yes"
6639 # don't break loading plugins build with an older version of Qt
6640 QT_BUILD_KEY_COMPAT
=
6641 if [ "$QT_CROSS_COMPILE" = "no" ]; then
6642 # previous versions of Qt used a build key built from the uname
6643 QT_BUILD_KEY_COMPAT
="$CFG_USER_BUILD_KEY $UNAME_MACHINE $UNAME_SYSTEM $COMPILER $BUILD_OPTIONS"
6644 if [ -n "$QT_NAMESPACE" ]; then
6645 QT_BUILD_KEY_COMPAT
="$QT_BUILD_KEY_COMPAT $QT_NAMESPACE"
6648 # strip out leading/trailing/extra whitespace
6649 QT_BUILD_KEY
=`echo $QT_BUILD_KEY | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6650 QT_BUILD_KEY_COMPAT
=`echo $QT_BUILD_KEY_COMPAT | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6652 #-------------------------------------------------------------------------------
6653 # part of configuration information goes into qconfig.h
6654 #-------------------------------------------------------------------------------
6656 case "$CFG_QCONFIG" in
6658 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6661 tmpconfig
="$outpath/src/corelib/global/qconfig.h.new"
6662 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6663 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6664 echo "#endif" >>"$tmpconfig"
6668 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6672 # define QT_EDITION $QT_EDITION
6675 /* Machine byte-order */
6676 #define Q_BIG_ENDIAN 4321
6677 #define Q_LITTLE_ENDIAN 1234
6680 if [ "$MAC_NEED_TWO_BUILD_KEYS" = "no" ]; then
6681 echo "#define QT_BUILD_KEY \"$QT_BUILD_KEY\"" \
6682 >> "$outpath/src/corelib/global/qconfig.h.new"
6684 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6686 #define QT_BUILD_KEY_CARBON "$QT_BUILD_KEY_CARBON"
6687 #define QT_BUILD_KEY_COCOA "$QT_BUILD_KEY_COCOA"
6691 if [ -n "$QT_BUILD_KEY_COMPAT" ]; then
6692 echo "#define QT_BUILD_KEY_COMPAT \"$QT_BUILD_KEY_COMPAT\"" \
6693 >> "$outpath/src/corelib/global/qconfig.h.new"
6695 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6697 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6698 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6699 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6700 #if defined(__BIG_ENDIAN__)
6701 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6702 #elif defined(__LITTLE_ENDIAN__)
6703 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6705 # error "Unable to determine byte order!"
6709 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6711 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6712 if [ "$CFG_ENDIAN" = "auto" ]; then
6713 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6714 #if defined(__BIG_ENDIAN__)
6715 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6716 #elif defined(__LITTLE_ENDIAN__)
6717 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6719 # error "Unable to determine byte order!"
6723 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6725 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6727 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6728 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6729 /* Non-IEEE double format */
6730 #define Q_DOUBLE_LITTLE "01234567"
6731 #define Q_DOUBLE_BIG "76543210"
6732 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6733 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6734 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6737 if [ "$CFG_ARMFPA" = "yes" ]; then
6738 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6739 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6740 #ifndef QT_BOOTSTRAPPED
6745 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6749 CFG_ARCH_STR
=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6750 CFG_HOST_ARCH_STR
=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6751 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6752 /* Machine Architecture */
6753 #ifndef QT_BOOTSTRAPPED
6754 # define QT_ARCH_${CFG_ARCH_STR}
6756 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6760 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6761 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6763 if [ "$CFG_LARGEFILE" = "yes" ]; then
6764 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6767 # if both carbon and cocoa are specified, enable the autodetection code.
6768 if [ "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
6769 echo "#define AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6770 elif [ "$CFG_MAC_COCOA" = "yes" ]; then
6771 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6774 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6775 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6778 if [ "$PLATFORM_MAC" = "yes" ]; then
6779 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6780 #if defined(__LP64__)
6781 # define QT_POINTER_SIZE 8
6783 # define QT_POINTER_SIZE 4
6787 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6788 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6792 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6794 if [ "$CFG_DEV" = "yes" ]; then
6795 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6798 # Embedded compile time options
6799 if [ "$PLATFORM_QWS" = "yes" ]; then
6800 # Add QWS to config.h
6801 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_WS_QWS"
6803 # Add excluded decorations to $QCONFIG_FLAGS
6804 decors
=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
6805 for decor
in $decors; do
6806 NODECORATION
=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6807 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
6810 # Figure which embedded drivers which are turned off
6811 CFG_GFX_OFF
="$CFG_GFX_AVAILABLE"
6812 for ADRIVER
in $CFG_GFX_ON; do
6813 CFG_GFX_OFF
=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
6816 CFG_KBD_OFF
="$CFG_KBD_AVAILABLE"
6817 # the um driver is currently not in the available list for external builds
6818 if [ "$CFG_DEV" = "no" ]; then
6819 CFG_KBD_OFF
="$CFG_KBD_OFF um"
6821 for ADRIVER
in $CFG_KBD_ON; do
6822 CFG_KBD_OFF
=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
6825 CFG_MOUSE_OFF
="$CFG_MOUSE_AVAILABLE"
6826 for ADRIVER
in $CFG_MOUSE_ON; do
6827 CFG_MOUSE_OFF
=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
6830 for DRIVER
in $CFG_GFX_OFF; do
6831 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6832 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
6835 for DRIVER
in $CFG_KBD_OFF; do
6836 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6837 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
6840 for DRIVER
in $CFG_MOUSE_OFF; do
6841 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6842 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
6846 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6847 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6850 # Add turned on SQL drivers
6851 for DRIVER
in $CFG_SQL_AVAILABLE; do
6852 eval "VAL=\$CFG_SQL_$DRIVER"
6855 ONDRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6856 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6857 SQL_DRIVERS
="$SQL_DRIVERS $DRIVER"
6860 SQL_PLUGINS
="$SQL_PLUGINS $DRIVER"
6866 QMakeVar
set sql-drivers
"$SQL_DRIVERS"
6867 QMakeVar
set sql-plugins
"$SQL_PLUGINS"
6869 # Add other configuration options to the qconfig.h file
6870 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6871 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
6872 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6873 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6874 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
6875 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ZLIB"
6876 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6877 [ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6"
6878 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SXE"
6879 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_DBUS"
6881 if [ "$PLATFORM_QWS" != "yes" ]; then
6882 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
6883 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
6884 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
6887 # X11/Unix/Mac only configs
6888 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CUPS"
6889 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ICONV"
6890 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GLIB"
6891 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6892 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6893 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6894 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MREMAP"
6895 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6896 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6897 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6898 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_INOTIFY"
6899 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NAS"
6900 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NIS"
6901 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENSSL"
6902 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6904 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6905 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XCURSOR"
6906 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XFIXES"
6907 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6908 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINERAMA"
6909 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XKB"
6910 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRANDR"
6911 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRENDER"
6912 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MITSHM"
6913 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SHAPE"
6914 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XSYNC"
6915 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6917 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6918 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6919 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6920 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6921 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6922 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ALSA"
6924 # sort QCONFIG_FLAGS for neatness if we can
6925 [ '!' -z "$AWK" ] && QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6926 QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS`
6928 if [ -n "$QCONFIG_FLAGS" ]; then
6929 for cfg
in $QCONFIG_FLAGS; do
6930 cfgd
=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6931 cfg
=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6932 # figure out define logic, so we can output the correct
6933 # ifdefs to override the global defines in a project
6935 if [ true
] && echo "$cfgd" |
grep 'QT_NO_' >/dev
/null
2>&1; then
6936 # QT_NO_option can be forcefully turned on by QT_option
6937 cfgdNeg
=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6938 elif [ true
] && echo "$cfgd" |
grep 'QT_' >/dev
/null
2>&1; then
6939 # QT_option can be forcefully turned off by QT_NO_option
6940 cfgdNeg
=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6943 if [ -z $cfgdNeg ]; then
6944 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6951 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6952 #if defined($cfgd) && defined($cfgdNeg)
6954 #elif !defined($cfgd) && !defined($cfgdNeg)
6963 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6964 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6965 #define QT_VISIBILITY_AVAILABLE
6970 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6971 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6972 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6974 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w
"$outpath/src/corelib/global/qconfig.h"
6975 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6976 chmod -w "$outpath/src/corelib/global/qconfig.h"
6977 for conf
in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
6978 if [ '!' -f "$conf" ]; then
6979 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
6984 #-------------------------------------------------------------------------------
6985 # save configuration into qconfig.pri
6986 #-------------------------------------------------------------------------------
6988 QTCONFIG
="$outpath/mkspecs/qconfig.pri"
6989 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG no_mocdepend"
6990 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6991 if [ "$CFG_DEBUG" = "yes" ]; then
6992 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG debug"
6993 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6994 QT_CONFIG
="$QT_CONFIG release"
6996 QT_CONFIG
="$QT_CONFIG debug"
6997 elif [ "$CFG_DEBUG" = "no" ]; then
6998 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG release"
6999 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7000 QT_CONFIG
="$QT_CONFIG debug"
7002 QT_CONFIG
="$QT_CONFIG release"
7004 if [ "$CFG_STL" = "yes" ]; then
7005 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG stl"
7007 if [ "$CFG_FRAMEWORK" = "no" ]; then
7008 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_no_framework"
7010 QT_CONFIG
="$QT_CONFIG qt_framework"
7011 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_framework"
7013 if [ "$PLATFORM_MAC" = "yes" ]; then
7014 QT_CONFIG
="$QT_CONFIG $CFG_MAC_ARCHS"
7016 if [ "$CFG_DEV" = "yes" ]; then
7017 QT_CONFIG
="$QT_CONFIG private_tests"
7020 # Make the application arch follow the Qt arch for single arch builds.
7021 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7022 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7023 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7026 cat >>"$QTCONFIG.tmp" <<EOF
7028 CONFIG += $QTCONFIG_CONFIG
7030 QT_EDITION = $Edition
7031 QT_CONFIG += $QT_CONFIG
7034 QT_VERSION = $QT_VERSION
7035 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7036 QT_MINOR_VERSION = $QT_MINOR_VERSION
7037 QT_PATCH_VERSION = $QT_PATCH_VERSION
7040 QT_LIBINFIX = $QT_LIBINFIX
7041 QT_NAMESPACE = $QT_NAMESPACE
7042 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7045 if [ "$CFG_RPATH" = "yes" ]; then
7046 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7048 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7049 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7050 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7051 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7053 # replace qconfig.pri if it differs from the newly created temp file
7054 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7055 rm -f "$QTCONFIG.tmp"
7057 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7060 #-------------------------------------------------------------------------------
7061 # save configuration into .qmake.cache
7062 #-------------------------------------------------------------------------------
7064 CACHEFILE
="$outpath/.qmake.cache"
7065 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7066 cat >>"$CACHEFILE.tmp" <<EOF
7067 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
7068 QT_SOURCE_TREE = \$\$quote($relpath)
7069 QT_BUILD_TREE = \$\$quote($outpath)
7070 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7071 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7072 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7074 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7075 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7076 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7077 QMAKE_UIC3 = \$\$QT_BUILD_TREE/bin/uic3
7078 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7079 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
7080 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7081 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7085 # Ensure we can link to uninistalled libraries
7086 if linkerSupportsFlag
-rpath-link "$outpath/lib"; then
7087 echo "QMAKE_LFLAGS += -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp"
7090 if [ -n "$QT_CFLAGS_PSQL" ]; then
7091 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp"
7093 if [ -n "$QT_LFLAGS_PSQL" ]; then
7094 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$CACHEFILE.tmp"
7096 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7097 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7099 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7100 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7102 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7103 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7105 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7106 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7108 if [ -n "$QT_LFLAGS_ODBC" ]; then
7109 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$CACHEFILE.tmp"
7112 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7113 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
7116 #dump in the OPENSSL_LIBS info
7117 if [ '!' -z "$OPENSSL_LIBS" ]; then
7118 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp"
7119 elif [ "$CFG_OPENSSL" = "linked" ]; then
7120 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$CACHEFILE.tmp"
7123 #dump in the SDK info
7124 if [ '!' -z "$CFG_SDK" ]; then
7125 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$CACHEFILE.tmp"
7128 # mac gcc -Xarch support
7129 if [ "$CFG_MAC_XARCH" = "no" ]; then
7130 echo "QMAKE_MAC_XARCH = no" >> "$CACHEFILE.tmp"
7133 #dump the qmake spec
7134 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7135 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7137 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7141 cat "$QMAKE_VARS_FILE" >> "$CACHEFILE.tmp"
7142 rm -f "$QMAKE_VARS_FILE" 2>/dev
/null
7146 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4
>/dev
/null
2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL
="yes"
7147 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7148 find "$relpath" -perm u
+w
-mtime -3 |
grep 'cpp$' |
while read f
; do
7149 # don't need to worry about generated files
7150 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7151 basename "$f" |
grep '^moc_' >/dev
/null
2>&1 && continue
7153 INCREMENTAL
="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7155 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7156 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7159 # replace .qmake.cache if it differs from the newly created temp file
7160 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7161 rm -f "$CACHEFILE.tmp"
7163 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7166 #-------------------------------------------------------------------------------
7167 # give feedback on configuration
7168 #-------------------------------------------------------------------------------
7172 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7175 This target is using the GNU C++ compiler ($PLATFORM).
7177 Recent versions of this compiler automatically include code for
7178 exceptions, which increase both the size of the Qt libraries and
7179 the amount of memory taken by your applications.
7181 You may choose to re-run `basename $0` with the -no-exceptions
7182 option to compile Qt without exceptions. This is completely binary
7183 compatible, and existing applications will continue to work.
7191 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7194 This target is using the MIPSpro C++ compiler ($PLATFORM).
7196 You may choose to re-run `basename $0` with the -no-exceptions
7197 option to compile Qt without exceptions. This will make the
7198 size of the Qt library smaller and reduce the amount of memory
7199 taken by your applications.
7210 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7212 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
7213 in debug mode will run out of memory on systems with 2GB or less.
7214 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
7215 -no-webkit or -release to skip webkit debug.
7220 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7221 echo "Build type: $PLATFORM"
7223 echo "Building on: $PLATFORM"
7224 echo "Building for: $XPLATFORM"
7227 if [ "$PLATFORM_MAC" = "yes" ]; then
7228 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7230 echo "Architecture: $CFG_ARCH"
7233 if [ "$PLATFORM_QWS" = "yes" ]; then
7234 echo "Host architecture: $CFG_HOST_ARCH"
7237 if [ "$PLATFORM_MAC" = "yes" ]; then
7238 if [ "$CFG_MAC_COCOA" = "yes" ]; then
7239 if [ "$CFG_MAC_CARBON" = "yes" ]; then
7240 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
7242 echo "Using framework: Cocoa"
7245 echo "Using framework: Carbon"
7249 if [ -n "$PLATFORM_NOTES" ]; then
7250 echo "Platform notes:"
7251 echo "$PLATFORM_NOTES"
7256 if [ "$OPT_VERBOSE" = "yes" ]; then
7257 if echo '\c' |
grep '\c' >/dev
/null
; then
7258 echo -n "qmake vars .......... "
7260 echo "qmake vars .......... \c"
7262 cat "$QMAKE_VARS_FILE" |
tr '\n' ' '
7263 echo "qmake switches ...... $QMAKE_SWITCHES"
7266 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ......... $INCREMENTAL"
7267 echo "Build ............... $CFG_BUILD_PARTS"
7268 echo "Configuration ....... $QMAKE_CONFIG $QT_CONFIG"
7269 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7270 echo "Debug ............... yes (combined)"
7271 if [ "$CFG_DEBUG" = "yes" ]; then
7272 echo "Default Link ........ debug"
7274 echo "Default Link ........ release"
7277 echo "Debug ............... $CFG_DEBUG"
7279 echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
7280 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
7281 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
7282 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
7283 echo "QtConcurrent code.... $CFG_CONCURRENT"
7284 echo "QtScript module ..... $CFG_SCRIPT"
7285 echo "QtScriptTools module $CFG_SCRIPTTOOLS"
7286 echo "QtXmlPatterns module $CFG_XMLPATTERNS"
7287 echo "Phonon module ....... $CFG_PHONON"
7288 echo "Multimedia module ... $CFG_MULTIMEDIA"
7289 echo "SVG module .......... $CFG_SVG"
7290 echo "WebKit module ....... $CFG_WEBKIT"
7291 if [ "$CFG_WEBKIT" = "yes" ]; then
7292 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7293 echo "JavaScriptCore JIT .. To be decided by JavaScriptCore"
7295 echo "JavaScriptCore JIT .. $CFG_JAVASCRIPTCORE_JIT"
7298 echo "STL support ......... $CFG_STL"
7299 echo "PCH support ......... $CFG_PRECOMPILE"
7300 echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
7301 if [ "${CFG_ARCH}" = "arm" ]; then
7302 echo "iWMMXt support ...... ${CFG_IWMMXT}"
7304 [ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
7305 echo "IPv6 support ........ $CFG_IPV6"
7306 echo "IPv6 ifname support . $CFG_IPV6IFNAME"
7307 echo "getaddrinfo support . $CFG_GETADDRINFO"
7308 echo "getifaddrs support .. $CFG_GETIFADDRS"
7309 echo "Accessibility ....... $CFG_ACCESSIBILITY"
7310 echo "NIS support ......... $CFG_NIS"
7311 echo "CUPS support ........ $CFG_CUPS"
7312 echo "Iconv support ....... $CFG_ICONV"
7313 echo "Glib support ........ $CFG_GLIB"
7314 echo "GStreamer support ... $CFG_GSTREAMER"
7315 echo "Large File support .. $CFG_LARGEFILE"
7316 echo "GIF support ......... $CFG_GIF"
7317 if [ "$CFG_TIFF" = "no" ]; then
7318 echo "TIFF support ........ $CFG_TIFF"
7320 echo "TIFF support ........ $CFG_TIFF ($CFG_LIBTIFF)"
7322 if [ "$CFG_JPEG" = "no" ]; then
7323 echo "JPEG support ........ $CFG_JPEG"
7325 echo "JPEG support ........ $CFG_JPEG ($CFG_LIBJPEG)"
7327 if [ "$CFG_PNG" = "no" ]; then
7328 echo "PNG support ......... $CFG_PNG"
7330 echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
7332 if [ "$CFG_MNG" = "no" ]; then
7333 echo "MNG support ......... $CFG_MNG"
7335 echo "MNG support ......... $CFG_MNG ($CFG_LIBMNG)"
7337 echo "zlib support ........ $CFG_ZLIB"
7338 echo "Session management .. $CFG_SM"
7339 if [ "$PLATFORM_QWS" = "yes" ]; then
7340 echo "Embedded support .... $CFG_EMBEDDED"
7341 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
7342 echo "Freetype2 support ... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
7344 echo "Freetype2 support ... $CFG_QWS_FREETYPE"
7346 # Normalize the decoration output first
7347 CFG_GFX_ON
=`echo ${CFG_GFX_ON}`
7348 CFG_GFX_PLUGIN
=`echo ${CFG_GFX_PLUGIN}`
7349 echo "Graphics (qt) ....... ${CFG_GFX_ON}"
7350 echo "Graphics (plugin) ... ${CFG_GFX_PLUGIN}"
7351 CFG_DECORATION_ON
=`echo ${CFG_DECORATION_ON}`
7352 CFG_DECORATION_PLUGIN
=`echo ${CFG_DECORATION_PLUGIN}`
7353 echo "Decorations (qt) .... $CFG_DECORATION_ON"
7354 echo "Decorations (plugin) $CFG_DECORATION_PLUGIN"
7355 CFG_KBD_ON
=`echo ${CFG_KBD_ON}`
7356 CFG_KBD_PLUGIN
=`echo ${CFG_KBD_PLUGIN}`
7357 echo "Keyboard driver (qt). ${CFG_KBD_ON}"
7358 echo "Keyboard driver (plugin) ${CFG_KBD_PLUGIN}"
7359 CFG_MOUSE_ON
=`echo ${CFG_MOUSE_ON}`
7360 CFG_MOUSE_PLUGIN
=`echo ${CFG_MOUSE_PLUGIN}`
7361 echo "Mouse driver (qt) ... $CFG_MOUSE_ON"
7362 echo "Mouse driver (plugin) $CFG_MOUSE_PLUGIN"
7364 if [ "$CFG_OPENGL" = "desktop" ]; then
7365 echo "OpenGL support ...... yes (Desktop OpenGL)"
7366 elif [ "$CFG_OPENGL" = "es1" ]; then
7367 echo "OpenGL support ...... yes (OpenGL ES 1.x Common profile)"
7368 elif [ "$CFG_OPENGL" = "es1cl" ]; then
7369 echo "OpenGL support ...... yes (OpenGL ES 1.x Common Lite profile)"
7370 elif [ "$CFG_OPENGL" = "es2" ]; then
7371 echo "OpenGL support ...... yes (OpenGL ES 2.x)"
7373 echo "OpenGL support ...... no"
7375 if [ "$CFG_EGL" != "no" ]; then
7376 if [ "$CFG_EGL_GLES_INCLUDES" != "no" ]; then
7377 echo "EGL support ......... yes <GLES/egl.h>"
7379 echo "EGL support ......... yes <EGL/egl.h>"
7382 if [ "$CFG_OPENVG" ]; then
7383 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7384 echo "OpenVG support ...... ShivaVG"
7386 echo "OpenVG support ...... $CFG_OPENVG"
7389 if [ "$PLATFORM_X11" = "yes" ]; then
7390 echo "NAS sound support ... $CFG_NAS"
7391 echo "XShape support ...... $CFG_XSHAPE"
7392 echo "XSync support ....... $CFG_XSYNC"
7393 echo "Xinerama support .... $CFG_XINERAMA"
7394 echo "Xcursor support ..... $CFG_XCURSOR"
7395 echo "Xfixes support ...... $CFG_XFIXES"
7396 echo "Xrandr support ...... $CFG_XRANDR"
7397 echo "Xrender support ..... $CFG_XRENDER"
7398 echo "Xi support .......... $CFG_XINPUT"
7399 echo "MIT-SHM support ..... $CFG_MITSHM"
7400 echo "FontConfig support .. $CFG_FONTCONFIG"
7401 echo "XKB Support ......... $CFG_XKB"
7402 echo "immodule support .... $CFG_IM"
7403 echo "GTK theme support ... $CFG_QGTKSTYLE"
7405 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support ....... $CFG_SQL_mysql"
7406 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support .. $CFG_SQL_psql"
7407 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........ $CFG_SQL_odbc"
7408 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ......... $CFG_SQL_oci"
7409 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ......... $CFG_SQL_tds"
7410 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ......... $CFG_SQL_db2"
7411 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ... $CFG_SQL_ibase"
7412 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support .... $CFG_SQL_sqlite2"
7413 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ...... $CFG_SQL_sqlite ($CFG_SQLITE)"
7416 if [ "$CFG_OPENSSL" = "yes" ]; then
7417 OPENSSL_LINKAGE
="(run-time)"
7418 elif [ "$CFG_OPENSSL" = "linked" ]; then
7419 OPENSSL_LINKAGE
="(linked)"
7421 echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
7423 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
7425 # complain about not being able to use dynamic plugins if we are using a static build
7426 if [ "$CFG_SHARED" = "no" ]; then
7428 echo "WARNING: Using static linking will disable the use of dynamically"
7429 echo "loaded plugins. Make sure to import all needed static plugins,"
7430 echo "or compile needed modules into the library."
7433 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7435 echo "NOTE: When linking against OpenSSL, you can override the default"
7436 echo "library names through OPENSSL_LIBS."
7438 echo " ./configure -openssl-linked OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto'"
7441 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7443 echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
7446 echo "alsa support ........ $CFG_ALSA"
7449 sepath
=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7454 #-------------------------------------------------------------------------------
7455 # build makefiles based on the configuration
7456 #-------------------------------------------------------------------------------
7458 echo "Finding project files. Please wait..."
7459 "$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
7460 if [ -f "${relpath}/projects.pro" ]; then
7461 mkfile
="${outpath}/Makefile"
7462 [ -f "$mkfile" ] && chmod +w
"$mkfile"
7463 QTDIR
="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro" -o "$mkfile"
7466 # .projects -> projects to process
7467 # .projects.1 -> qt and moc
7468 # .projects.2 -> subdirs and libs
7469 # .projects.3 -> the rest
7470 rm -f .projects .projects
.1 .projects
.2 .projects
.3
7472 QMAKE_PROJECTS
=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7473 if [ -z "$AWK" ]; then
7474 for p
in `echo $QMAKE_PROJECTS`; do
7475 echo "$p" >> .projects
7478 cat >projects.
awk <<EOF
7484 first = "./.projects.1.tmp"
7485 second = "./.projects.2.tmp"
7486 third = "./.projects.3.tmp"
7491 if ( ! target_file )
7493 print input_file >target_file
7498 input_file = FILENAME
7503 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7509 matched_target == 0 && /^(TEMPLATE.*=)/ {
7510 if ( \$3 == "subdirs" )
7511 target_file = second
7512 else if ( \$3 == "lib" )
7518 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7519 if ( \$0 ~ /plugin/ )
7522 target_file = second
7527 if ( ! target_file )
7529 print input_file >>target_file
7536 for p
in `echo $QMAKE_PROJECTS`; do
7537 echo "$p" >> .projects.all
7540 # if you get errors about the length of the command line to awk, change the -l arg
7542 split -l 100 .projects.all .projects.all.
7543 for p
in .projects.all.
*; do
7544 "$AWK" -f projects.
awk `cat $p`
7545 [ -f .projects
.1.tmp
] && cat .projects
.1.tmp
>> .projects
.1
7546 [ -f .projects
.2.tmp
] && cat .projects
.2.tmp
>> .projects
.2
7547 [ -f .projects
.3.tmp
] && cat .projects
.3.tmp
>> .projects
.3
7548 rm -f .projects
.1.tmp .projects
.2.tmp .projects
.3.tmp
$p
7550 rm -f .projects.all
* projects.
awk
7552 [ -f .projects
.1 ] && cat .projects
.1 >>.projects
7553 [ -f .projects
.2 ] && cat .projects
.2 >>.projects
7554 rm -f .projects
.1 .projects
.2
7555 if [ -f .projects
.3 ] && [ "$OPT_FAST" = "no" ]; then
7556 cat .projects
.3 >>.projects
7560 # don't sort Qt and MOC in with the other project files
7561 # also work around a segfaulting uniq(1)
7562 if [ -f .sorted.projects
.2 ]; then
7563 sort .sorted.projects
.2 > .sorted.projects
.2.new
7564 mv -f .sorted.projects
.2.new .sorted.projects
.2
7565 cat .sorted.projects
.2 >> .sorted.projects
.1
7567 [ -f .sorted.projects
.1 ] && sort .sorted.projects
.1 >> .sorted.projects
7568 rm -f .sorted.projects
.2 .sorted.projects
.1
7572 if [ -f .projects
]; then
7573 uniq .projects
>.tmp
7574 mv -f .tmp .projects
7575 NORM_PROJECTS
=`cat .projects | wc -l | sed -e "s, ,,g"`
7577 if [ -f .projects
.3 ]; then
7578 uniq .projects
.3 >.tmp
7579 mv -f .tmp .projects
.3
7580 FAST_PROJECTS
=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7582 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7586 for part
in $CFG_BUILD_PARTS; do
7588 tools
) PART_ROOTS
="$PART_ROOTS tools" ;;
7589 libs
) PART_ROOTS
="$PART_ROOTS src" ;;
7590 examples
) PART_ROOTS
="$PART_ROOTS examples demos" ;;
7595 if [ "$CFG_DEV" = "yes" ]; then
7596 PART_ROOTS
="$PART_ROOTS tests"
7599 echo "Creating makefiles. Please wait..."
7600 for file in .projects .projects
.3; do
7601 [ '!' -f "$file" ] && continue
7602 for a
in `cat $file`; do
7604 for r
in $PART_ROOTS; do
7605 if echo "$a" |
grep "^$r" >/dev
/null
2>&1 ||
echo "$a" |
grep "^$relpath/$r" >/dev
/null
2>&1; then
7610 [ "$IN_ROOT" = "no" ] && continue
7613 *winmain
/winmain.pro
) continue ;;
7614 *s60main
/s60main.pro
) continue ;;
7615 *examples
/activeqt
/*) continue ;;
7616 */qmake
/qmake.pro
) continue ;;
7617 *tools
/bootstrap
*|
*tools
/moc
*|
*tools
/rcc
*|
*tools
/uic
*) SPEC
=$QMAKESPEC ;;
7618 *) SPEC
=$XQMAKESPEC ;;
7620 dir
=`dirname "$a" | sed -e "s;$sepath;.;g"`
7621 test -d "$dir" || mkdir
-p "$dir"
7622 OUTDIR
="$outpath/$dir"
7623 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7624 # fast configure - the makefile exists, skip it
7625 # since the makefile exists, it was generated by qmake, which means we
7626 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7628 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7631 QMAKE_SPEC_ARGS
="-spec $SPEC"
7632 if echo '\c' |
grep '\c' >/dev
/null
; then
7638 QMAKE
="$outpath/bin/qmake"
7639 QMAKE_ARGS
="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7640 if [ "$file" = ".projects.3" ]; then
7641 if echo '\c' |
grep '\c' >/dev
/null
; then
7648 cat >"${OUTDIR}/Makefile" <<EOF
7649 # ${OUTDIR}/Makefile: generated by configure
7651 # WARNING: This makefile will be replaced with a real makefile.
7652 # All changes made to this file will be lost.
7654 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7656 cat >>"${OUTDIR}/Makefile" <<EOF
7658 all clean install qmake first Makefile: FORCE
7659 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7667 if [ "$OPT_VERBOSE" = "yes" ]; then
7668 echo " (`basename $SPEC`)"
7669 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7674 [ -f "${OUTDIR}/Makefile" ] && chmod +w
"${OUTDIR}/Makefile"
7675 QTDIR
="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7679 rm -f .projects .projects
.3
7681 #-------------------------------------------------------------------------------
7682 # XShape is important, DnD in the Designer doens't work without it
7683 #-------------------------------------------------------------------------------
7684 if [ "$PLATFORM_X11" = "yes" ] && [ "$CFG_XSHAPE" = "no" ]; then
7687 NOTICE: Qt will not be built with XShape support.
7689 As a result, drag-and-drop in the Qt Designer will NOT
7690 work. We recommend that you enable XShape support by passing
7691 the -xshape switch to $0.
7695 #-------------------------------------------------------------------------------
7696 # check for platforms that we don't yet know about
7697 #-------------------------------------------------------------------------------
7698 if [ "$CFG_ARCH" = "generic" ]; then
7701 NOTICE: Atomic operations are not yet supported for this
7704 Qt will use the 'generic' architecture instead, which uses a
7705 single pthread_mutex_t to protect all atomic operations. This
7706 implementation is the slow (but safe) fallback implementation
7707 for architectures Qt does not yet support.
7711 #-------------------------------------------------------------------------------
7712 # check if the user passed the -no-zlib option, which is no longer supported
7713 #-------------------------------------------------------------------------------
7714 if [ -n "$ZLIB_FORCED" ]; then
7715 which_zlib
="supplied"
7716 if [ "$CFG_ZLIB" = "system" ]; then
7722 NOTICE: The -no-zlib option was supplied but is no longer
7725 Qt now requires zlib support in all builds, so the -no-zlib
7726 option was ignored. Qt will be built using the $which_zlib
7731 #-------------------------------------------------------------------------------
7732 # finally save the executed command to another script
7733 #-------------------------------------------------------------------------------
7734 if [ `basename $0` != "config.status" ]; then
7735 CONFIG_STATUS
="$relpath/$relconf $OPT_CMDLINE"
7737 # add the system variables
7738 for varname
in $SYSTEM_VARIABLES; do
7740 'if [ -n "\$'${varname}'" ]; then
7741 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7746 echo "$CONFIG_STATUS" |
grep '\-confirm\-license' >/dev
/null
2>&1 || CONFIG_STATUS
="$CONFIG_STATUS -confirm-license"
7748 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7749 echo "#!/bin/sh" > "$outpath/config.status"
7750 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7751 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7752 echo "else" >> "$outpath/config.status"
7753 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7754 echo "fi" >> "$outpath/config.status"
7755 chmod +x
"$outpath/config.status"
7758 if [ -n "$RPATH_MESSAGE" ]; then
7760 echo "$RPATH_MESSAGE"
7763 MAKE
=`basename "$MAKE"`
7765 echo Qt is now configured
for building. Just run
\'$MAKE\'.
7766 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7767 echo Once everything is built
, Qt is installed.
7768 echo You should not run
\'$MAKE install\'.
7770 echo Once everything is built
, you must run
\'$MAKE install\'.
7771 echo Qt will be installed into
$QT_INSTALL_PREFIX
7774 echo To reconfigure
, run
\'$MAKE confclean
\' and
\'configure
\'.