3 # Configures to build the Qt library
5 # Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
6 # Contact: Qt Software Information (qt-info@nokia.com)
8 # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
9 # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12 #-------------------------------------------------------------------------------
13 # script initialization
14 #-------------------------------------------------------------------------------
16 # the name of this script
18 # the directory of this script is the "source tree"
20 relpath
=`(cd "$relpath"; /bin/pwd)`
21 # the current directory is the "build tree" or "object tree"
24 #license file location
25 LICENSE_FILE
="$QT_LICENSE_FILE"
26 [ -z "$LICENSE_FILE" ] && LICENSE_FILE
="$HOME/.qt-license"
27 if [ -f "$LICENSE_FILE" ]; then
28 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
29 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
32 # later cache the command line in config.status
33 OPT_CMDLINE
=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
35 # initialize global variables
42 QMAKE_VARS_FILE
=.qmake.vars
46 #-------------------------------------------------------------------------------
48 #-------------------------------------------------------------------------------
50 # Adds a new qmake variable to the cache
51 # Usage: QMakeVar mode varname contents
52 # where mode is one of: set, add, del
66 echo >&2 "BUG: wrong command to QMakeVar: $1"
70 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
73 # relies on $QMAKESPEC being set correctly. parses include statements in
74 # qmake.conf and prints out the expanded file
81 $AWK -v "QMAKESPEC=$tmpSPEC" '
83 fname = QMAKESPEC "/" substr($0, 9, length($0) - 9)
84 while ((getline line < fname) > 0)
89 { print }' "$tmpSPEC/qmake.conf"
92 #-------------------------------------------------------------------------------
93 # operating system detection
94 #-------------------------------------------------------------------------------
96 # need that throughout the script
97 UNAME_MACHINE
=`(uname -m) 2>/dev/null` || UNAME_MACHINE
=unknown
98 UNAME_RELEASE
=`(uname -r) 2>/dev/null` || UNAME_RELEASE
=unknown
99 UNAME_SYSTEM
=`(uname -s) 2>/dev/null` || UNAME_SYSTEM
=unknown
100 UNAME_VERSION
=`(uname -v) 2>/dev/null` || UNAME_VERSION
=unknown
103 #-------------------------------------------------------------------------------
104 # window system detection
105 #-------------------------------------------------------------------------------
111 if [ -f "$relpath"/src
/gui
/kernel
/qapplication_mac.mm
] && [ -d /System
/Library
/Frameworks
/Carbon.framework
]; then
113 # ~ the Carbon SDK exists
114 # ~ src/gui/base/qapplication_mac.cpp is present
115 # ~ this is the internal edition and Qt/Mac sources exist
117 elif [ -f "$relpath"/src
/gui
/kernel
/qapplication_qws.cpp
]; then
119 # ~ src/gui/base/qapplication_qws.cpp is present
120 # ~ this is the free or commercial edition
121 # ~ this is the internal edition and Qt Embedded is explicitly enabled
122 if [ -f "$relpath"/src
/gui
/kernel
/qapplication_mac.mm
]; then
123 # This is a depot build, or an all-platforms package
126 # This must be the embedded package, since the Qt/Mac source files are not present
131 #-----------------------------------------------------------------------------
132 # Qt version detection
133 #-----------------------------------------------------------------------------
134 QT_VERSION
=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
138 if [ -n "$QT_VERSION" ]; then
139 QT_VERSION
=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
140 MAJOR
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
141 if [ -n "$MAJOR" ]; then
142 MINOR
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
143 PATCH
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
144 QT_MAJOR_VERSION
="$MAJOR"
145 [ -z "$MINOR" ] || QT_MINOR_VERSION
="$MINOR"
146 [ -z "$PATCH" ] || QT_PATCH_VERSION
="$PATCH"
149 if [ -z "$QT_MAJOR_VERSION" ]; then
150 echo "Cannot process version from qglobal.h: $QT_VERSION"
151 echo "Cannot proceed."
155 QT_PACKAGEDATE
=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
156 if [ -z "$QT_PACKAGEDATE" ]; then
157 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
158 echo "Cannot proceed"
162 #-------------------------------------------------------------------------------
164 #-------------------------------------------------------------------------------
169 EditionString
=Commercial
173 # parse the arguments, setting things to "yes" or "no"
174 while [ "$#" -gt 0 ]; do
178 #Autoconf style options
180 VAR
=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
184 VAR
=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
188 VAR
=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
189 VAL
=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
192 VAR
=`echo $1 | sed "s,^--no-\(.*\),\1,"`
197 # this option may or may not be followed by an argument
198 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
205 -h|
help|
--help|
-help)
206 if [ "$VAL" = "yes" ]; then
208 COMMERCIAL_USER
="no" #doesn't matter we will display the help
211 COMMERCIAL_USER
="no" #doesn't matter we will display the help
215 VAR
=`echo $1 | sed "s,^--\(.*\),\1,"`
219 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
226 if [ "$UNKNOWN_ARG" = "yes" ]; then
236 if [ "$PLATFORM_QWS" != "no" ]; then
237 if [ "$PLATFORM_QWS" = "maybe" ]; then
243 echo "No license exists to enable Qt for Embedded Linux. Disabling."
256 COMMERCIAL_USER
="yes"
270 if [ "$COMMERCIAL_USER" = "ask" ]; then
272 echo "Which edition of Qt do you want to use ?"
274 echo "Type 'c' if you want to use the Commercial Edition."
275 echo "Type 'o' if you want to use the Open Source Edition."
279 if [ "$commercial" = "c" ]; then
280 COMMERCIAL_USER
="yes"
282 elif [ "$commercial" = "o" ]; then
289 if [ "$CFG_NOKIA" = "yes" ]; then
291 Edition
="NokiaInternalBuild"
292 EditionString
="Nokia Internal Build"
293 QT_EDITION
="QT_EDITION_OPENSOURCE"
294 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
295 elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL
] && [ $COMMERCIAL_USER = "yes" ]; then
296 # Commercial preview release
297 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
300 QT_EDITION
="QT_EDITION_DESKTOP"
301 LicenseType
="Technology Preview"
302 elif [ $COMMERCIAL_USER = "yes" ]; then
303 # one of commercial editions
304 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
305 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS
=yes
307 # read in the license file
308 if [ -f "$LICENSE_FILE" ]; then
309 .
"$LICENSE_FILE" >/dev
/null
2>&1
310 if [ -z "$LicenseKeyExt" ]; then
312 echo "You are using an old license file."
314 echo "Please install the license file supplied by Qt Software,"
315 echo "or install the Qt Open Source Edition if you intend to"
316 echo "develop free software."
319 if [ -z "$Licensee" ]; then
321 echo "Invalid license key. Please check the license key."
325 if [ -z "$LicenseKeyExt" ]; then
327 if echo '\c' |
grep '\c' >/dev
/null
; then
328 echo -n "Please enter your license key: "
330 echo "Please enter your license key: \c"
333 Licensee
="Unknown user"
338 echo "$LicenseKeyExt" |
grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev
/null
2>&1 \
339 && LicenseValid
="yes" \
341 if [ "$LicenseValid" != "yes" ]; then
343 echo "Invalid license key. Please check the license key."
346 ProductCode
=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
347 PlatformCode
=`echo $LicenseKeyExt | cut -f 2 -d - | cut -b 1`
348 LicenseTypeCode
=`echo $LicenseKeyExt | cut -f 3 -d -`
349 LicenseFeatureCode
=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
351 # determine which edition we are licensed to use
352 case "$LicenseTypeCode" in
354 LicenseType
="Commercial"
358 QT_EDITION
="QT_EDITION_UNIVERSAL"
361 Edition
="FullFramework"
362 EditionString
="Full Framework"
363 QT_EDITION
="QT_EDITION_DESKTOP"
366 Edition
="GUIFramework"
367 EditionString
="GUI Framework"
368 QT_EDITION
="QT_EDITION_DESKTOPLIGHT"
373 LicenseType
="Evaluation"
377 QT_EDITION
="QT_EDITION_EVALUATION"
382 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
384 echo "Invalid license key. Please check the license key."
388 # verify that we are licensed to use Qt on this platform
390 if [ "$PlatformCode" = "X" ]; then
392 LICENSE_EXTENSION
="-ALLOS"
393 elif [ "$PLATFORM_QWS" = "yes" ]; then
394 case $PlatformCode in
395 2|
4|
8|A|B|E|G|J|K|P|Q|S|U|V|W
)
396 # Qt for Embedded Linux
397 LICENSE_EXTENSION
="-EMBEDDED"
401 echo "You are not licensed for Qt for Embedded Linux."
403 echo "Please contact sales@trolltech.com to upgrade your license"
404 echo "to include Qt for Embedded Linux, or install the"
405 echo "Qt Open Source Edition if you intend to develop free software."
409 elif [ "$PLATFORM_MAC" = "yes" ]; then
410 case $PlatformCode in
411 2|
4|
5|
7|
9|B|C|E|F|G|L|M|U|W|Y
)
413 LICENSE_EXTENSION
="-DESKTOP"
415 3|
6|
8|A|D|H|J|K|P|Q|S|V
)
417 LICENSE_EXTENSION
="-EMBEDDED"
421 echo "You are not licensed for the Qt/Mac platform."
423 echo "Please contact sales@trolltech.com to upgrade your license"
424 echo "to include the Qt/Mac platform."
429 case $PlatformCode in
430 2|
3|
4|
5|
7|D|E|F|J|M|Q|S|T|V|Z
)
432 LICENSE_EXTENSION
="-DESKTOP"
434 6|
8|
9|A|B|C|G|H|K|P|U|W
)
436 LICENSE_EXTENSION
="-EMBEDDED"
440 echo "You are not licensed for the Qt/X11 platform."
442 echo "Please contact sales@trolltech.com to upgrade your license to"
443 echo "include the Qt/X11 platform, or install the Qt Open Source Edition"
444 echo "if you intend to develop free software."
450 if test -r "$relpath/.LICENSE"; then
451 # Generic, non-final license
453 line
=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
458 *TECHNOLOGY?PREVIEW
*)
465 echo >&2 "Invalid license files; cannot continue"
470 EditionString
="$Edition"
471 QT_EDITION
="QT_EDITION_DESKTOP"
474 case "$LicenseFeatureCode" in
477 case "$LicenseType" in
479 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
482 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
488 case "$LicenseType" in
490 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
493 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
499 echo "Invalid license key. Please check the license key."
503 if [ '!' -f "$outpath/LICENSE" ]; then
504 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
505 echo "this software has disappeared."
507 echo "Sorry, you are not licensed to use this software."
508 echo "Try re-installing."
512 elif [ $COMMERCIAL_USER = "no" ]; then
513 # Open Source edition - may only be used under the terms of the GPL or LGPL.
514 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
515 Licensee
="Open Source"
517 EditionString
="Open Source"
518 QT_EDITION
="QT_EDITION_OPENSOURCE"
521 #-------------------------------------------------------------------------------
522 # initalize variables
523 #-------------------------------------------------------------------------------
525 SYSTEM_VARIABLES
="CC CXX CFLAGS CXXFLAGS LDFLAGS"
526 for varname
in $SYSTEM_VARIABLES; do
527 qmakevarname
="${varname}"
528 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
529 if [ "${varname}" = "LDFLAGS" ]; then
530 qmakevarname
="LFLAGS"
533 'if [ -n "\$'${varname}'" ]; then
534 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
538 # Use CC/CXX to run config.tests
539 mkdir
-p "$outpath/config.tests"
540 rm -f "$outpath/config.tests/.qmake.cache"
541 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
543 QMakeVar add styles
"cde mac motif plastique cleanlooks windows"
544 QMakeVar add decorations
"default windows styled"
545 QMakeVar add gfx-drivers
"linuxfb"
546 QMakeVar add kbd-drivers
"tty"
547 QMakeVar add mouse-drivers
"pc linuxtp"
549 if [ "$CFG_DEV" = "yes" ]; then
550 QMakeVar add kbd-drivers
"um"
553 # QTDIR may be set and point to an old or system-wide Qt installation
556 # the minimum version of libdbus-1 that we require:
557 MIN_DBUS_1_VERSION
=0.62
559 # initalize internal variables
560 CFG_CONFIGURE_EXIT_ON_ERROR
=yes
562 CFG_EXCEPTIONS
=unspecified
563 CFG_SCRIPTTOOLS
=auto
# (yes|no|auto)
564 CFG_XMLPATTERNS
=auto
# (yes|no|auto)
593 CFG_QWS_FREETYPE
=auto
596 QT_DEFAULT_BUILD_PARTS
="libs tools examples demos docs translations"
601 CFG_PHONON_BACKEND
=yes
603 CFG_WEBKIT
=auto
# (yes|no|auto)
605 CFG_GFX_AVAILABLE
="linuxfb transformed qvfb vnc multiscreen"
606 CFG_GFX_ON
="linuxfb multiscreen"
607 CFG_GFX_PLUGIN_AVAILABLE
=
610 CFG_KBD_AVAILABLE
="tty linuxinput sl5000 yopy vr41xx qvfb"
611 CFG_KBD_ON
="tty" #default, see QMakeVar above
612 CFG_MOUSE_AVAILABLE
="pc bus linuxtp yopy vr41xx tslib qvfb"
613 CFG_MOUSE_ON
="pc linuxtp" #default, see QMakeVar above
617 CFG_KBD_PLUGIN_AVAILABLE
=
620 CFG_MOUSE_PLUGIN_AVAILABLE
=
625 CFG_DECORATION_AVAILABLE
="styled windows default"
626 CFG_DECORATION_ON
="${CFG_DECORATION_AVAILABLE}" # all on by default
627 CFG_DECORATION_PLUGIN_AVAILABLE
=
628 CFG_DECORATION_PLUGIN
=
643 CFG_SEPARATE_DEBUG_INFO
=auto
644 CFG_REDUCE_EXPORTS
=auto
649 CFG_REDUCE_RELOCATIONS
=no
654 CFG_ACCESSIBILITY
=auto
658 CFG_DOUBLEFORMAT
=auto
661 CFG_CLOCK_GETTIME
=auto
662 CFG_CLOCK_MONOTONIC
=auto
671 MAC_CONFIG_TEST_COMMANDLINE
= # used to make the configure tests run with the correct arch's and SDK settings
676 COMMANDLINE_MAC_COCOA
=no
678 CFG_PREFIX_INSTALL
=yes
686 XPLATFORM
= # This seems to be the QMAKESPEC, like "linux-g++"
689 OPT_CONFIRM_LICENSE
=no
695 CFG_GRAPHICS_SYSTEM
=default
697 # initalize variables used for installation
705 QT_INSTALL_TRANSLATIONS
=
711 #flags for SQL drivers
719 QT_LFLAGS_ODBC
="-lodbc"
721 # flags for libdbus-1
725 # flags for Glib (X11 only)
729 # flags for GStreamer (X11 only)
733 #-------------------------------------------------------------------------------
734 # check SQL drivers, mouse drivers and decorations available in this package
735 #-------------------------------------------------------------------------------
737 # opensource version removes some drivers, so force them to be off
743 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
744 for a
in "$relpath/src/plugins/sqldrivers/"*; do
746 base_a
=`basename "$a"`
747 CFG_SQL_AVAILABLE
="${CFG_SQL_AVAILABLE} ${base_a}"
748 eval "CFG_SQL_${base_a}=auto"
753 CFG_DECORATION_PLUGIN_AVAILABLE
=
754 if [ -d "$relpath/src/plugins/decorations" ]; then
755 for a
in "$relpath/src/plugins/decorations/"*; do
757 base_a
=`basename "$a"`
758 CFG_DECORATION_PLUGIN_AVAILABLE
="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
763 CFG_KBD_PLUGIN_AVAILABLE
=
764 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
765 for a
in "$relpath/src/plugins/kbddrivers/"*; do
767 base_a
=`basename "$a"`
768 CFG_KBD_PLUGIN_AVAILABLE
="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
773 CFG_MOUSE_PLUGIN_AVAILABLE
=
774 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
775 for a
in "$relpath/src/plugins/mousedrivers/"*; do
777 base_a
=`basename "$a"`
778 CFG_MOUSE_PLUGIN_AVAILABLE
="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
783 CFG_GFX_PLUGIN_AVAILABLE
=
784 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
785 for a
in "$relpath/src/plugins/gfxdrivers/"*; do
787 base_a
=`basename "$a"`
788 CFG_GFX_PLUGIN_AVAILABLE
="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
791 CFG_GFX_OFF
="$CFG_GFX_AVAILABLE" # assume all off
794 #-------------------------------------------------------------------------------
795 # parse command line arguments
796 #-------------------------------------------------------------------------------
798 # parse the arguments, setting things to "yes" or "no"
799 while [ "$#" -gt 0 ]; do
803 #Autoconf style options
805 VAR
=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
809 VAR
=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
813 VAR
=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
814 VAL
=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
817 VAR
=`echo $1 | sed "s,^--no-\(.*\),\1,"`
821 VAR
=`echo $1 | sed "s,^--\(.*\),\1,"`
825 -no-*-*|
-plugin-*-*|
-qt-*-*)
826 VAR
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
827 VAL
=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
831 VAR
=`echo $1 | sed "s,^-no-\(.*\),\1,"`
834 #Qt style yes options
835 -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|
-svg|
-webkit|
-scripttools|
-rpath|
-force-pkg-config)
836 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
839 #Qt style options that pass an argument
841 if [ "$PLATFORM_QWS" != "yes" ]; then
843 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
847 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
851 -prefix|
-docdir|
-headerdir|
-plugindir|
-datadir|
-libdir|
-bindir|
-translationdir|
-sysconfdir|
-examplesdir|
-demosdir|
-depths|
-make|
-nomake|
-platform|
-xplatform|
-buildkey|
-sdk|
-arch|
-host-arch|
-mysql_config)
852 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
856 #Qt style complex options in one command
857 -enable-*|
-disable-*)
858 VAR
=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
859 VAL
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
861 #Qt Builtin/System style options
862 -no-*|
-system-*|
-qt-*)
863 VAR
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
864 VAL
=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
866 #Options that cannot be generalized
873 # this option may or may not be followed by an argument
874 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
883 # this option may or may not be followed by an argument
884 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
892 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
893 # this option may or may not be followed by an argument
894 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
903 VAL
=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
907 VAL
=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
926 if [ "$1" = "-D" ]; then
930 VAL
=`echo $1 | sed 's,-D,,'`
935 if [ "$1" = "-I" ]; then
939 VAL
=`echo $1 | sed 's,-I,,'`
944 if [ "$1" = "-L" ]; then
948 VAL
=`echo $1 | sed 's,-L,,'`
953 if [ "$1" = "-R" ]; then
957 VAL
=`echo $1 | sed 's,-R,,'`
962 VAL
=`echo $1 | sed 's,-l,,'`
966 if [ "$1" = "-F" ]; then
970 VAL
=`echo $1 | sed 's,-F,,'`
975 if [ "$1" = "-fw" ]; then
979 VAL
=`echo $1 | sed 's,-fw,,'`
983 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
990 if [ "$UNKNOWN_ARG" = "yes" ]; then
991 echo "$1: unknown argument"
1002 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1003 CFG_QT3SUPPORT
="$VAL"
1009 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1010 CFG_ACCESSIBILITY
="$VAL"
1019 CFG_USE_GNUMAKE
="$VAL"
1022 CFG_MYSQL_CONFIG
="$VAL"
1025 QT_INSTALL_PREFIX
="$VAL"
1028 QT_HOST_PREFIX
="$VAL"
1031 QT_FORCE_PKGCONFIG
=yes
1034 QT_INSTALL_DOCS
="$VAL"
1037 QT_INSTALL_HEADERS
="$VAL"
1040 QT_INSTALL_PLUGINS
="$VAL"
1043 QT_INSTALL_DATA
="$VAL"
1046 QT_INSTALL_LIBS
="$VAL"
1055 QT_INSTALL_TRANSLATIONS
="$VAL"
1057 sysconfdir|settingsdir
)
1058 QT_INSTALL_SETTINGS
="$VAL"
1061 QT_INSTALL_EXAMPLES
="$VAL"
1064 QT_INSTALL_DEMOS
="$VAL"
1070 QT_INSTALL_BINS
="$VAL"
1073 CFG_USER_BUILD_KEY
="$VAL"
1080 if [ "$PLATFORM_QWS" != "no" ]; then
1081 if [ "$PLATFORM_QWS" = "maybe" ]; then
1087 echo "No license exists to enable Qt for Embedded Linux. Disabling."
1092 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1099 if [ "$VAL" = "little" ]; then
1100 CFG_ENDIAN
="Q_LITTLE_ENDIAN"
1101 elif [ "$VAL" = "big" ]; then
1102 CFG_ENDIAN
="Q_BIG_ENDIAN"
1108 if [ "$VAL" = "little" ]; then
1109 CFG_HOST_ENDIAN
="Q_LITTLE_ENDIAN"
1110 elif [ "$VAL" = "big" ]; then
1111 CFG_HOST_ENDIAN
="Q_BIG_ENDIAN"
1117 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1124 CFG_QWS_DEPTHS
="$VAL"
1127 if [ "$VAL" = "auto" ] ||
[ "$VAL" = "desktop" ] ||
1128 [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
1129 [ "$VAL" = "es1cl" ] ||
[ "$VAL" = "es1" ] ||
[ "$VAL" = "es2" ]; then
1136 if [ "$PLATFORM_QWS" = "yes" ]; then
1137 echo "Error: Graphics System plugins are not supported on QWS."
1138 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1139 echo " rather than existing as a separate plugin."
1143 if [ "$VAL" = "opengl" ]; then
1144 CFG_GRAPHICS_SYSTEM
="opengl"
1145 elif [ "$VAL" = "raster" ]; then
1146 CFG_GRAPHICS_SYSTEM
="raster"
1153 qvfb
) # left for commandline compatibility, not documented
1154 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1155 if [ "$VAL" = "yes" ]; then
1156 QMakeVar add gfx-drivers qvfb
1157 QMakeVar add kbd-drivers qvfb
1158 QMakeVar add mouse-drivers qvfb
1159 CFG_GFX_ON
="$CFG_GFX_ON qvfb"
1160 CFG_KBD_ON
="$CFG_KBD_ON qvfb"
1161 CFG_MOUSE_ON
="$CFG_MOUSE_ON qvfb"
1168 CFG_NOBUILD_PARTS
="$CFG_NOBUILD_PARTS $VAL"
1171 CFG_BUILD_PARTS
="$CFG_BUILD_PARTS $VAL"
1174 if [ "$PLATFORM_MAC" = "yes" ]; then
1176 elif [ "$PLATFORM_QWS" = "yes" ]; then
1179 if [ "$CFG_FRAMEWORK" = "auto" ]; then
1185 if [ "$PLATFORM_MAC" = "yes" ]; then
1192 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1193 CFG_MAC_DWARF2
="$VAL"
1199 if [ "$PLATFORM_MAC" = "yes" ]; then
1200 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $VAL"
1209 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1210 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS x86 ppc"
1216 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1217 CFG_MAC_COCOA
="$VAL"
1218 COMMANDLINE_MAC_COCOA
="$VAL"
1224 if [ "$PLATFORM_MAC" = "yes" ]; then
1225 CFG_FRAMEWORK
="$VAL"
1231 if [ "$VAL" = "yes" ]; then
1233 QMakeVar add QMAKE_CFLAGS
-pg
1234 QMakeVar add QMAKE_CXXFLAGS
-pg
1235 QMakeVar add QMAKE_LFLAGS
-pg
1236 QMAKE_VARS
="$QMAKE_VARS CONFIG+=nostrip"
1241 exceptions|g
++-exceptions)
1242 if [ "$VAL" = "no" ]; then
1244 elif [ "$VAL" = "yes" ]; then
1252 # keep compatibility with old platform names
1258 PLATFORM
=hpux-acc-o64
1261 PLATFORM
=hpux-acc-64
1264 PLATFORM
=hpux-acc-64
1276 PLATFORM
=reliant-cds-64
1279 PLATFORM
=solaris-cc-64
1282 PLATFORM
=solaris-cc-64
1285 PLATFORM
=unixware-cc
1288 PLATFORM
=unixware-g
++
1291 PLATFORM
=unixware-cc
1294 PLATFORM
=unixware-g
++
1300 i386
) NATIVE_64_ARCH
="x86_64" ;;
1301 powerpc
) NATIVE_64_ARCH
="ppc64" ;;
1302 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1304 if [ ! -z "$NATIVE_64_ARCH" ]; then
1305 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1306 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1315 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1316 CFG_DEBUG_RELEASE
="$VAL"
1322 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1323 CFG_RELEASE_QMAKE
="$VAL"
1329 if [ "$VAL" = "yes" ]; then
1331 elif [ "$VAL" = "no" ]; then
1338 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1339 CFG_PREFIX_INSTALL
="$VAL"
1347 developer-build|commercial|opensource|nokia-developer
)
1348 # These switches have been dealt with already
1351 if [ "$VAL" = "yes" ]; then
1353 elif [ "$VAL" = "no" ]; then
1360 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1361 CFG_INCREMENTAL
="$VAL"
1367 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1368 CFG_CONFIGURE_EXIT_ON_ERROR
="$VAL"
1374 if [ "$PLATFORM_QWS" = "yes" ]; then
1375 FEATURE
=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1376 if [ "$VAL" = "no" ]; then
1377 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_$FEATURE"
1378 elif [ "$VAL" = "yes" ] ||
[ "$VAL" = "unknown" ]; then
1379 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_$FEATURE"
1388 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1395 [ "$VAL" = "qt" ] && VAL
=yes
1396 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1403 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1411 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1418 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1425 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1432 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1439 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1440 CFG_PRECOMPILE
="$VAL"
1445 separate-debug-info
)
1446 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1447 CFG_SEPARATE_DEBUG_INFO
="$VAL"
1453 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1454 CFG_REDUCE_EXPORTS
="$VAL"
1460 if [ "$VAL" = "no" ]; then
1467 if [ "$VAL" = "no" ]; then
1474 if [ "$VAL" = "no" ]; then
1481 if [ "$VAL" = "no" ]; then
1491 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1492 CFG_REDUCE_RELOCATIONS
="$VAL"
1498 [ "$VAL" = "qt" ] && VAL
=yes
1499 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1500 CFG_QWS_FREETYPE
="$VAL"
1506 [ "$VAL" = "qt" ] && VAL
=yes
1507 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1512 # No longer supported:
1513 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1516 if [ "$VAL" = "system" ]; then
1523 [ "$VAL" = "yes" ] && VAL
=qt
1524 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1531 [ "$VAL" = "yes" ] && VAL
=qt
1532 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1539 [ "$VAL" = "yes" ] && VAL
=qt
1540 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1547 [ "$VAL" = "yes" ] && VAL
=qt
1548 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1555 if [ "$VAL" = "system" ] ||
[ "$VAL" = "no" ]; then
1562 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1569 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1576 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1583 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1590 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1597 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1598 CFG_FONTCONFIG
="$VAL"
1604 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1611 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1618 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1625 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1632 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1633 CFG_GSTREAMER
="$VAL"
1639 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1640 CFG_QGTKSTYLE
="$VAL"
1646 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "linked" ]; then
1648 elif [ "$VAL" = "runtime" ]; then
1655 if [ "$VAL" = "yes" ]; then
1662 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1669 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1670 CFG_LARGEFILE
="$VAL"
1676 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1683 if [ "$VAL" = "yes" ]; then
1684 CFG_OPENSSL
="linked"
1690 if [ "$VAL" = "yes" ]; then
1698 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1699 CFG_XMLPATTERNS
="yes"
1701 if [ "$VAL" = "no" ]; then
1702 CFG_XMLPATTERNS
="no"
1709 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1710 CFG_SCRIPTTOOLS
="yes"
1712 if [ "$VAL" = "no" ]; then
1713 CFG_SCRIPTTOOLS
="no"
1720 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1723 if [ "$VAL" = "no" ]; then
1731 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1734 if [ "$VAL" = "no" ]; then
1742 if [ "$VAL" = "yes" ]; then
1743 OPT_CONFIRM_LICENSE
="$VAL"
1749 if [ "$VAL" = "yes" ]; then
1755 sql-
*|gfx-
*|decoration-
*|kbd-
*|mouse-
*)
1756 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1757 # if autoconf style options were used, $VAL can be "yes" or "no"
1758 [ "$VAL" = "yes" ] && VAL
=qt
1759 # now $VAL should be "no", "qt", or "plugin"... double-check
1760 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1763 # now $VAL is "no", "qt", or "plugin"
1765 VAL
=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1766 VAR
=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1768 # Grab the available values
1771 avail
="$CFG_SQL_AVAILABLE"
1774 avail
="$CFG_GFX_AVAILABLE"
1775 if [ "$OPT" = "plugin" ]; then
1776 avail
="$CFG_GFX_PLUGIN_AVAILABLE"
1780 avail
="$CFG_DECORATION_AVAILABLE"
1781 if [ "$OPT" = "plugin" ]; then
1782 avail
="$CFG_DECORATION_PLUGIN_AVAILABLE"
1786 avail
="$CFG_KBD_AVAILABLE"
1787 if [ "$OPT" = "plugin" ]; then
1788 avail
="$CFG_KBD_PLUGIN_AVAILABLE"
1792 avail
="$CFG_MOUSE_AVAILABLE"
1793 if [ "$OPT" = "plugin" ]; then
1794 avail
="$CFG_MOUSE_PLUGIN_AVAILABLE"
1799 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1803 # Check that that user's value is available.
1806 if [ "$VAL" = "$d" ]; then
1811 [ "$found" = yes ] || ERROR
=yes
1813 if [ "$VAR" = "sql" ]; then
1814 # set the CFG_SQL_driver
1815 eval "CFG_SQL_$VAL=\$OPT"
1819 if [ "$OPT" = "plugin" ] ||
[ "$OPT" = "qt" ]; then
1820 if [ "$OPT" = "plugin" ]; then
1821 [ "$VAR" = "decoration" ] && QMakeVar del
"${VAR}s" "$VAL"
1822 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
1823 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
1824 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
1825 [ "$VAR" = "mouse" ] && QMakeVar del
"${VAR}s" "$VAL"
1826 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
1827 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
1828 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
1831 if [ "$VAR" = "gfx" ] ||
[ "$VAR" = "kbd" ] ||
[ "$VAR" = "decoration" ] ||
[ "$VAR" = "mouse" ]; then
1832 [ "$VAR" = "gfx" ] && CFG_GFX_ON
="$CFG_GFX_ON $VAL"
1833 [ "$VAR" = "kbd" ] && CFG_KBD_ON
="$CFG_KBD_ON $VAL"
1834 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
="$CFG_DECORATION_ON $VAL"
1835 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
="$CFG_MOUSE_ON $VAL"
1839 QMakeVar add
"${VAR}s" "${VAL}"
1840 elif [ "$OPT" = "no" ]; then
1841 PLUG_VAR
="${VAR}-plugin"
1842 if [ "$VAR" = "gfx" ] ||
[ "$VAR" = "kbd" ] ||
[ "$VAR" = "mouse" ]; then
1843 IN_VAR
="${VAR}-driver"
1847 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
1848 [ "$VAR" = "gfx" ] && CFG_GFX_ON
=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
1849 [ "$VAR" = "kbd" ] && CFG_KBD_ON
=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
1850 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
1851 QMakeVar del
"${IN_VAR}s" "$VAL"
1852 QMakeVar del
"${PLUG_VAR}s" "$VAL"
1854 if [ "$ERROR" = "yes" ]; then
1855 echo "$CURRENT_OPT: unknown argument"
1860 if [ "$VAL" = "yes" ]; then
1861 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1862 QMAKE_SWITCHES
="$QMAKE_SWITCHES -d"
1866 elif [ "$VAL" = "no" ]; then
1867 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" |
grep ' -d' >/dev
/null
2>&1; then
1868 QMAKE_SWITCHES
=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1877 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1884 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1891 D_FLAGS
="$D_FLAGS \"$VAL\""
1894 I_FLAGS
="$I_FLAGS -I\"${VAL}\""
1897 L_FLAGS
="$L_FLAGS -L\"${VAL}\""
1900 RPATH_FLAGS
="$RPATH_FLAGS \"${VAL}\""
1903 l_FLAGS
="$l_FLAGS -l\"${VAL}\""
1906 if [ "$PLATFORM_MAC" = "yes" ]; then
1907 L_FLAGS
="$L_FLAGS -F\"${VAL}\""
1908 I_FLAGS
="$I_FLAGS -F\"${VAL}\""
1914 if [ "$PLATFORM_MAC" = "yes" ]; then
1915 l_FLAGS
="$l_FLAGS -framework \"${VAL}\""
1924 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1931 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1932 CFG_PHONON_BACKEND
="$VAL"
1941 if [ "$UNKNOWN_OPT" = "yes" ]; then
1942 echo "${CURRENT_OPT}: invalid command-line switch"
1948 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
1949 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
1953 # update QT_CONFIG to show our current predefined configuration
1954 case "$CFG_QCONFIG" in
1955 minimal|small|medium|large|full
)
1956 # these are a sequence of increasing functionality
1957 for c
in minimal small medium large full
; do
1958 QT_CONFIG
="$QT_CONFIG $c-config"
1959 [ "$CFG_QCONFIG" = $c ] && break
1963 # not known to be sufficient for anything
1964 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ]; then
1965 echo >&2 "Error: configuration file not found:"
1966 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
1971 #-------------------------------------------------------------------------------
1972 # build tree initialization
1973 #-------------------------------------------------------------------------------
1975 # where to find which..
1976 unixtests
="$relpath/config.tests/unix"
1977 mactests
="$relpath/config.tests/mac"
1978 WHICH
="$unixtests/which.test"
1980 PERL
=`$WHICH perl 2>/dev/null`
1982 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
1984 for e
in gawk nawk
awk; do
1985 if "$WHICH" $e >/dev
/null
2>&1 && ( $e -f /dev
/null
/dev
/null
) >/dev
/null
2>&1; then
1991 ### skip this if the user just needs help...
1992 if [ "$OPT_HELP" != "yes" ]; then
1994 # is this a shadow build?
1995 if [ "$OPT_SHADOW" = "maybe" ]; then
1997 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
1998 if [ -h "$outpath" ]; then
1999 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW
=yes
2005 if [ "$OPT_SHADOW" = "yes" ]; then
2006 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" ]; then
2007 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2008 echo >&2 "Cannot proceed."
2011 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2014 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2016 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2017 echo "By default, Qt is built in release mode with separate debug information, so"
2018 echo "-debug-and-release is not necessary anymore"
2022 # detect build style
2023 if [ "$CFG_DEBUG" = "auto" ]; then
2024 if [ "$PLATFORM_MAC" = "yes" ]; then
2025 CFG_DEBUG_RELEASE
=yes
2027 elif [ "$CFG_DEV" = "yes" ]; then
2028 CFG_DEBUG_RELEASE
=no
2031 CFG_DEBUG_RELEASE
=no
2035 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2036 QMAKE_CONFIG
="$QMAKE_CONFIG build_all"
2039 if [ "$CFG_SILENT" = "yes" ]; then
2040 QMAKE_CONFIG
="$QMAKE_CONFIG silent"
2043 # if the source tree is different from the build tree,
2044 # symlink or copy part of the sources
2045 if [ "$OPT_SHADOW" = "yes" ]; then
2046 echo "Preparing build tree..."
2048 if [ -z "$PERL" ]; then
2050 echo "You need perl in your PATH to make a shadow build."
2051 echo "Cannot proceed."
2055 [ -d "$outpath/bin" ] || mkdir
-p "$outpath/bin"
2057 # symlink the qmake directory
2058 find "$relpath/qmake" |
while read a
; do
2059 my_a
=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2060 if [ '!' -f "$my_a" ]; then
2061 if [ -d "$a" ]; then
2062 # directories are created...
2065 a_dir
=`dirname "$my_a"`
2066 [ -d "$a_dir" ] || mkdir
-p "$a_dir"
2067 # ... and files are symlinked
2068 case `basename "$a"` in
2069 *.o|
*.d|GNUmakefile
*|qmake
)
2080 # make a syncqt script that can be used in the shadow
2081 rm -f "$outpath/bin/syncqt"
2082 if [ -x "$relpath/bin/syncqt" ]; then
2083 mkdir
-p "$outpath/bin"
2084 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2085 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
2086 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" $*" >>"$outpath/bin/syncqt"
2087 chmod 755 "$outpath/bin/syncqt"
2090 # symlink the mkspecs directory
2091 mkdir
-p "$outpath/mkspecs"
2092 rm -f "$outpath"/mkspecs
/*
2093 ln -s "$relpath"/mkspecs
/* "$outpath/mkspecs"
2094 rm -f "$outpath/mkspecs/default"
2096 # symlink the doc directory
2097 rm -rf "$outpath/doc"
2098 ln -s "$relpath/doc" "$outpath/doc"
2100 # make sure q3porting.xml can be found
2101 mkdir
-p "$outpath/tools/porting/src"
2102 rm -f "$outpath/tools/porting/src/q3porting.xml"
2103 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2106 # symlink files from src/gui/embedded neccessary to build qvfb
2107 if [ "$CFG_DEV" = "yes" ]; then
2108 mkdir
-p "$outpath/tools/qvfb"
2109 for f
in qvfbhdr.h qlock_p.h qlock.cpp qwssignalhandler_p.h qwssignalhandler.cpp
; do
2110 dest
="${outpath}/tools/qvfb/${f}"
2112 ln -s "${relpath}/src/gui/embedded/${f}" "${dest}"
2116 # symlink fonts to be able to run application from build directory
2117 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then
2118 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2119 mkdir
-p "${outpath}/lib"
2120 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2124 if [ "$OPT_FAST" = "auto" ]; then
2125 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2132 # find a make command
2133 if [ -z "$MAKE" ]; then
2135 for mk
in gmake
make; do
2136 if "$WHICH" $mk >/dev
/null
2>&1; then
2141 if [ -z "$MAKE" ]; then
2142 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2143 echo >&2 "Cannot proceed."
2150 #-------------------------------------------------------------------------------
2151 # auto-detect all that hasn't been specified in the arguments
2152 #-------------------------------------------------------------------------------
2154 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED
=auto
2155 if [ "$CFG_EMBEDDED" != "no" ]; then
2156 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2158 [ -z "$PLATFORM" ] && PLATFORM
=qws
/macx-generic-g
++
2159 if [ -z "$XPLATFORM" ]; then
2160 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2161 XPLATFORM
="qws/macx-$CFG_EMBEDDED-g++"
2165 [ -z "$PLATFORM" ] && PLATFORM
=qws
/freebsd-generic-g
++
2166 if [ -z "$XPLATFORM" ]; then
2167 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2168 XPLATFORM
="qws/freebsd-$CFG_EMBEDDED-g++"
2172 [ -z "$PLATFORM" ] && PLATFORM
=qws
/solaris-generic-g
++
2173 if [ -z "$XPLATFORM" ]; then
2174 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2175 XPLATFORM
="qws/solaris-$CFG_EMBEDDED-g++"
2179 if [ -z "$PLATFORM" ]; then
2180 case "$UNAME_MACHINE" in
2182 PLATFORM
=qws
/linux-x86-g
++
2185 PLATFORM
=qws
/linux-x86_64-g
++
2188 PLATFORM
=qws
/linux-ppc-g
++
2191 PLATFORM
=qws
/linux-generic-g
++
2195 if [ -z "$XPLATFORM" ]; then
2196 if [ "$CFG_EMBEDDED" = "auto" ]; then
2197 if [ -n "$CFG_ARCH" ]; then
2198 CFG_EMBEDDED
=$CFG_ARCH
2200 case "$UNAME_MACHINE" in
2211 CFG_EMBEDDED
=generic
2216 XPLATFORM
="qws/linux-$CFG_EMBEDDED-g++"
2223 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2229 if [ -z "$PLATFORM" ]; then
2231 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2233 if [ "$PLATFORM_MAC" = "yes" ]; then
2235 # PLATFORM=macx-xcode
2242 #PLATFORM=aix-g++-64
2244 #PLATFORM=aix-xlc-64
2246 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2256 # PLATFORM=dynix-g++
2262 PLATFORM
=freebsd-g
++
2264 - Also available for FreeBSD: freebsd-icc
2268 PLATFORM
=openbsd-g
++
2279 #PLATFORM=irix-cc-64
2281 - Also available for IRIX: irix-g++ irix-cc-64
2285 case "$UNAME_MACHINE" in
2287 #PLATFORM=hpuxi-acc-32
2288 PLATFORM
=hpuxi-acc-64
2290 - Also available for HP-UXi: hpuxi-acc-32
2296 #PLATFORM=hpux-acc-64
2298 #PLATFORM=hpux-acc-o64
2300 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2309 - Also available for Tru64: tru64-g++
2313 case "$UNAME_MACHINE" in
2315 PLATFORM
=linux-g
++-64
2322 - Also available for Linux: linux-kcc linux-icc linux-cxx
2326 #PLATFORM=solaris-g++
2328 #PLATFORM=solaris-cc64
2330 - Also available for Solaris: solaris-g++ solaris-cc-64
2333 ReliantUNIX-
*:*|SINIX-
*:*)
2334 PLATFORM
=reliant-cds
2335 #PLATFORM=reliant-cds-64
2337 - Also available for Reliant UNIX: reliant-cds-64
2347 #PLATFORM=unixware-g++
2348 PLATFORM
=unixware-cc
2350 - Also available for OpenUNIX: unixware-g++
2354 #PLATFORM=unixware-g++
2355 PLATFORM
=unixware-cc
2357 - Also available for UnixWare: unixware-g++
2364 - Also available for SCO OpenServer: sco-g++
2368 PLATFORM
=unixware-g
++
2371 if [ "$OPT_HELP" != "yes" ]; then
2373 for p
in $PLATFORMS; do
2374 echo " $relconf $* -platform $p"
2377 echo " The build script does not currently recognize all" >&2
2378 echo " platforms supported by Qt." >&2
2379 echo " Rerun this script with a -platform option listed to" >&2
2380 echo " set the system/compiler combination you use." >&2
2387 if [ "$PLATFORM_QWS" = "yes" ]; then
2389 PLATFORMS
=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2391 PLATFORMS
=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2394 [ -z "$XPLATFORM" ] && XPLATFORM
="$PLATFORM"
2395 if [ -d "$PLATFORM" ]; then
2396 QMAKESPEC
="$PLATFORM"
2398 QMAKESPEC
="$relpath/mkspecs/${PLATFORM}"
2400 if [ -d "$XPLATFORM" ]; then
2401 XQMAKESPEC
="$XPLATFORM"
2403 XQMAKESPEC
="$relpath/mkspecs/${XPLATFORM}"
2405 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2406 QT_CROSS_COMPILE
=yes
2407 QMAKE_CONFIG
="$QMAKE_CONFIG cross_compile"
2410 if [ "$PLATFORM_MAC" = "yes" ]; then
2411 if [ `basename $QMAKESPEC` = "macx-xcode" ] ||
[ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2413 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2414 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2415 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2416 echo " built with 'macx-g++'" >&2
2422 # check specified platforms are supported
2423 if [ '!' -d "$QMAKESPEC" ]; then
2425 echo " The specified system/compiler is not supported:"
2429 echo " Please see the README file for a complete list."
2433 if [ '!' -d "$XQMAKESPEC" ]; then
2435 echo " The specified system/compiler is not supported:"
2439 echo " Please see the README file for a complete list."
2443 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2445 echo " The specified system/compiler port is not complete:"
2447 echo " $XQMAKESPEC/qplatformdefs.h"
2449 echo " Please contact qt-bugs@trolltech.com."
2454 # now look at the configs and figure out what platform we are config'd for
2455 [ "$CFG_EMBEDDED" = "no" ] \
2456 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2458 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2460 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2461 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2462 if echo $UNAME_RELEASE |
grep "^5\.[5|6]" >/dev
/null
2>&1; then
2463 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2464 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2468 #-------------------------------------------------------------------------------
2469 # determine the system architecture
2470 #-------------------------------------------------------------------------------
2471 if [ "$OPT_VERBOSE" = "yes" ]; then
2472 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2475 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2476 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2478 echo "You have specified a target architecture with -embedded and -arch."
2479 echo "The two architectures you have specified are different, so we can"
2480 echo "not proceed. Either set both to be the same, or only use -embedded."
2486 if [ -z "${CFG_HOST_ARCH}" ]; then
2487 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2489 CFG_HOST_ARCH
=`uname -p`
2490 if [ "$OPT_VERBOSE" = "yes" ]; then
2491 echo " SGI ($CFG_HOST_ARCH)"
2495 case "$UNAME_MACHINE" in
2497 if [ "$OPT_VERBOSE" = "yes" ]; then
2498 echo " Sun SPARC (sparc)"
2505 if [ "$OPT_VERBOSE" = "yes" ]; then
2506 echo " 64-bit AMD 80x86 (x86_64)"
2508 CFG_HOST_ARCH
=x86_64
2511 if [ "$OPT_VERBOSE" = "yes" ]; then
2512 echo " 32-bit Intel 80x86 (i386)"
2520 case "$UNAME_MACHINE" in
2522 if [ "$OPT_VERBOSE" = "yes" ]; then
2523 echo " 32-bit Apple PowerPC (powerpc)"
2527 if [ "$OPT_VERBOSE" = "yes" ]; then
2528 echo " 32-bit Intel 80x86 (i386)"
2532 CFG_HOST_ARCH
=macosx
2535 if [ "$OPT_VERBOSE" = "yes" ]; then
2536 echo " 64-bit IBM PowerPC (powerpc)"
2538 CFG_HOST_ARCH
=powerpc
2541 if [ "$OPT_VERBOSE" = "yes" ]; then
2542 echo " HP PA-RISC (parisc)"
2544 CFG_HOST_ARCH
=parisc
2547 if [ "$OPT_VERBOSE" = "yes" ]; then
2548 echo " 32-bit Intel 80x86 (i386)"
2552 *:*:x86_64|
*:*:amd64
)
2553 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2554 if [ "$OPT_VERBOSE" = "yes" ]; then
2555 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2559 if [ "$OPT_VERBOSE" = "yes" ]; then
2560 echo " 64-bit AMD 80x86 (x86_64)"
2562 CFG_HOST_ARCH
=x86_64
2566 if [ "$OPT_VERBOSE" = "yes" ]; then
2567 echo " 32-bit PowerPC (powerpc)"
2569 CFG_HOST_ARCH
=powerpc
2572 if [ "$OPT_VERBOSE" = "yes" ]; then
2573 echo " 64-bit PowerPC (powerpc)"
2575 CFG_HOST_ARCH
=powerpc
2578 if [ "$OPT_VERBOSE" = "yes" ]; then
2579 echo " IBM S/390 (s390)"
2584 if [ "$OPT_VERBOSE" = "yes" ]; then
2590 if [ "$OPT_VERBOSE" = "yes" ]; then
2591 echo " Linux on SPARC"
2596 if [ "$OPT_VERBOSE" = "yes" ]; then
2597 echo " Trying '$UNAME_MACHINE'..."
2599 CFG_HOST_ARCH
="$UNAME_MACHINE"
2604 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2605 if [ -n "$CFG_ARCH" ]; then
2606 CFG_EMBEDDED
=$CFG_ARCH
2609 case "$CFG_EMBEDDED" in
2629 CFG_ARCH
="$CFG_EMBEDDED"
2632 elif [ "$PLATFORM_MAC" = "yes" ] ||
[ -z "$CFG_ARCH" ]; then
2633 CFG_ARCH
=$CFG_HOST_ARCH
2636 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
2637 if [ "$OPT_VERBOSE" = "yes" ]; then
2638 echo " '$CFG_ARCH' is supported"
2641 if [ "$OPT_VERBOSE" = "yes" ]; then
2642 echo " '$CFG_ARCH' is unsupported, using 'generic'"
2646 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
2647 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
2648 if [ "$OPT_VERBOSE" = "yes" ]; then
2649 echo " '$CFG_HOST_ARCH' is supported"
2652 if [ "$OPT_VERBOSE" = "yes" ]; then
2653 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
2655 CFG_HOST_ARCH
=generic
2659 if [ "$OPT_VERBOSE" = "yes" ]; then
2660 echo "System architecture: '$CFG_ARCH'"
2661 if [ "$PLATFORM_QWS" = "yes" ]; then
2662 echo "Host architecture: '$CFG_HOST_ARCH'"
2666 #-------------------------------------------------------------------------------
2667 # tests that don't need qmake (must be run before displaying help)
2668 #-------------------------------------------------------------------------------
2670 if [ -z "$PKG_CONFIG" ]; then
2671 # See if PKG_CONFIG is set in the mkspec:
2672 PKG_CONFIG
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
2674 if [ -z "$PKG_CONFIG" ]; then
2675 PKG_CONFIG
=`"$WHICH" pkg-config 2>/dev/null`
2678 # Work out if we can use pkg-config
2679 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2680 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2682 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2683 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2684 echo >&2 "environment!"
2686 if [ -z "$PKG_CONFIG_PATH" ]; then
2688 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2689 echo >&2 "the host compiler's .pc files will be used. This is probably"
2690 echo >&2 "not what you want."
2692 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2694 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2695 echo >&2 "been set. This means your toolchain's .pc files must contain"
2696 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2697 echo >&2 "tests are failing, please check these files."
2705 # process CFG_MAC_ARCHS
2706 if [ "$PLATFORM_MAC" = "yes" ]; then
2707 # check -arch arguments for validity.
2708 ALLOWED
="x86 ppc x86_64 ppc64 i386"
2709 # Save the list so we can re-write it using only valid values
2710 CFG_MAC_ARCHS_IN
="$CFG_MAC_ARCHS"
2712 for i
in $CFG_MAC_ARCHS_IN
2714 if echo "$ALLOWED" |
grep -w -v "$i" > /dev
/null
2>&1; then
2715 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
2718 if [ "$i" = "i386" -o "$i" = "x86" ]; then
2719 # These are synonymous values
2720 # CFG_MAC_ARCHS requires x86 while GCC requires i386
2721 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS x86"
2722 MAC_CONFIG_TEST_COMMANDLINE
="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
2724 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $i"
2725 MAC_CONFIG_TEST_COMMANDLINE
="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
2730 # pass on $CFG_SDK to the configure tests.
2731 if [ '!' -z "$CFG_SDK" ]; then
2732 MAC_CONFIG_TEST_COMMANDLINE
="-sdk $CFG_SDK"
2733 echo "tests command line: $MAC_CONFIG_TEST_COMMANDLINE"
2736 # find the default framework value
2737 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2738 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2739 CFG_FRAMEWORK
="$CFG_SHARED"
2740 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2742 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2750 QMAKE_CONF_COMPILER
=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
2752 [ -z "$TEST_COMPILER" ] && TEST_COMPILER
=$QMAKE_CONF_COMPILER
2754 # auto-detect precompiled header support
2755 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2756 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2758 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2763 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2765 echo "WARNING: Using universal binaries disables precompiled headers."
2770 #auto-detect DWARF2 on the mac
2771 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "auto" ]; then
2772 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2779 # auto-detect support for -Xarch on the mac
2780 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" == "auto" ]; then
2781 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2788 # don't autodetect support for separate debug info on objcopy when
2789 # cross-compiling as lots of toolchains seems to have problems with this
2790 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2791 CFG_SEPARATE_DEBUG_INFO
="no"
2794 # auto-detect support for separate debug info in objcopy
2795 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2796 TEST_COMPILER_CFLAGS
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_].*=%%p' | tr '\n' ' '`
2797 TEST_COMPILER_CXXFLAGS
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_].*=%%p' | tr '\n' ' '`
2798 TEST_OBJCOPY
=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
2799 COMPILER_WITH_FLAGS
="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2800 COMPILER_WITH_FLAGS
=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2801 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2802 CFG_SEPARATE_DEBUG_INFO
=no
2806 # binutils on HP-UX is buggy; default to no.
2807 CFG_SEPARATE_DEBUG_INFO
=no
2810 CFG_SEPARATE_DEBUG_INFO
=yes
2816 # auto-detect -fvisibility support
2817 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2818 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2819 CFG_REDUCE_EXPORTS
=no
2821 CFG_REDUCE_EXPORTS
=yes
2825 # detect the availability of the -Bsymbolic-functions linker optimization
2826 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2827 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2828 CFG_REDUCE_RELOCATIONS
=no
2830 CFG_REDUCE_RELOCATIONS
=yes
2834 # auto-detect GNU make support
2835 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v |
grep "GNU Make" >/dev
/null
2>&1; then
2839 # If -opengl wasn't specified, don't try to auto-detect
2840 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
2845 if [ "$PLATFORM_MAC" = "yes" ]; then
2846 if [ "$CFG_OPENGL" = "auto" ] ||
[ "$CFG_OPENGL" = "yes" ]; then
2851 # find the default framework value
2852 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2853 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2854 CFG_FRAMEWORK
="$CFG_SHARED"
2855 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2857 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2865 # x11 tests are done after qmake is built
2868 #setup the build parts
2869 if [ -z "$CFG_BUILD_PARTS" ]; then
2870 CFG_BUILD_PARTS
="$QT_DEFAULT_BUILD_PARTS"
2872 # don't build tools by default when cross-compiling
2873 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2874 CFG_BUILD_PARTS
=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2877 for nobuild
in $CFG_NOBUILD_PARTS; do
2878 CFG_BUILD_PARTS
=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2880 if echo $CFG_BUILD_PARTS |
grep -v libs
>/dev
/null
2>&1; then
2882 # echo "WARNING: libs is a required part of the build."
2884 CFG_BUILD_PARTS
="$CFG_BUILD_PARTS libs"
2887 #-------------------------------------------------------------------------------
2888 # post process QT_INSTALL_* variables
2889 #-------------------------------------------------------------------------------
2892 if [ -z "$QT_INSTALL_PREFIX" ]; then
2893 if [ "$CFG_DEV" = "yes" ]; then
2894 QT_INSTALL_PREFIX
="$outpath" # At Trolltech, we use sandboxed builds by default
2895 elif [ "$PLATFORM_QWS" = "yes" ]; then
2896 QT_INSTALL_PREFIX
="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
2897 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2898 QT_INSTALL_PREFIX
="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
2901 QT_INSTALL_PREFIX
="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
2904 QT_INSTALL_PREFIX
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2907 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2908 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2909 if [ "$PLATFORM_MAC" = "yes" ]; then
2910 QT_INSTALL_DOCS
="/Developer/Documentation/Qt"
2913 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS
="$QT_INSTALL_PREFIX/doc" #fallback
2916 QT_INSTALL_DOCS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2919 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2920 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2921 if [ "$PLATFORM_MAC" = "yes" ]; then
2922 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2927 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS
="$QT_INSTALL_PREFIX/include"
2930 QT_INSTALL_HEADERS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2933 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2934 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2935 if [ "$PLATFORM_MAC" = "yes" ]; then
2936 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2937 QT_INSTALL_LIBS
="/Libraries/Frameworks"
2941 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS
="$QT_INSTALL_PREFIX/lib" #fallback
2943 QT_INSTALL_LIBS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2946 if [ -z "$QT_INSTALL_BINS" ]; then #default
2947 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2948 if [ "$PLATFORM_MAC" = "yes" ]; then
2949 QT_INSTALL_BINS
="/Developer/Applications/Qt"
2952 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS
="$QT_INSTALL_PREFIX/bin" #fallback
2955 QT_INSTALL_BINS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2958 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2959 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2960 if [ "$PLATFORM_MAC" = "yes" ]; then
2961 QT_INSTALL_PLUGINS
="/Developer/Applications/Qt/plugins"
2964 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS
="$QT_INSTALL_PREFIX/plugins" #fallback
2966 QT_INSTALL_PLUGINS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2969 if [ -z "$QT_INSTALL_DATA" ]; then #default
2970 QT_INSTALL_DATA
="$QT_INSTALL_PREFIX"
2972 QT_INSTALL_DATA
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2975 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2976 QT_INSTALL_TRANSLATIONS
="$QT_INSTALL_PREFIX/translations"
2978 QT_INSTALL_TRANSLATIONS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2981 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2982 if [ "$PLATFORM_MAC" = "yes" ]; then
2983 QT_INSTALL_SETTINGS
=/Library
/Preferences
/Qt
2985 QT_INSTALL_SETTINGS
=/etc
/xdg
2988 QT_INSTALL_SETTINGS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2991 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2992 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2993 if [ "$PLATFORM_MAC" = "yes" ]; then
2994 QT_INSTALL_EXAMPLES
="/Developer/Examples/Qt"
2997 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES
="$QT_INSTALL_PREFIX/examples" #fallback
2999 QT_INSTALL_EXAMPLES
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3002 if [ -z "$QT_INSTALL_DEMOS" ]; then #default
3003 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3004 if [ "$PLATFORM_MAC" = "yes" ]; then
3005 QT_INSTALL_DEMOS
="/Developer/Examples/Qt/Demos"
3008 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS
="$QT_INSTALL_PREFIX/demos"
3010 QT_INSTALL_DEMOS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
3012 #-------------------------------------------------------------------------------
3013 # help - interactive parts of the script _after_ this section please
3014 #-------------------------------------------------------------------------------
3016 # next, emit a usage message if something failed.
3017 if [ "$OPT_HELP" = "yes" ]; then
3018 [ "x$ERROR" = "xyes" ] && echo
3019 if [ "$CFG_NIS" = "no" ]; then
3026 if [ "$CFG_CUPS" = "no" ]; then
3033 if [ "$CFG_ICONV" = "no" ]; then
3040 if [ "$CFG_LARGEFILE" = "no" ]; then
3047 if [ "$CFG_STL" = "auto" ] ||
[ "$CFG_STL" = "yes" ]; then
3054 if [ "$CFG_IPV6" = "auto" ]; then
3058 if [ "$CFG_PRECOMPILE" = "auto" ] ||
[ "$CFG_PRECOMPILE" = "no" ]; then
3067 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3068 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
3069 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3070 [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
3071 [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3072 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3073 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3074 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3075 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3076 [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3077 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3078 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3079 [-no-make <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3080 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3081 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
3082 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3083 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3084 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3085 [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3086 [-no-openssl] [-openssl] [-openssl-linked]
3087 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit]
3088 [-no-scripttools] [-scripttools]
3090 [additional platform specific options (see below)]
3093 Installation options:
3095 These are optional, but you may specify install directories.
3097 -prefix <dir> ...... This will install everything relative to <dir>
3098 (default $QT_INSTALL_PREFIX)
3100 if [ "$PLATFORM_QWS" = "yes" ]; then
3103 -hostprefix [dir] .. Tools and libraries needed when developing
3104 applications are installed in [dir]. If [dir] is
3105 not given, the current build directory will be used.
3110 * -prefix-install .... Force a sandboxed "local" installation of
3111 Qt. This will install into
3112 $QT_INSTALL_PREFIX, if this option is
3113 disabled then some platforms will attempt a
3114 "system" install by placing default values to
3115 be placed in a system location other than
3118 You may use these to separate different parts of the install:
3120 -bindir <dir> ......... Executables will be installed to <dir>
3121 (default PREFIX/bin)
3122 -libdir <dir> ......... Libraries will be installed to <dir>
3123 (default PREFIX/lib)
3124 -docdir <dir> ......... Documentation will be installed to <dir>
3125 (default PREFIX/doc)
3126 -headerdir <dir> ...... Headers will be installed to <dir>
3127 (default PREFIX/include)
3128 -plugindir <dir> ...... Plugins will be installed to <dir>
3129 (default PREFIX/plugins)
3130 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3132 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3133 (default PREFIX/translations)
3134 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3135 (default PREFIX/etc/settings)
3136 -examplesdir <dir> .... Examples will be installed to <dir>
3137 (default PREFIX/examples)
3138 -demosdir <dir> ....... Demos will be installed to <dir>
3139 (default PREFIX/demos)
3141 You may use these options to turn on strict plugin loading.
3143 -buildkey <key> .... Build the Qt library and plugins using the specified
3144 <key>. When the library loads plugins, it will only
3145 load those that have a matching key.
3149 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3150 that needs to be evaluated. If the evaluation succeeds, the feature is
3151 included. Here is a short explanation of each option:
3153 * -release ........... Compile and link Qt with debugging turned off.
3154 -debug ............. Compile and link Qt with debugging turned on.
3155 -debug-and-release . Compile and link two versions of Qt, with and without
3156 debugging turned on (Mac only).
3158 -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting)
3160 -opensource......... Compile and link the Open-Source Edition of Qt.
3161 -commercial......... Compile and link the Commercial Edition of Qt.
3164 * -shared ............ Create and use shared Qt libraries.
3165 -static ............ Create and use static Qt libraries.
3167 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3169 -fast .............. Configure Qt quickly by generating Makefiles only for
3170 library and subdirectory targets. All other Makefiles
3171 are created as wrappers, which will in turn run qmake.
3173 -no-largefile ...... Disables large file support.
3174 + -largefile ......... Enables Qt to access files larger than 4 GB.
3177 if [ "$PLATFORM_QWS" = "yes" ]; then
3184 if [ "$CFG_DBUS" = "no" ]; then
3193 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3194 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3196 -no-accessibility .. Do not compile Accessibility support.
3197 * -accessibility ..... Compile Accessibility support.
3199 $SHN -no-stl ............ Do not compile STL support.
3200 $SHY -stl ............... Compile STL support.
3202 -no-sql-<driver> ... Disable SQL <driver> entirely.
3203 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3205 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3208 Possible values for <driver>:
3209 [ $CFG_SQL_AVAILABLE ]
3211 -system-sqlite ..... Use sqlite from the operating system.
3213 -no-qt3support ..... Disables the Qt 3 support functionality.
3214 * -qt3support ........ Enables the Qt 3 support functionality.
3216 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3217 + -xmlpatterns ....... Build the QtXmlPatterns module.
3218 QtXmlPatterns is built if a decent C++ compiler
3219 is used and exceptions are enabled.
3221 -no-phonon ......... Do not build the Phonon module.
3222 + -phonon ............ Build the Phonon module.
3223 Phonon is built if a decent C++ compiler is used.
3224 -no-phonon-backend.. Do not build the platform phonon plugin.
3225 + -phonon-backend..... Build the platform phonon plugin.
3227 -no-svg ............ Do not build the SVG module.
3228 + -svg ............... Build the SVG module.
3230 -no-webkit ......... Do not build the WebKit module.
3231 + -webkit ............ Build the WebKit module.
3232 WebKit is built if a decent C++ compiler is used.
3234 -no-scripttools .... Do not build the QtScriptTools module.
3235 + -scripttools ....... Build the QtScriptTools module.
3237 -platform target ... The operating system and compiler you are building
3240 See the README file for a list of supported
3241 operating systems and compilers.
3243 if [ "${PLATFORM_QWS}" != "yes" ]; then
3245 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3246 raster - Software rasterizer
3247 opengl - Rendering via OpenGL, Experimental!
3252 -no-mmx ............ Do not compile with use of MMX instructions.
3253 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3254 -no-sse ............ Do not compile with use of SSE instructions.
3255 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3257 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3258 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3260 -D <string> ........ Add an explicit define to the preprocessor.
3261 -I <string> ........ Add an explicit include path.
3262 -L <string> ........ Add an explicit library path.
3264 -help, -h .......... Display this information.
3266 Third Party Libraries:
3268 -qt-zlib ........... Use the zlib bundled with Qt.
3269 + -system-zlib ....... Use zlib from the operating system.
3270 See http://www.gzip.org/zlib
3272 -no-gif ............ Do not compile the plugin for GIF reading support.
3273 * -qt-gif ............ Compile the plugin for GIF reading support.
3274 See also src/plugins/imageformats/gif/qgifhandler.h
3276 -no-libtiff ........ Do not compile the plugin for TIFF support.
3277 -qt-libtiff ........ Use the libtiff bundled with Qt.
3278 + -system-libtiff .... Use libtiff from the operating system.
3279 See http://www.libtiff.org
3281 -no-libpng ......... Do not compile in PNG support.
3282 -qt-libpng ......... Use the libpng bundled with Qt.
3283 + -system-libpng ..... Use libpng from the operating system.
3284 See http://www.libpng.org/pub/png
3286 -no-libmng ......... Do not compile the plugin for MNG support.
3287 -qt-libmng ......... Use the libmng bundled with Qt.
3288 + -system-libmng ..... Use libmng from the operating system.
3289 See http://www.libmng.com
3291 -no-libjpeg ........ Do not compile the plugin for JPEG support.
3292 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3293 + -system-libjpeg .... Use libjpeg from the operating system.
3294 See http://www.ijg.org
3296 -no-openssl ........ Do not compile support for OpenSSL.
3297 + -openssl ........... Enable run-time OpenSSL support.
3298 -openssl-linked .... Enabled linked OpenSSL support.
3300 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3305 -make <part> ....... Add part to the list of parts to be built at make time.
3306 ($QT_DEFAULT_BUILD_PARTS)
3307 -nomake <part> ..... Exclude part from the list of parts to be built.
3309 -R <string> ........ Add an explicit runtime library path to the Qt
3311 -l <string> ........ Add an explicit library.
3313 -no-rpath .......... Do not use the library install path as a runtime
3315 + -rpath ............. Link Qt libraries and executables using the library
3316 install path as a runtime library path. Equivalent
3317 to -R install_libpath
3319 -continue .......... Continue as far as possible if an error occurs.
3321 -verbose, -v ....... Print verbose information about each step of the
3324 -silent ............ Reduce the build output so that warnings and errors
3325 can be seen more easily.
3327 * -no-optimized-qmake ... Do not build qmake optimized.
3328 -optimized-qmake ...... Build qmake optimized.
3330 $NSN -no-nis ............ Do not compile NIS support.
3331 $NSY -nis ............... Compile NIS support.
3333 $CUN -no-cups ........... Do not compile CUPS support.
3334 $CUY -cups .............. Compile CUPS support.
3335 Requires cups/cups.h and libcups.so.2.
3337 $CIN -no-iconv .......... Do not compile support for iconv(3).
3338 $CIY -iconv ............. Compile support for iconv(3).
3340 $PHN -no-pch ............ Do not use precompiled header support.
3341 $PHY -pch ............... Use precompiled header support.
3343 $DBN -no-dbus ........... Do not compile the QtDBus module.
3344 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3345 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3347 -reduce-relocations ..... Reduce relocations in the libraries through extra
3348 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3349 experimental; needs GNU ld >= 2.18).
3352 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3353 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3360 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3368 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
3372 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3373 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3379 if [ "$PLATFORM_X11" = "yes" ]; then
3380 if [ "$CFG_SM" = "no" ]; then
3387 if [ "$CFG_XSHAPE" = "no" ]; then
3394 if [ "$CFG_XINERAMA" = "no" ]; then
3401 if [ "$CFG_FONTCONFIG" = "no" ]; then
3408 if [ "$CFG_XCURSOR" = "no" ]; then
3415 if [ "$CFG_XFIXES" = "no" ]; then
3422 if [ "$CFG_XRANDR" = "no" ]; then
3429 if [ "$CFG_XRENDER" = "no" ]; then
3436 if [ "$CFG_MITSHM" = "no" ]; then
3443 if [ "$CFG_XINPUT" = "no" ]; then
3450 if [ "$CFG_XKB" = "no" ]; then
3457 if [ "$CFG_IM" = "no" ]; then
3468 -no-gtkstyle ....... Do not build the GTK theme integration.
3469 + -gtkstyle .......... Build the GTK theme integration.
3471 * -no-nas-sound ...... Do not compile in NAS sound support.
3472 -system-nas-sound .. Use NAS libaudio from the operating system.
3473 See http://radscan.com/nas.html
3475 -no-opengl ......... Do not support OpenGL.
3476 + -opengl <api> ...... Enable OpenGL support.
3477 With no parameter, this will auto-detect the "best"
3478 OpenGL API to use. If desktop OpenGL is avaliable, it
3479 will be used. Use desktop, es1, es1cl or es2 for <api>
3480 to force the use of the Desktop (OpenGL 1.x or 2.x),
3481 OpenGL ES 1.x Common profile, 1.x Common Lite profile
3482 or 2.x APIs instead. On X11, the EGL API will be used
3483 to manage GL contexts in the case of OpenGL ES.
3485 $SMN -no-sm ............. Do not support X Session Management.
3486 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3488 $SHN -no-xshape ......... Do not compile XShape support.
3489 $SHY -xshape ............ Compile XShape support.
3490 Requires X11/extensions/shape.h.
3492 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3493 $XAY -xinerama .......... Compile Xinerama support.
3494 Requires X11/extensions/Xinerama.h and libXinerama.
3495 By default, Xinerama support will be compiled if
3496 available and the shared libraries are dynamically
3499 $XCN -no-xcursor ........ Do not compile Xcursor support.
3500 $XCY -xcursor ........... Compile Xcursor support.
3501 Requires X11/Xcursor/Xcursor.h and libXcursor.
3502 By default, Xcursor support will be compiled if
3503 available and the shared libraries are dynamically
3506 $XFN -no-xfixes ......... Do not compile Xfixes support.
3507 $XFY -xfixes ............ Compile Xfixes support.
3508 Requires X11/extensions/Xfixes.h and libXfixes.
3509 By default, Xfixes support will be compiled if
3510 available and the shared libraries are dynamically
3513 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3514 $XZY -xrandr ............ Compile Xrandr support.
3515 Requires X11/extensions/Xrandr.h and libXrandr.
3517 $XRN -no-xrender ........ Do not compile Xrender support.
3518 $XRY -xrender ........... Compile Xrender support.
3519 Requires X11/extensions/Xrender.h and libXrender.
3521 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3522 $XMY -mitshm ............ Compile MIT-SHM support.
3523 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3525 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3526 $FCGY -fontconfig ........ Compile FontConfig support.
3527 Requires fontconfig/fontconfig.h, libfontconfig,
3528 freetype.h and libfreetype.
3530 $XIN -no-xinput.......... Do not compile Xinput support.
3531 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3532 which requires IRIX with wacom.h and libXi or
3533 XFree86 with X11/extensions/XInput.h and libXi.
3535 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3536 $XKY -xkb ............... Compile XKB support.
3541 if [ "$PLATFORM_MAC" = "yes" ]; then
3546 -Fstring ........... Add an explicit framework path.
3547 -fw string ......... Add an explicit framework.
3549 -cocoa ............. Build the Cocoa version of Qt. Note that -no-framework
3550 and -static is not supported with -cocoa. Specifying
3551 this option creates Qt binaries that requires Mac OS X
3554 * -framework ......... Build Qt as a series of frameworks and
3555 link tools against those frameworks.
3556 -no-framework ...... Do not build Qt as a series of frameworks.
3558 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3559 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3561 -universal ......... Equivalent to -arch "ppc x86"
3563 -arch <arch> ....... Build Qt for <arch>
3564 Example values for <arch>: x86 ppc x86_64 ppc64
3565 Multiple -arch arguments can be specified, 64-bit archs
3566 will be built with the Cocoa framework.
3568 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3569 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3574 if [ "$PLATFORM_QWS" = "yes" ]; then
3577 Qt for Embedded Linux only:
3579 -xplatform target ... The target platform when cross-compiling.
3581 -no-feature-<feature> Do not compile in <feature>.
3582 -feature-<feature> .. Compile in <feature>. The available features
3583 are described in src/corelib/global/qfeatures.txt
3585 -embedded <arch> .... This will enable the embedded build, you must have a
3586 proper license for this switch to work.
3587 Example values for <arch>: arm mips x86 generic
3589 -armfpa ............. Target platform is uses the ARM-FPA floating point format.
3590 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3592 The floating point format is usually autodetected by configure. Use this
3593 to override the detected value.
3595 -little-endian ...... Target platform is little endian (LSB first).
3596 -big-endian ......... Target platform is big endian (MSB first).
3598 -host-little-endian . Host platform is little endian (LSB first).
3599 -host-big-endian .... Host platform is big endian (MSB first).
3601 You only need to specify the endianness when
3602 cross-compiling, otherwise the host
3603 endianness will be used.
3605 -no-freetype ........ Do not compile in Freetype2 support.
3606 -qt-freetype ........ Use the libfreetype bundled with Qt.
3607 * -system-freetype .... Use libfreetype from the operating system.
3608 See http://www.freetype.org/
3610 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3611 default ($CFG_QCONFIG).
3613 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3614 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3616 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3617 by default all available decorations are on.
3618 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3619 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3620 linked to at run time.
3621 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3622 -no-decoration-<style> ....Disable decoration <style> entirely.
3623 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3625 -no-opengl .......... Do not support OpenGL.
3626 -opengl <api> ....... Enable OpenGL ES support
3627 With no parameter, this will attempt to auto-detect OpenGL ES 1.x
3628 or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection.
3630 NOTE: A QGLScreen driver for the hardware is required to support
3631 OpenGL ES on Qt for Embedded Linux.
3633 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3634 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3635 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3636 linked to at run time.
3637 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3638 -no-gfx-<driver> ... Disable graphics <driver> entirely.
3639 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3641 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
3642 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3644 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
3646 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
3648 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
3649 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3651 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
3652 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3653 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
3655 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
3656 -no-mouse-<driver> ... Disable mouse <driver> entirely.
3657 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3659 -iwmmxt ............ Compile using the iWMMXt instruction set
3660 (available on some XScale CPUs).
3666 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3667 if [ "$CFG_GLIB" = "no" ]; then
3675 $GBN -no-glib ........... Do not compile Glib support.
3676 $GBY -glib .............. Compile Glib support.
3681 [ "x$ERROR" = "xyes" ] && exit 1
3686 # -----------------------------------------------------------------------------
3687 # LICENSING, INTERACTIVE PART
3688 # -----------------------------------------------------------------------------
3690 if [ "$PLATFORM_QWS" = "yes" ]; then
3691 Platform
="Qt for Embedded Linux"
3692 elif [ "$PLATFORM_MAC" = "yes" ]; then
3700 echo "This is the $Platform ${EditionString} Edition."
3703 if [ "$Edition" = "NokiaInternalBuild" ]; then
3704 echo "Detected -nokia-developer option"
3705 echo "Nokia employees and agents are allowed to use this software under"
3706 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
3707 elif [ "$Edition" = "OpenSource" ]; then
3709 echo "You are licensed to use this software under the terms of"
3710 echo "the GNU General Public License (GPL) versions 3."
3711 echo "You are also licensed to use this software under the terms of"
3712 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3715 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3716 echo "You have already accepted the terms of the $LicenseType license."
3719 echo "Type '3' to view the GNU General Public License version 3."
3720 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3721 echo "Type 'yes' to accept this license offer."
3722 echo "Type 'no' to decline this license offer."
3724 if echo '\c' |
grep '\c' >/dev
/null
; then
3725 echo -n "Do you accept the terms of $affix license? "
3727 echo "Do you accept the terms of $affix license? \c"
3732 if [ "$acceptance" = "yes" ]; then
3734 elif [ "$acceptance" = "no" ]; then
3735 echo "You are not licensed to use this software."
3738 elif [ "$acceptance" = "3" ]; then
3739 more "$relpath/LICENSE.GPL3"
3740 elif [ "$acceptance" = "L" ]; then
3741 more "$relpath/LICENSE.LGPL"
3744 elif [ "$Edition" = "Preview" ]; then
3745 TheLicense
=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3748 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3749 echo "You have already accepted the terms of the $LicenseType license."
3752 echo "You are licensed to use this software under the terms of"
3753 echo "the $TheLicense"
3755 echo "Type '?' to read the Preview License."
3756 echo "Type 'yes' to accept this license offer."
3757 echo "Type 'no' to decline this license offer."
3759 if echo '\c' |
grep '\c' >/dev
/null
; then
3760 echo -n "Do you accept the terms of the license? "
3762 echo "Do you accept the terms of the license? \c"
3767 if [ "$acceptance" = "yes" ]; then
3769 elif [ "$acceptance" = "no" ] ;then
3770 echo "You are not licensed to use this software."
3773 elif [ "$acceptance" = "?" ]; then
3774 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3777 elif [ "$Edition" != "OpenSource" ]; then
3778 if [ -n "$ExpiryDate" ]; then
3779 ExpiryDate
=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3780 [ -z "$ExpiryDate" ] && ExpiryDate
="0"
3781 Today
=`date +%Y%m%d`
3782 if [ "$Today" -gt "$ExpiryDate" ]; then
3783 case "$LicenseType" in
3784 Commercial|Academic|Educational
)
3785 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3787 echo "NOTICE NOTICE NOTICE NOTICE"
3789 echo " Your support and upgrade period has expired."
3791 echo " You are no longer licensed to use this version of Qt."
3792 echo " Please contact sales@trolltech.com to renew your support"
3793 echo " and upgrades for this license."
3795 echo "NOTICE NOTICE NOTICE NOTICE"
3800 echo "WARNING WARNING WARNING WARNING"
3802 echo " Your support and upgrade period has expired."
3804 echo " You may continue to use your last licensed release"
3805 echo " of Qt under the terms of your existing license"
3806 echo " agreement. But you are not entitled to technical"
3807 echo " support, nor are you entitled to use any more recent"
3808 echo " Qt releases."
3810 echo " Please contact sales@trolltech.com to renew your"
3811 echo " support and upgrades for this license."
3813 echo "WARNING WARNING WARNING WARNING"
3820 echo "NOTICE NOTICE NOTICE NOTICE"
3822 echo " Your Evaluation license has expired."
3824 echo " You are no longer licensed to use this software. Please"
3825 echo " contact sales@trolltech.com to purchase license, or install"
3826 echo " the Qt Open Source Edition if you intend to develop free"
3829 echo "NOTICE NOTICE NOTICE NOTICE"
3836 TheLicense
=`head -n 1 "$outpath/LICENSE"`
3838 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3839 echo "You have already accepted the terms of the $TheLicense."
3842 echo "You are licensed to use this software under the terms of"
3843 echo "the $TheLicense."
3845 echo "Type '?' to view the $TheLicense."
3846 echo "Type 'yes' to accept this license offer."
3847 echo "Type 'no' to decline this license offer."
3849 if echo '\c' |
grep '\c' >/dev
/null
; then
3850 echo -n "Do you accept the terms of the $TheLicense? "
3852 echo "Do you accept the terms of the $TheLicense? \c"
3857 if [ "$acceptance" = "yes" ]; then
3859 elif [ "$acceptance" = "no" ]; then
3860 echo "You are not licensed to use this software."
3863 else [ "$acceptance" = "?" ]
3864 more "$outpath/LICENSE"
3869 # this should be moved somewhere else
3872 AIX_VERSION
=`uname -v`
3873 if [ "$AIX_VERSION" -lt "5" ]; then
3874 QMakeVar add QMAKE_LIBS_X11
-lbind
3881 #-------------------------------------------------------------------------------
3882 # generate qconfig.cpp
3883 #-------------------------------------------------------------------------------
3884 [ -d "$outpath/src/corelib/global" ] || mkdir
-p "$outpath/src/corelib/global"
3886 LICENSE_USER_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
3887 LICENSE_PRODUCTS_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
3888 PREFIX_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
3889 DOCUMENTATION_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
3890 HEADERS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
3891 LIBRARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
3892 BINARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
3893 PLUGINS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
3894 DATA_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
3895 TRANSLATIONS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
3896 SETTINGS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
3897 EXAMPLES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
3898 DEMOS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
3900 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3902 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
3903 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
3906 if [ ! -z "$QT_HOST_PREFIX" ]; then
3907 HOSTPREFIX_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
3908 HOSTDOCUMENTATION_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
3909 HOSTHEADERS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
3910 HOSTLIBRARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
3911 HOSTBINARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
3912 HOSTPLUGINS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
3913 HOSTDATA_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
3914 HOSTTRANSLATIONS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
3915 HOSTSETTINGS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
3916 HOSTEXAMPLES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
3917 HOSTDEMOS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
3919 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3921 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
3922 /* Installation Info */
3923 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
3924 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
3925 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
3926 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
3927 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
3928 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
3929 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
3930 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
3931 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
3932 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
3933 static const char qt_configure_demos_path_str [256 + 12] = "$HOSTDEMOS_PATH_STR";
3934 #else // QT_BOOTSTRAPPED
3938 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3939 /* Installation Info */
3940 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
3941 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
3942 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
3943 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
3944 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
3945 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
3946 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
3947 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
3948 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
3949 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
3950 static const char qt_configure_demos_path_str [256 + 12] = "$DEMOS_PATH_STR";
3953 if [ ! -z "$QT_HOST_PREFIX" ]; then
3954 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3955 #endif // QT_BOOTSTRAPPED
3960 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3961 /* strlen( "qt_lcnsxxxx" ) == 12 */
3962 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3963 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3964 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
3965 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
3966 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
3967 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
3968 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
3969 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
3970 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
3971 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
3972 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3973 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
3974 #define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;
3977 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3978 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3979 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3981 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w
"$outpath/src/corelib/global/qconfig.cpp"
3982 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3983 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3986 # -----------------------------------------------------------------------------
3988 # -----------------------------------------------------------------------------
3991 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3993 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS
="$SYNCQT_OPTS -check-includes"
3994 if [ "$OPT_SHADOW" = "yes" ]; then
3995 "$outpath/bin/syncqt" $SYNCQT_OPTS
3996 elif [ "$CFG_DEV" = "yes" ] ||
[ ! -d $relpath/include
]; then
3997 QTDIR
="$relpath" perl
"$outpath/bin/syncqt" $SYNCQT_OPTS
4002 # $2: optional transformation
4003 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4004 # is where the resulting variable is written to
4005 setBootstrapVariable
()
4007 variableRegExp
="^$1[^_A-Z0-9]"
4008 getQMakeConf |
grep "$variableRegExp" |
( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) |
$AWK '
4010 varLength = index($0, "=") - 1
4011 valStart = varLength + 2
4012 if (substr($0, varLength, 1) == "+") {
4013 varLength = varLength - 1
4014 valStart = valStart + 1
4016 var = substr($0, 0, varLength)
4017 gsub("[ \t]+", "", var)
4018 val = substr($0, valStart)
4019 printf "%s_%s = %s\n", var, NR, val
4022 if (length(var) > 0) {
4024 for (i = 1; i <= NR; ++i)
4025 printf " $(%s_%s)", var, i
4032 if true
; then ###[ '!' -f "$outpath/bin/qmake" ];
4033 echo "Creating qmake. Please wait..."
4036 QCONFIG_H
="$outpath/src/corelib/global/qconfig.h"
4037 QMAKE_QCONFIG_H
="${QCONFIG_H}.qmake"
4038 if [ -f "$QCONFIG_H" ]; then
4039 OLD_QCONFIG_H
=$QCONFIG_H
4040 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4043 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4044 # when building qmake, we use #defines for the install paths,
4045 # however they are real functions in the library
4046 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4047 mkdir
-p "$outpath/src/corelib/global"
4048 [ -f "$QCONFIG_H" ] && chmod +w
"$QCONFIG_H"
4049 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4052 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4053 for conf
in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
4054 if [ '!' -f "$conf" ]; then
4055 ln -s "$QCONFIG_H" "$conf"
4059 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4060 rm -f mkspecs
/default
4061 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs
/default
4063 for mkfile
in GNUmakefile Makefile
; do
4066 in_mkfile
="${mkfile}.in"
4067 if [ "$mkfile" = "Makefile" ]; then
4068 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4069 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4071 in_mkfile
="${mkfile}.unix"
4073 in_mkfile
="$relpath/qmake/$in_mkfile"
4074 mkfile
="$outpath/qmake/$mkfile"
4075 if [ -f "$mkfile" ]; then
4076 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags
>/dev
/null
2>&1 && chflags nouchg
"$mkfile"
4079 [ -f "$in_mkfile" ] ||
continue
4081 echo "########################################################################" > "$mkfile"
4082 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4083 echo "########################################################################" >> "$mkfile"
4086 EXTRA_CFLAGS
="\$(QMAKE_CFLAGS)"
4087 EXTRA_CXXFLAGS
="\$(QMAKE_CXXFLAGS)"
4088 EXTRA_LFLAGS
="\$(QMAKE_LFLAGS)"
4090 if [ "$PLATFORM" = "irix-cc" ] ||
[ "$PLATFORM" = "irix-cc-64" ]; then
4091 EXTRA_LFLAGS
="$EXTRA_LFLAGS -lm"
4094 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4095 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4096 if [ "$CFG_SILENT" = "yes" ]; then
4097 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC
's,QMAKE_CC.*=,CC=\@,'
4098 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX
's,QMAKE_CXX.*=,CXX=\@,'
4100 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC
's,QMAKE_CC,CC,'
4101 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX
's,QMAKE_CXX,CXX,'
4103 setBootstrapVariable QMAKE_CFLAGS
4104 setBootstrapVariable QMAKE_CXXFLAGS
's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4105 setBootstrapVariable QMAKE_LFLAGS
4107 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4108 EXTRA_CFLAGS
="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4109 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4111 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4112 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4113 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4114 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4115 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4116 elif [ "$CFG_DEBUG" = "yes" ]; then
4117 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4118 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4119 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4120 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4123 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
4124 setBootstrapVariable QMAKE_RPATH
's,\$\$LITERAL_WHITESPACE, ,'
4125 for rpath
in $RPATH_FLAGS; do
4126 EXTRA_LFLAGS
="\$(QMAKE_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4129 if [ "$PLATFORM_MAC" = "yes" ]; then
4130 if [ "$PLATFORM" = "macx-icc" ]; then
4131 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4133 echo "export MACOSX_DEPLOYMENT_TARGET = 10.3" >> "$mkfile"
4135 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4136 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4137 EXTRA_LFLAGS
="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4138 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4139 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4140 EXTRA_OBJS
="qsettings_mac.o qcore_mac.o"
4141 EXTRA_SRCS
="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4142 if echo "$CFG_MAC_ARCHS" |
grep x86
> /dev
/null
2>&1; then # matches both x86 and x86_64
4143 X86_CFLAGS
="-arch i386"
4144 X86_LFLAGS
="-arch i386"
4145 EXTRA_CFLAGS
="$X86_CFLAGS $EXTRA_CFLAGS"
4146 EXTRA_CXXFLAGS
="$X86_CFLAGS $EXTRA_CXXFLAGS"
4147 EXTRA_LFLAGS
="$EXTRA_LFLAGS $X86_LFLAGS"
4149 if echo "$CFG_MAC_ARCHS" |
grep ppc
> /dev
/null
2>&1; then # matches both ppc and ppc64
4150 PPC_CFLAGS
="-arch ppc"
4151 PPC_LFLAGS
="-arch ppc"
4152 EXTRA_CFLAGS
="$PPC_CFLAGS $EXTRA_CFLAGS"
4153 EXTRA_CXXFLAGS
="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4154 EXTRA_LFLAGS
="$EXTRA_LFLAGS $PPC_LFLAGS"
4156 if [ '!' -z "$CFG_SDK" ]; then
4157 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4158 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4159 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4160 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4161 EXTRA_LFLAGS
="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4164 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS
="$EXTRA_CFLAGS -DQWS"
4165 if [ '!' -z "$D_FLAGS" ]; then
4166 for DEF
in $D_FLAGS; do
4167 EXTRA_CFLAGS
="$EXTRA_CFLAGS \"-D${DEF}\""
4170 QMAKE_BIN_DIR
="$QT_INSTALL_BINS"
4171 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR
="${QT_INSTALL_PREFIX}/bin"
4172 QMAKE_DATA_DIR
="$QT_INSTALL_DATA"
4173 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR
="${QT_INSTALL_PREFIX}"
4175 adjrelpath
=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4176 adjoutpath
=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4177 adjqmakespec
=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4178 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4179 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4180 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4181 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4182 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4183 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4184 -e "s,@QMAKESPEC@,$adjqmakespec,g" "$in_mkfile" >>"$mkfile"
4186 if "$WHICH" makedepend
>/dev
/null
2>&1 && grep 'depend:' "$mkfile" >/dev
/null
2>&1; then
4187 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend
) >/dev
/null
2>&1
4188 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4189 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4194 QMAKE_BUILD_ERROR
=no
4195 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR
=yes
4196 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4197 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4198 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4201 #-------------------------------------------------------------------------------
4202 # tests that need qmake
4203 #-------------------------------------------------------------------------------
4205 # detect availability of float math.h functions
4206 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/floatmath
"floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4207 CFG_USE_FLOATMATH
=yes
4209 CFG_USE_FLOATMATH
=no
4212 # detect mmx support
4213 if [ "${CFG_MMX}" = "auto" ]; then
4214 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mmx
"mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4221 # detect 3dnow support
4222 if [ "${CFG_3DNOW}" = "auto" ]; then
4223 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/3dnow
"3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4230 # detect sse support
4231 if [ "${CFG_SSE}" = "auto" ]; then
4232 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sse
"sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4239 # detect sse2 support
4240 if [ "${CFG_SSE2}" = "auto" ]; then
4241 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sse2
"sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4248 # check iWMMXt support
4249 if [ "$CFG_IWMMXT" = "yes" ]; then
4250 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/iwmmxt
"iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4251 if [ $?
!= "0" ]; then
4252 echo "The iWMMXt functionality test failed!"
4253 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4259 if [ "$CFG_ZLIB" = "no" ]; then
4260 # Note: Qt no longer support builds without zlib
4261 # So we force a "no" to be "auto" here.
4262 # If you REALLY really need no zlib support, you can still disable
4263 # it by doing the following:
4264 # add "no-zlib" to mkspecs/qconfig.pri
4265 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4267 # There's no guarantee that Qt will build under those conditions
4272 if [ "$CFG_ZLIB" = "auto" ]; then
4273 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
4280 # detect how jpeg should be built
4281 if [ "$CFG_JPEG" = "auto" ]; then
4282 if [ "$CFG_SHARED" = "yes" ]; then
4289 if [ "$CFG_LIBJPEG" = "auto" ]; then
4290 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
4297 # detect how gif should be built
4298 if [ "$CFG_GIF" = "auto" ]; then
4299 if [ "$CFG_SHARED" = "yes" ]; then
4306 # detect how tiff should be built
4307 if [ "$CFG_TIFF" = "auto" ]; then
4308 if [ "$CFG_SHARED" = "yes" ]; then
4316 if [ "$CFG_LIBTIFF" = "auto" ]; then
4317 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
4324 # detect how mng should be built
4325 if [ "$CFG_MNG" = "auto" ]; then
4326 if [ "$CFG_SHARED" = "yes" ]; then
4333 if [ "$CFG_LIBMNG" = "auto" ]; then
4334 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
4342 if [ "$CFG_LIBPNG" = "auto" ]; then
4343 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
4350 # detect accessibility
4351 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4352 CFG_ACCESSIBILITY
=yes
4355 # auto-detect SQL-modules support
4356 for _SQLDR
in $CFG_SQL_AVAILABLE; do
4359 if [ "$CFG_SQL_mysql" != "no" ]; then
4360 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG
=`"$WHICH" mysql_config`
4361 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4362 QT_CFLAGS_MYSQL
=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4363 QT_LFLAGS_MYSQL_R
=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4364 QT_LFLAGS_MYSQL
=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4365 QT_MYSQL_VERSION
=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4366 QT_MYSQL_VERSION_MAJOR
=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4368 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4369 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4370 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4371 echo " You need MySql 4 or higher."
4372 echo " If you believe this message is in error you may use the continue"
4373 echo " switch (-continue) to $0 to continue."
4378 QT_LFLAGS_MYSQL_R
=""
4382 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
4383 QMakeVar add CONFIG use_libmysqlclient_r
4384 if [ "$CFG_SQL_mysql" = "auto" ]; then
4385 CFG_SQL_mysql
=plugin
4387 QT_LFLAGS_MYSQL
="$QT_LFLAGS_MYSQL_R"
4388 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
4389 if [ "$CFG_SQL_mysql" = "auto" ]; then
4390 CFG_SQL_mysql
=plugin
4393 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4394 echo "MySQL support cannot be enabled due to functionality tests!"
4395 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4396 echo " If you believe this message is in error you may use the continue"
4397 echo " switch (-continue) to $0 to continue."
4402 QT_LFLAGS_MYSQL_R
=""
4410 if [ "$CFG_SQL_psql" != "no" ]; then
4411 if "$WHICH" pg_config
>/dev
/null
2>&1; then
4412 QT_CFLAGS_PSQL
=`pg_config --includedir 2>/dev/null`
4413 QT_LFLAGS_PSQL
=`pg_config --libdir 2>/dev/null`
4415 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL
="-I$QT_CFLAGS_PSQL"
4416 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL
="-L$QT_LFLAGS_PSQL"
4417 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
4418 if [ "$CFG_SQL_psql" = "auto" ]; then
4422 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4423 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4424 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4425 echo " If you believe this message is in error you may use the continue"
4426 echo " switch (-continue) to $0 to continue."
4437 if [ "$CFG_SQL_odbc" != "no" ]; then
4438 if "$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
4439 if [ "$CFG_SQL_odbc" = "auto" ]; then
4443 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
4444 QT_LFLAGS_ODBC
="-liodbc"
4445 if [ "$CFG_SQL_odbc" = "auto" ]; then
4449 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4450 echo "ODBC support cannot be enabled due to functionality tests!"
4451 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4452 echo " If you believe this message is in error you may use the continue"
4453 echo " switch (-continue) to $0 to continue."
4463 if [ "$CFG_SQL_oci" != "no" ]; then
4464 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
4465 if [ "$CFG_SQL_oci" = "auto" ]; then
4469 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4470 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4471 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4472 echo " If you believe this message is in error you may use the continue"
4473 echo " switch (-continue) to $0 to continue."
4482 if [ "$CFG_SQL_tds" != "no" ]; then
4483 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
4484 if [ "$CFG_SQL_tds" = "auto" ]; then
4488 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4489 echo "TDS support cannot be enabled due to functionality tests!"
4490 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4491 echo " If you believe this message is in error you may use the continue"
4492 echo " switch (-continue) to $0 to continue."
4501 if [ "$CFG_SQL_db2" != "no" ]; then
4502 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
4503 if [ "$CFG_SQL_db2" = "auto" ]; then
4507 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4508 echo "ODBC support cannot be enabled due to functionality tests!"
4509 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4510 echo " If you believe this message is in error you may use the continue"
4511 echo " switch (-continue) to $0 to continue."
4520 if [ "$CFG_SQL_ibase" != "no" ]; then
4521 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
4522 if [ "$CFG_SQL_ibase" = "auto" ]; then
4523 CFG_SQL_ibase
=plugin
4526 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4527 echo "InterBase support cannot be enabled due to functionality tests!"
4528 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4529 echo " If you believe this message is in error you may use the continue"
4530 echo " switch (-continue) to $0 to continue."
4539 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4540 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
4541 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4542 CFG_SQL_sqlite2
=plugin
4545 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4546 echo "SQLite2 support cannot be enabled due to functionality tests!"
4547 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4548 echo " If you believe this message is in error you may use the continue"
4549 echo " switch (-continue) to $0 to continue."
4558 if [ "$CFG_SQL_sqlite" != "no" ]; then
4559 SQLITE_AUTODETECT_FAILED
="no"
4560 if [ "$CFG_SQLITE" = "system" ]; then
4561 if [ -n "$PKG_CONFIG" ]; then
4562 QT_CFLAGS_SQLITE
=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4563 QT_LFLAGS_SQLITE
=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4565 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
4566 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4567 CFG_SQL_sqlite
=plugin
4569 QMAKE_CONFIG
="$QMAKE_CONFIG system-sqlite"
4571 SQLITE_AUTODETECT_FAILED
="yes"
4574 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4575 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4576 CFG_SQL_sqlite
=plugin
4579 SQLITE_AUTODETECT_FAILED
="yes"
4583 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4584 echo "SQLite support cannot be enabled due to functionality tests!"
4585 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4586 echo " If you believe this message is in error you may use the continue"
4587 echo " switch (-continue) to $0 to continue."
4593 if [ "$OPT_VERBOSE" = "yes" ]; then
4594 echo "unknown SQL driver: $_SQLDR"
4600 # auto-detect NIS support
4601 if [ "$CFG_NIS" != "no" ]; then
4602 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
4605 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4606 echo "NIS support cannot be enabled due to functionality tests!"
4607 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4608 echo " If you believe this message is in error you may use the continue"
4609 echo " switch (-continue) to $0 to continue."
4617 # auto-detect CUPS support
4618 if [ "$CFG_CUPS" != "no" ]; then
4619 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
4622 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4623 echo "Cups support cannot be enabled due to functionality tests!"
4624 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4625 echo " If you believe this message is in error you may use the continue"
4626 echo " switch (-continue) to $0 to continue."
4634 # auto-detect iconv(3) support
4635 if [ "$CFG_ICONV" != "no" ]; then
4636 if [ "$PLATFORM_QWS" = "yes" ]; then
4638 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
4640 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
4643 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4644 echo "Iconv support cannot be enabled due to functionality tests!"
4645 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4646 echo " If you believe this message is in error you may use the continue"
4647 echo " switch (-continue) to $0 to continue."
4655 # auto-detect libdbus-1 support
4656 if [ "$CFG_DBUS" != "no" ]; then
4657 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1
2>/dev
/null
; then
4658 QT_CFLAGS_DBUS
=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4659 QT_LIBS_DBUS
=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4661 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
4662 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS
=yes
4663 QMakeVar
set QT_CFLAGS_DBUS
"$QT_CFLAGS_DBUS"
4664 QMakeVar
set QT_LIBS_DBUS
"$QT_LIBS_DBUS"
4666 if [ "$CFG_DBUS" = "auto" ]; then
4668 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4669 # CFG_DBUS is "yes" or "linked" here
4671 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
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."
4680 # Generate a CRC of the namespace for using in constants for the Carbon port.
4681 # This should mean that you really *can* load two Qt's and have our custom
4682 # Carbon events work.
4683 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
4684 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`
4687 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
4688 # auto-detect Glib support
4689 if [ "$CFG_GLIB" != "no" ]; then
4690 if [ -n "$PKG_CONFIG" ]; then
4691 QT_CFLAGS_GLIB
=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4692 QT_LIBS_GLIB
=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4694 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
4696 QMakeVar
set QT_CFLAGS_GLIB
"$QT_CFLAGS_GLIB"
4697 QMakeVar
set QT_LIBS_GLIB
"$QT_LIBS_GLIB"
4699 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4700 echo "Glib support cannot be enabled due to functionality tests!"
4701 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4702 echo " If you believe this message is in error you may use the continue"
4703 echo " switch (-continue) to $0 to continue."
4711 if [ "$CFG_PHONON" != "no" ]; then
4712 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
4713 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4714 if [ -n "$PKG_CONFIG" ]; then
4715 QT_CFLAGS_GSTREAMER
=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4716 QT_LIBS_GSTREAMER
=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4718 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
4720 QMakeVar
set QT_CFLAGS_GSTREAMER
"$QT_CFLAGS_GSTREAMER"
4721 QMakeVar
set QT_LIBS_GSTREAMER
"$QT_LIBS_GSTREAMER"
4723 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4724 echo "Gstreamer support cannot be enabled due to functionality tests!"
4725 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4726 echo " If you believe this message is in error you may use the continue"
4727 echo " switch (-continue) to $0 to continue."
4733 elif [ "$CFG_GLIB" = "no" ]; then
4737 if [ "$CFG_GSTREAMER" = "yes" ]; then
4740 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4741 echo "Phonon support cannot be enabled due to functionality tests!"
4742 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4743 echo " If you believe this message is in error you may use the continue"
4744 echo " switch (-continue) to $0 to continue."
4757 if [ "$PLATFORM_X11" = "yes" ]; then
4758 x11tests
="$relpath/config.tests/x11"
4761 # work around broken X11 headers when using GCC 2.95 or later
4763 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE
=yes
4764 if [ $NOTYPE = "yes" ]; then
4765 QMakeVar add QMAKE_CXXFLAGS
-fpermissive
4766 X11TESTS_FLAGS
="$X11TESTS_FLAGS -fpermissive"
4769 # Check we actually have X11 :-)
4770 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xlib
"XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4771 if [ $?
!= "0" ]; then
4772 echo "Basic XLib functionality test failed!"
4773 echo " You might need to modify the include and library search paths by editing"
4774 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4778 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
4779 if [ "$CFG_OPENGL" = "auto" ] ||
[ "$CFG_OPENGL" = "yes" ]; then
4780 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
4782 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
4784 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
4786 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
4789 if [ "$CFG_OPENGL" = "yes" ]; then
4790 echo "All the OpenGL functionality tests failed!"
4791 echo " You might need to modify the include and library search paths by editing"
4792 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4793 echo " ${XQMAKESPEC}."
4800 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4801 if [ "$CFG_OPENGL" = "desktop" ]; then
4802 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/glxfbconfig
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4803 if [ $?
!= "0" ]; then
4804 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4811 elif [ "$CFG_OPENGL" = "es1cl" ]; then
4812 # OpenGL ES 1.x common lite
4813 "$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
4814 if [ $?
!= "0" ]; then
4815 echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
4816 echo " You might need to modify the include and library search paths by editing"
4817 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4818 echo " ${XQMAKESPEC}."
4821 elif [ "$CFG_OPENGL" = "es1" ]; then
4823 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1
"OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
4824 if [ $?
!= "0" ]; then
4825 echo "The OpenGL ES 1.x functionality test failed!"
4826 echo " You might need to modify the include and library search paths by editing"
4827 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4828 echo " ${XQMAKESPEC}."
4831 elif [ "$CFG_OPENGL" = "es2" ]; then
4833 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles2
"OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4834 if [ $?
!= "0" ]; then
4835 echo "The OpenGL ES 2.0 functionality test failed!"
4836 echo " You might need to modify the include and library search paths by editing"
4837 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4838 echo " ${XQMAKESPEC}."
4841 elif [ "$CFG_OPENGL" = "desktop" ]; then
4842 # Desktop OpenGL support
4843 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/opengl
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4844 if [ $?
!= "0" ]; then
4845 echo "The OpenGL functionality test failed!"
4846 echo " You might need to modify the include and library search paths by editing"
4847 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4848 echo " ${XQMAKESPEC}."
4853 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4854 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/glxfbconfig
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4855 if [ $?
!= "0" ]; then
4856 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4864 # if opengl is disabled and the user specified graphicssystem gl, disable it...
4865 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
4866 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
4867 CFG_GRAPHICS_SYSTEM
=default
4870 # auto-detect Xcursor support
4871 if [ "$CFG_XCURSOR" != "no" ]; then
4872 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
4873 if [ "$CFG_XCURSOR" != "runtime" ]; then
4877 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4878 echo "Xcursor support cannot be enabled due to functionality tests!"
4879 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4880 echo " If you believe this message is in error you may use the continue"
4881 echo " switch (-continue) to $0 to continue."
4889 # auto-detect Xfixes support
4890 if [ "$CFG_XFIXES" != "no" ]; then
4891 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xfixes
"Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4892 if [ "$CFG_XFIXES" != "runtime" ]; then
4896 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4897 echo "Xfixes support cannot be enabled due to functionality tests!"
4898 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4899 echo " If you believe this message is in error you may use the continue"
4900 echo " switch (-continue) to $0 to continue."
4908 # auto-detect Xrandr support (resize and rotate extension)
4909 if [ "$CFG_XRANDR" != "no" ]; then
4910 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
4911 if [ "$CFG_XRANDR" != "runtime" ]; then
4915 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4916 echo "Xrandr support cannot be enabled due to functionality tests!"
4917 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4918 echo " If you believe this message is in error you may use the continue"
4919 echo " switch (-continue) to $0 to continue."
4927 # auto-detect Xrender support
4928 if [ "$CFG_XRENDER" != "no" ]; then
4929 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
4932 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4933 echo "Xrender support cannot be enabled due to functionality tests!"
4934 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4935 echo " If you believe this message is in error you may use the continue"
4936 echo " switch (-continue) to $0 to continue."
4944 # auto-detect MIT-SHM support
4945 if [ "$CFG_MITSHM" != "no" ]; then
4946 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
4949 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4950 echo "MITSHM support cannot be enabled due to functionality tests!"
4951 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4952 echo " If you believe this message is in error you may use the continue"
4953 echo " switch (-continue) to $0 to continue."
4961 # auto-detect FontConfig support
4962 if [ "$CFG_FONTCONFIG" != "no" ]; then
4963 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig
2>/dev
/null
; then
4964 QT_CFLAGS_FONTCONFIG
=`$PKG_CONFIG --cflags fontconfig 2>/dev/null`
4965 QT_LIBS_FONTCONFIG
=`$PKG_CONFIG --libs fontconfig 2>/dev/null`
4967 QT_CFLAGS_FONTCONFIG
=
4968 QT_LIBS_FONTCONFIG
="-lfreetype -lfontconfig"
4970 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
4972 QMakeVar
set QMAKE_CFLAGS_X11
"$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
4973 QMakeVar
set QMAKE_LIBS_X11
"$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
4974 CFG_LIBFREETYPE
=system
4976 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4977 echo "FontConfig support cannot be enabled due to functionality tests!"
4978 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4979 echo " If you believe this message is in error you may use the continue"
4980 echo " switch (-continue) to $0 to continue."
4988 # auto-detect Session Management support
4989 if [ "$CFG_SM" = "auto" ]; then
4990 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
4993 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4994 echo "Session Management support cannot be enabled due to functionality tests!"
4995 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4996 echo " If you believe this message is in error you may use the continue"
4997 echo " switch (-continue) to $0 to continue."
5005 # auto-detect SHAPE support
5006 if [ "$CFG_XSHAPE" != "no" ]; then
5007 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
5010 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5011 echo "XShape support cannot be enabled due to functionality tests!"
5012 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5013 echo " If you believe this message is in error you may use the continue"
5014 echo " switch (-continue) to $0 to continue."
5022 # auto-detect Xinerama support
5023 if [ "$CFG_XINERAMA" != "no" ]; then
5024 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
5025 if [ "$CFG_XINERAMA" != "runtime" ]; then
5029 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5030 echo "Xinerama support cannot be enabled due to functionality tests!"
5031 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5032 echo " If you believe this message is in error you may use the continue"
5033 echo " switch (-continue) to $0 to continue."
5041 # auto-detect Xinput support
5042 if [ "$CFG_XINPUT" != "no" ]; then
5043 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
5044 if [ "$CFG_XINPUT" != "runtime" ]; then
5048 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5049 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5050 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5051 echo " If you believe this message is in error you may use the continue"
5052 echo " switch (-continue) to $0 to continue."
5060 # auto-detect XKB support
5061 if [ "$CFG_XKB" != "no" ]; then
5062 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
5065 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5066 echo "XKB support cannot be enabled due to functionality tests!"
5067 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5068 echo " If you believe this message is in error you may use the continue"
5069 echo " switch (-continue) to $0 to continue."
5077 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5078 if [ -n "$PKG_CONFIG" ]; then
5079 QT_CFLAGS_QGTKSTYLE
=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5080 QT_LIBS_QGTKSTYLE
=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5082 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5084 QMakeVar
set QT_CFLAGS_QGTKSTYLE
"$QT_CFLAGS_QGTKSTYLE"
5085 QMakeVar
set QT_LIBS_QGTKSTYLE
"$QT_LIBS_QGTKSTYLE"
5087 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5088 echo "Gtk theme support cannot be enabled due to functionality tests!"
5089 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5090 echo " If you believe this message is in error you may use the continue"
5091 echo " switch (-continue) to $0 to continue."
5097 elif [ "$CFG_GLIB" = "no" ]; then
5103 if [ "$PLATFORM_MAC" = "yes" ]; then
5104 if [ "$CFG_PHONON" != "no" ]; then
5105 # Always enable Phonon (unless it was explicitly disabled)
5111 if [ "$PLATFORM_QWS" = "yes" ]; then
5113 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5114 if [ "$CFG_OPENGL" = "yes" ]; then
5115 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
5117 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
5119 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
5122 echo "All the OpenGL ES functionality tests failed!"
5123 echo " You might need to modify the include and library search paths by editing"
5124 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5125 echo " ${XQMAKESPEC}."
5128 elif [ "$CFG_OPENGL" = "es1" ]; then
5130 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1
"OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5131 if [ $?
!= "0" ]; then
5132 echo "The OpenGL ES 1.x functionality test failed!"
5133 echo " You might need to modify the include and library search paths by editing"
5134 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5135 echo " ${XQMAKESPEC}."
5138 elif [ "$CFG_OPENGL" = "es2" ]; then
5140 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles2
"OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5141 if [ $?
!= "0" ]; then
5142 echo "The OpenGL ES 2.0 functionality test failed!"
5143 echo " You might need to modify the include and library search paths by editing"
5144 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5145 echo " ${XQMAKESPEC}."
5148 elif [ "$CFG_OPENGL" = "desktop" ]; then
5149 # Desktop OpenGL support
5150 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5155 for screen
in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5156 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5157 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/ahi
"Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
5158 if [ $?
!= "0" ]; then
5159 echo "The Ahi screen driver functionality test failed!"
5160 echo " You might need to modify the include and library search paths by editing"
5161 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5162 echo " ${XQMAKESPEC}."
5167 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5168 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/svgalib
"SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
5169 if [ $?
!= "0" ]; then
5170 echo "The SVGAlib screen driver functionality test failed!"
5171 echo " You might need to modify the include and library search paths by editing"
5172 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5173 echo " ${XQMAKESPEC}."
5178 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5179 if [ -n "$PKG_CONFIG" ]; then
5180 if $PKG_CONFIG --exists directfb
2>/dev
/null
; then
5181 QT_CFLAGS_DIRECTFB
=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5182 QT_LIBS_DIRECTFB
=`$PKG_CONFIG --libs directfb 2>/dev/null`
5183 elif directfb-config
--version >/dev
/null
2>&1; then
5184 QT_CFLAGS_DIRECTFB
=`directfb-config --cflags 2>/dev/null`
5185 QT_LIBS_DIRECTFB
=`directfb-config --libs 2>/dev/null`
5189 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5190 if [ -n "$QT_CFLAGS_DIRECTFB" ] ||
[ -n "$QT_LIBS_DIRECTFB" ]; then
5191 QMakeVar
set QT_CFLAGS_DIRECTFB
"$QT_CFLAGS_DIRECTFB"
5192 QMakeVar
set QT_LIBS_DIRECTFB
"$QT_LIBS_DIRECTFB"
5194 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5195 QMakeVar
set QT_DEFINES_DIRECTFB
"QT3_SUPPORT"
5198 "$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
5199 if [ $?
!= "0" ]; then
5200 echo "The DirectFB screen driver functionality test failed!"
5201 echo " You might need to modify the include and library search paths by editing"
5202 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5203 echo " ${XQMAKESPEC}."
5211 for mouse
in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5212 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5213 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/tslib
"tslib" $L_FLAGS $I_FLAGS $l_FLAGS
5214 if [ $?
!= "0" ]; then
5215 echo "The tslib functionality test failed!"
5216 echo " You might need to modify the include and library search paths by editing"
5217 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5218 echo " ${XQMAKESPEC}."
5227 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/sound
"sound" $L_FLAGS $I_FLAGS $l_FLAGS
5228 if [ $?
!= "0" ]; then
5229 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SOUND"
5235 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE
="$CFG_QWS_FREETYPE"
5236 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE
=no
5237 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5238 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
5239 CFG_LIBFREETYPE
=system
5245 if [ "$CFG_ENDIAN" = "auto" ]; then
5246 if [ "$PLATFORM_MAC" = "yes" ]; then
5249 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5251 if [ "$F" -eq 0 ]; then
5252 CFG_ENDIAN
="Q_LITTLE_ENDIAN"
5253 elif [ "$F" -eq 1 ]; then
5254 CFG_ENDIAN
="Q_BIG_ENDIAN"
5257 echo "The target system byte order could not be detected!"
5258 echo "Turn on verbose messaging (-v) to see the final report."
5259 echo "You can use the -little-endian or -big-endian switch to"
5260 echo "$0 to continue."
5266 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5267 if [ "$PLATFORM_MAC" = "yes" ]; then
5270 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5272 if [ "$F" -eq 0 ]; then
5273 CFG_HOST_ENDIAN
="Q_LITTLE_ENDIAN"
5274 elif [ "$F" -eq 1 ]; then
5275 CFG_HOST_ENDIAN
="Q_BIG_ENDIAN"
5278 echo "The host system byte order could not be detected!"
5279 echo "Turn on verbose messaging (-v) to see the final report."
5280 echo "You can use the -host-little-endian or -host-big-endian switch to"
5281 echo "$0 to continue."
5287 if [ "$CFG_ARMFPA" != "auto" ]; then
5288 if [ "$CFG_ARMFPA" = "yes" ]; then
5289 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5290 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5292 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5295 CFG_DOUBLEFORMAT
="normal"
5300 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5301 if [ "$PLATFORM_QWS" != "yes" ]; then
5302 CFG_DOUBLEFORMAT
=normal
5304 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5306 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5307 CFG_DOUBLEFORMAT
=normal
5308 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
5309 CFG_DOUBLEFORMAT
=normal
5310 elif [ "$F" -eq 10 ]; then
5311 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE"
5312 elif [ "$F" -eq 11 ]; then
5313 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG"
5314 elif [ "$F" -eq 12 ]; then
5315 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5317 elif [ "$F" -eq 13 ]; then
5318 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5322 echo "The system floating point format could not be detected."
5323 echo "This may cause data to be generated in a wrong format"
5324 echo "Turn on verbose messaging (-v) to see the final report."
5325 # we do not fail on this since this is a new test, and if it fails,
5326 # the old behavior should be correct in most cases
5327 CFG_DOUBLEFORMAT
=normal
5333 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stl
"STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5337 if [ "$CFG_STL" != "no" ]; then
5338 if [ "$HAVE_STL" = "yes" ]; then
5341 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5342 echo "STL support cannot be enabled due to functionality tests!"
5343 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5344 echo " If you believe this message is in error you may use the continue"
5345 echo " switch (-continue) to $0 to continue."
5353 # find if the platform supports IPv6
5354 if [ "$CFG_IPV6" != "no" ]; then
5355 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
5358 if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5359 echo "IPv6 support cannot be enabled due to functionality tests!"
5360 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5361 echo " If you believe this message is in error you may use the continue"
5362 echo " switch (-continue) to $0 to continue."
5370 # detect POSIX clock_gettime()
5371 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5372 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
5373 CFG_CLOCK_GETTIME
=yes
5375 CFG_CLOCK_GETTIME
=no
5379 # detect POSIX monotonic clocks
5380 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5381 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
5382 CFG_CLOCK_MONOTONIC
=yes
5384 CFG_CLOCK_MONOTONIC
=no
5386 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5387 CFG_CLOCK_MONOTONIC
=no
5391 if [ "$CFG_MREMAP" = "auto" ]; then
5392 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mremap
"mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5399 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5400 if [ "$CFG_GETADDRINFO" != "no" ]; then
5401 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getaddrinfo
"getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5404 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5405 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5406 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5407 echo " If you believe this message is in error you may use the continue"
5408 echo " switch (-continue) to $0 to continue."
5416 # find if the platform provides inotify
5417 if [ "$CFG_INOTIFY" != "no" ]; then
5418 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/inotify
"inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5421 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5422 echo "inotify support cannot be enabled due to functionality tests!"
5423 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5424 echo " If you believe this message is in error you may use the continue"
5425 echo " switch (-continue) to $0 to continue."
5433 # find if the platform provides if_nametoindex (ipv6 interface name support)
5434 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5435 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
5438 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5439 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5440 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5441 echo " If you believe this message is in error you may use the continue"
5442 echo " switch (-continue) to $0 to continue."
5450 # find if the platform provides getifaddrs (network interface enumeration)
5451 if [ "$CFG_GETIFADDRS" != "no" ]; then
5452 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getifaddrs
"getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5455 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5456 echo "getifaddrs support cannot be enabled due to functionality tests!"
5457 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5458 echo " If you believe this message is in error you may use the continue"
5459 echo " switch (-continue) to $0 to continue."
5467 # find if the platform supports X/Open Large File compilation environment
5468 if [ "$CFG_LARGEFILE" != "no" ]; then
5469 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
5472 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5473 echo "X/Open Large File support cannot be enabled due to functionality tests!"
5474 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5475 echo " If you believe this message is in error you may use the continue"
5476 echo " switch (-continue) to $0 to continue."
5485 if [ "$CFG_OPENSSL" != "no" ]; then
5486 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
5487 if [ "$CFG_OPENSSL" = "auto" ]; then
5491 if ( [ "$CFG_OPENSSL" = "yes" ] ||
[ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5492 echo "OpenSSL support cannot be enabled due to functionality tests!"
5493 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5494 echo " If you believe this message is in error you may use the continue"
5495 echo " switch (-continue) to $0 to continue."
5503 if [ "$CFG_PTMALLOC" != "no" ]; then
5504 # build ptmalloc, copy .a file to lib/
5505 echo "Building ptmalloc. Please wait..."
5506 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
5507 mkdir
"$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
5509 QMakeVar add QMAKE_LFLAGS
"$outpath/lib/libptmalloc3.a"
5512 #-------------------------------------------------------------------------------
5513 # ask for all that hasn't been auto-detected or specified in the arguments
5514 #-------------------------------------------------------------------------------
5516 ### fix this: user input should be validated in a loop
5517 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PLATFORM_QWS" = "yes" ]; then
5519 echo "Choose pixel-depths to support:"
5521 echo " 1. 1bpp, black/white"
5522 echo " 4. 4bpp, grayscale"
5523 echo " 8. 8bpp, paletted"
5524 echo " 12. 12bpp, rgb 4-4-4"
5525 echo " 15. 15bpp, rgb 5-5-5"
5526 echo " 16. 16bpp, rgb 5-6-5"
5527 echo " 18. 18bpp, rgb 6-6-6"
5528 echo " 24. 24bpp, rgb 8-8-8"
5529 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
5530 echo " all. All supported depths"
5532 echo "Your choices (default 8,16,32):"
5534 if [ -z "$CFG_QWS_DEPTHS" ] ||
[ "$CFG_QWS_DEPTHS" = "yes" ]; then
5535 CFG_QWS_DEPTHS
=8,16,32
5538 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
5539 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
5540 CFG_QWS_DEPTHS
="1 4 8 12 15 16 18 24 32 generic"
5542 for D
in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
5544 1|
4|
8|
12|
15|
16|
18|
24|
32) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
5545 generic
) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
5550 # enable dwarf2 support on Mac
5551 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5552 QT_CONFIG
="$QT_CONFIG dwarf2"
5555 # Set the default arch. Select 32-bit/carbon if nothing else has
5556 # been specified on the configure line.
5557 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" == "" ]; then
5558 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
5560 if [ "$QT_MAC_DEFUALT_ARCH" == "x86_64" ]; then
5561 CFG_MAC_ARCHS
=" x86"
5562 elif [ "$QT_MAC_DEFUALT_ARCH" == "ppc64" ]; then
5563 CFG_MAC_ARCHS
=" ppc"
5565 CFG_MAC_ARCHS
=" $QT_MAC_DEFUALT_ARCH"
5568 [ "$OPT_VERBOSE" == "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
5571 # enable cocoa and/or carbon on Mac
5572 if [ "$CFG_MAC_COCOA" = "yes" ]; then
5573 # -cocoa on the command line disables carbon completely (i.e. use cocoa for 32-bit as well)
5576 # check which archs are in use, enable cocoa if we find a 64-bit one
5577 if echo "$CFG_MAC_ARCHS" |
grep 64 > /dev
/null
2>&1; then
5578 CFG_MAC_COCOA
="yes";
5579 CFG_MAC_CARBON
="no";
5580 if echo "$CFG_MAC_ARCHS" |
grep -w ppc
> /dev
/null
2>&1; then
5581 CFG_MAC_CARBON
="yes";
5583 if echo "$CFG_MAC_ARCHS" |
grep -w x86
> /dev
/null
2>&1; then
5584 CFG_MAC_CARBON
="yes";
5587 # no 64-bit archs found.
5592 # set the global Mac deployment target. This is overridden on an arch-by-arch basis
5593 # in some cases, see code further down
5594 case "$PLATFORM,$CFG_MAC_COCOA" in
5597 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.5
5602 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.4
5606 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.3
5610 # enable Qt 3 support functionality
5611 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5612 QT_CONFIG
="$QT_CONFIG qt3support"
5616 if [ "$CFG_PHONON" = "yes" ]; then
5617 QT_CONFIG
="$QT_CONFIG phonon"
5618 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5619 QT_CONFIG
="$QT_CONFIG phonon-backend"
5622 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_PHONON"
5625 # disable accessibility
5626 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5627 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5629 QT_CONFIG
="$QT_CONFIG accessibility"
5633 if [ "$CFG_OPENGL" = "no" ]; then
5634 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENGL"
5636 QT_CONFIG
="$QT_CONFIG opengl"
5639 if [ "$CFG_OPENGL" = "es1" ] ||
[ "$CFG_OPENGL" = "es1cl" ] ||
[ "$CFG_OPENGL" = "es2" ]; then
5640 if [ "$PLATFORM_QWS" = "yes" ]; then
5641 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
5642 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_USE_EGLWINDOWSURFACE"
5644 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES"
5647 if [ "$CFG_OPENGL" = "es1" ]; then
5648 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1"
5649 QT_CONFIG
="$QT_CONFIG opengles1"
5652 if [ "$CFG_OPENGL" = "es1cl" ]; then
5653 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1_CL"
5654 QT_CONFIG
="$QT_CONFIG opengles1cl"
5657 if [ "$CFG_OPENGL" = "es2" ]; then
5658 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5659 QT_CONFIG
="$QT_CONFIG opengles2"
5662 # safe execution environment
5663 if [ "$CFG_SXE" != "no" ]; then
5664 QT_CONFIG
="$QT_CONFIG sxe"
5667 # build up the variables for output
5668 if [ "$CFG_DEBUG" = "yes" ]; then
5669 QMAKE_OUTDIR
="${QMAKE_OUTDIR}debug"
5670 QMAKE_CONFIG
="$QMAKE_CONFIG debug"
5671 elif [ "$CFG_DEBUG" = "no" ]; then
5672 QMAKE_OUTDIR
="${QMAKE_OUTDIR}release"
5673 QMAKE_CONFIG
="$QMAKE_CONFIG release"
5675 if [ "$CFG_SHARED" = "yes" ]; then
5676 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-shared"
5677 QMAKE_CONFIG
="$QMAKE_CONFIG shared dll"
5678 elif [ "$CFG_SHARED" = "no" ]; then
5679 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-static"
5680 QMAKE_CONFIG
="$QMAKE_CONFIG static"
5682 if [ "$PLATFORM_QWS" = "yes" ]; then
5683 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
5684 QMAKE_CONFIG
="$QMAKE_CONFIG embedded"
5685 QT_CONFIG
="$QT_CONFIG embedded"
5686 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5688 QMakeVar
set PRECOMPILED_DIR
".pch/$QMAKE_OUTDIR"
5689 QMakeVar
set OBJECTS_DIR
".obj/$QMAKE_OUTDIR"
5690 QMakeVar
set MOC_DIR
".moc/$QMAKE_OUTDIR"
5691 QMakeVar
set RCC_DIR
".rcc/$QMAKE_OUTDIR"
5692 QMakeVar
set UI_DIR
".uic/$QMAKE_OUTDIR"
5693 if [ "$CFG_LARGEFILE" = "yes" ]; then
5694 QMAKE_CONFIG
="$QMAKE_CONFIG largefile"
5696 if [ "$CFG_STL" = "no" ]; then
5697 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STL"
5699 QMAKE_CONFIG
="$QMAKE_CONFIG stl"
5701 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5702 QMAKE_CONFIG
="$QMAKE_CONFIG GNUmake"
5704 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_exports"
5705 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_relocations"
5706 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG precompile_header"
5707 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5708 QMakeVar add QMAKE_CFLAGS
-g
5709 QMakeVar add QMAKE_CXXFLAGS
-g
5710 QMAKE_CONFIG
="$QMAKE_CONFIG separate_debug_info"
5712 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG mmx"
5713 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG 3dnow"
5714 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse"
5715 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse2"
5716 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG iwmmxt"
5717 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG $CFG_MAC_ARCHS"
5718 if [ "$CFG_IPV6" = "yes" ]; then
5719 QT_CONFIG
="$QT_CONFIG ipv6"
5721 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5722 QT_CONFIG
="$QT_CONFIG clock-gettime"
5724 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5725 QT_CONFIG
="$QT_CONFIG clock-monotonic"
5727 if [ "$CFG_MREMAP" = "yes" ]; then
5728 QT_CONFIG
="$QT_CONFIG mremap"
5730 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5731 QT_CONFIG
="$QT_CONFIG getaddrinfo"
5733 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5734 QT_CONFIG
="$QT_CONFIG ipv6ifname"
5736 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5737 QT_CONFIG
="$QT_CONFIG getifaddrs"
5739 if [ "$CFG_INOTIFY" = "yes" ]; then
5740 QT_CONFIG
="$QT_CONFIG inotify"
5742 if [ "$CFG_LIBJPEG" = "system" ]; then
5743 QT_CONFIG
="$QT_CONFIG system-jpeg"
5745 if [ "$CFG_JPEG" = "no" ]; then
5746 QT_CONFIG
="$QT_CONFIG no-jpeg"
5747 elif [ "$CFG_JPEG" = "yes" ]; then
5748 QT_CONFIG
="$QT_CONFIG jpeg"
5750 if [ "$CFG_LIBMNG" = "system" ]; then
5751 QT_CONFIG
="$QT_CONFIG system-mng"
5753 if [ "$CFG_MNG" = "no" ]; then
5754 QT_CONFIG
="$QT_CONFIG no-mng"
5755 elif [ "$CFG_MNG" = "yes" ]; then
5756 QT_CONFIG
="$QT_CONFIG mng"
5758 if [ "$CFG_LIBPNG" = "no" ]; then
5761 if [ "$CFG_LIBPNG" = "system" ]; then
5762 QT_CONFIG
="$QT_CONFIG system-png"
5764 if [ "$CFG_PNG" = "no" ]; then
5765 QT_CONFIG
="$QT_CONFIG no-png"
5766 elif [ "$CFG_PNG" = "yes" ]; then
5767 QT_CONFIG
="$QT_CONFIG png"
5769 if [ "$CFG_GIF" = "no" ]; then
5770 QT_CONFIG
="$QT_CONFIG no-gif"
5771 elif [ "$CFG_GIF" = "yes" ]; then
5772 QT_CONFIG
="$QT_CONFIG gif"
5774 if [ "$CFG_LIBTIFF" = "system" ]; then
5775 QT_CONFIG
="$QT_CONFIG system-tiff"
5777 if [ "$CFG_TIFF" = "no" ]; then
5778 QT_CONFIG
="$QT_CONFIG no-tiff"
5779 elif [ "$CFG_TIFF" = "yes" ]; then
5780 QT_CONFIG
="$QT_CONFIG tiff"
5782 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5783 QT_CONFIG
="$QT_CONFIG no-freetype"
5784 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5785 QT_CONFIG
="$QT_CONFIG system-freetype"
5787 QT_CONFIG
="$QT_CONFIG freetype"
5790 if [ "x$PLATFORM_MAC" = "xyes" ]; then
5791 #On Mac we implicitly link against libz, so we
5792 #never use the 3rdparty stuff.
5793 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB
="system"
5795 if [ "$CFG_ZLIB" = "yes" ]; then
5796 QT_CONFIG
="$QT_CONFIG zlib"
5797 elif [ "$CFG_ZLIB" = "system" ]; then
5798 QT_CONFIG
="$QT_CONFIG system-zlib"
5801 [ "$CFG_NIS" = "yes" ] && QT_CONFIG
="$QT_CONFIG nis"
5802 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG
="$QT_CONFIG cups"
5803 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG
="$QT_CONFIG iconv"
5804 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG
="$QT_CONFIG gnu-libiconv"
5805 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG
="$QT_CONFIG glib"
5806 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG
="$QT_CONFIG gstreamer"
5807 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG
="$QT_CONFIG dbus"
5808 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG
="$QT_CONFIG dbus dbus-linked"
5809 [ "$CFG_NAS" = "system" ] && QT_CONFIG
="$QT_CONFIG nas"
5810 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG
="$QT_CONFIG openssl"
5811 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG
="$QT_CONFIG openssl-linked"
5813 if [ "$PLATFORM_X11" = "yes" ]; then
5814 [ "$CFG_SM" = "yes" ] && QT_CONFIG
="$QT_CONFIG x11sm"
5816 # for some reason, the following libraries are not always built shared,
5817 # so *every* program/lib (including Qt) has to link against them
5818 if [ "$CFG_XSHAPE" = "yes" ]; then
5819 QT_CONFIG
="$QT_CONFIG xshape"
5821 if [ "$CFG_XINERAMA" = "yes" ]; then
5822 QT_CONFIG
="$QT_CONFIG xinerama"
5823 QMakeVar
set QMAKE_LIBS_X11
'-lXinerama $$QMAKE_LIBS_X11'
5825 if [ "$CFG_XCURSOR" = "yes" ]; then
5826 QT_CONFIG
="$QT_CONFIG xcursor"
5827 QMakeVar
set QMAKE_LIBS_X11
'-lXcursor $$QMAKE_LIBS_X11'
5829 if [ "$CFG_XFIXES" = "yes" ]; then
5830 QT_CONFIG
="$QT_CONFIG xfixes"
5831 QMakeVar
set QMAKE_LIBS_X11
'-lXfixes $$QMAKE_LIBS_X11'
5833 if [ "$CFG_XRANDR" = "yes" ]; then
5834 QT_CONFIG
="$QT_CONFIG xrandr"
5835 if [ "$CFG_XRENDER" != "yes" ]; then
5836 # libXrandr uses 1 function from libXrender, so we always have to have it :/
5837 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr -lXrender $$QMAKE_LIBS_X11'
5839 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr $$QMAKE_LIBS_X11'
5842 if [ "$CFG_XRENDER" = "yes" ]; then
5843 QT_CONFIG
="$QT_CONFIG xrender"
5844 QMakeVar
set QMAKE_LIBS_X11
'-lXrender $$QMAKE_LIBS_X11'
5846 if [ "$CFG_MITSHM" = "yes" ]; then
5847 QT_CONFIG
="$QT_CONFIG mitshm"
5849 if [ "$CFG_FONTCONFIG" = "yes" ]; then
5850 QT_CONFIG
="$QT_CONFIG fontconfig"
5852 if [ "$CFG_XINPUT" = "yes" ]; then
5853 QMakeVar
set QMAKE_LIBS_X11
'-lXi $$QMAKE_LIBS_X11'
5855 if [ "$CFG_XINPUT" = "yes" ]; then
5856 QT_CONFIG
="$QT_CONFIG xinput tablet"
5858 if [ "$CFG_XKB" = "yes" ]; then
5859 QT_CONFIG
="$QT_CONFIG xkb"
5863 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES
"$D_FLAGS"
5864 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS
"$L_FLAGS"
5865 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS
"$l_FLAGS"
5867 if [ "$PLATFORM_MAC" = "yes" ]; then
5868 if [ "$CFG_RPATH" = "yes" ]; then
5869 QMAKE_CONFIG
="$QMAKE_CONFIG absolute_library_soname"
5871 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
5872 if [ -n "$RPATH_FLAGS" ]; then
5874 echo "ERROR: -R cannot be used on this platform as \$QMAKE_RPATH is"
5878 elif [ "$CFG_RPATH" = "yes" ]; then
5879 RPATH_MESSAGE
=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5883 if [ "$CFG_RPATH" = "yes" ]; then
5884 # set the default rpath to the library installation directory
5885 RPATH_FLAGS
="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5887 if [ -n "$RPATH_FLAGS" ]; then
5888 # add the user defined rpaths
5889 QMakeVar add QMAKE_RPATHDIR
"$RPATH_FLAGS"
5893 if [ '!' -z "$I_FLAGS" ]; then
5894 # add the user define include paths
5895 QMakeVar add QMAKE_CFLAGS
"$I_FLAGS"
5896 QMakeVar add QMAKE_CXXFLAGS
"$I_FLAGS"
5899 # turn off exceptions for the compilers that support it
5900 if [ "$PLATFORM_QWS" = "yes" ]; then
5901 COMPILER
=`echo $XPLATFORM | cut -f 3- -d-`
5903 COMPILER
=`echo $PLATFORM | cut -f 2- -d-`
5905 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
5909 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5910 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG exceptions"
5914 # Some Qt modules are too advanced in C++ for some old compilers
5915 # Detect here the platforms where they are known to work.
5917 # See Qt documentation for more information on which features are
5918 # supported and on which compilers.
5920 canBuildQtXmlPatterns
="yes"
5921 canBuildWebKit
="$HAVE_STL"
5923 # WebKit requires stdint.h
5924 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stdint
"Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
5925 if [ $?
!= "0" ]; then
5929 case "$XPLATFORM" in
5931 # PA-RISC's assembly is too limited
5932 # gcc 3.4 on that platform can't build QtXmlPatterns
5933 # the assembly it generates cannot be compiled
5935 # Check gcc's version
5936 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5940 canBuildQtXmlPatterns
="no"
5944 canBuildQtXmlPatterns
="no"
5949 # Check gcc's version
5950 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5958 canBuildQtXmlPatterns
="no"
5963 # Check the compiler version
5964 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5967 canBuildQtXmlPatterns
="no"
5973 canBuildQtXmlPatterns
="no"
5980 canBuildQtXmlPatterns
="no"
5987 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
5988 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
5991 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
5992 CFG_XMLPATTERNS
="$canBuildQtXmlPatterns"
5993 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
5994 CFG_XMLPATTERNS
="no"
5996 if [ "$CFG_XMLPATTERNS" = "yes" ]; then
5997 QT_CONFIG
="$QT_CONFIG xmlpatterns"
5999 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
6002 if [ "$CFG_SVG" = "yes" ]; then
6003 QT_CONFIG
="$QT_CONFIG svg"
6005 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SVG"
6008 if [ "$CFG_WEBKIT" = "auto" ]; then
6009 CFG_WEBKIT
="$canBuildWebKit"
6012 if [ "$CFG_WEBKIT" = "yes" ]; then
6013 QT_CONFIG
="$QT_CONFIG webkit"
6014 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
6018 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_WEBKIT"
6021 if [ "$CFG_SCRIPTTOOLS" = "auto" ]; then
6022 CFG_SCRIPTTOOLS
="yes"
6025 if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
6026 QT_CONFIG
="$QT_CONFIG scripttools"
6027 CFG_SCRIPTTOOLS
="yes"
6029 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
6032 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6035 QMakeVar add QMAKE_CFLAGS
-fno-exceptions
6036 QMakeVar add QMAKE_CXXFLAGS
-fno-exceptions
6037 QMakeVar add QMAKE_LFLAGS
-fno-exceptions
6042 QMakeVar add QMAKE_CFLAGS
-LANG:exceptions
=off
6043 QMakeVar add QMAKE_CXXFLAGS
-LANG:exceptions
=off
6044 QMakeVar add QMAKE_LFLAGS
-LANG:exceptions
=off
6051 QMAKE_CONFIG
="$QMAKE_CONFIG exceptions_off"
6054 # On Mac, set the minimum deployment target for the different architechtures
6055 # using the Xarch compiler option when supported (10.5 and up). On 10.4 the
6056 # deployment version is set to 10.3 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
6057 # env. variable. "-cocoa" on the command line means Cocoa is used in 32-bit mode also,
6058 # in this case fall back on QMAKE_MACOSX_DEPLOYMENT_TARGET which will be set to 10.5.
6059 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] && [ "$COMMANDLINE_MAC_COCOA" != "yes" ]; then
6060 if echo "$CFG_MAC_ARCHS" |
grep '\<x86\>' > /dev
/null
2>&1; then
6061 QMakeVar add QMAKE_CFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6062 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6063 QMakeVar add QMAKE_LFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6064 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86
"-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
6066 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc\>' > /dev
/null
2>&1; then
6067 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc -mmacosx-version-min=10.3"
6068 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc -mmacosx-version-min=10.3"
6069 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc -mmacosx-version-min=10.3"
6070 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC
"-arch ppc -Xarch_ppc -mmacosx-version-min=10.3"
6072 if echo "$CFG_MAC_ARCHS" |
grep '\<x86_64\>' > /dev
/null
2>&1; then
6073 QMakeVar add QMAKE_CFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6074 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6075 QMakeVar add QMAKE_LFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6076 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64
"-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
6078 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc64\>' > /dev
/null
2>&1; then
6079 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6080 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6081 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6082 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64
"-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
6086 #-------------------------------------------------------------------------------
6087 # generate QT_BUILD_KEY
6088 #-------------------------------------------------------------------------------
6090 # some compilers generate binary incompatible code between different versions,
6091 # so we need to generate a build key that is different between these compilers
6095 COMPILER_VERSION
=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6097 case "$COMPILER_VERSION" in
6099 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6100 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6101 QT_GCC_PATCH_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6104 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6105 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6106 QT_GCC_PATCH_VERSION
=0
6110 case "$COMPILER_VERSION" in
6112 COMPILER_VERSION
="2.95.*"
6115 COMPILER_VERSION
="3.*"
6118 COMPILER_VERSION
="4"
6123 [ '!' -z "$COMPILER_VERSION" ] && COMPILER
="g++-${COMPILER_VERSION}"
6130 # QT_CONFIG can contain the following:
6132 # Things that affect the Qt API/ABI:
6135 # minimal-config small-config medium-config large-config full-config
6137 # Different edition modules:
6138 # network canvas table xml opengl sql
6143 # Things that do not affect the Qt API/ABI:
6144 # system-jpeg no-jpeg jpeg
6145 # system-mng no-mng mng
6146 # system-png no-png png
6147 # system-zlib no-zlib zlib
6148 # system-libtiff no-libtiff
6162 # X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb
6163 # Embedded: embedded freetype
6169 # determine the build options
6170 for config_option
in $QMAKE_CONFIG $QT_CONFIG; do
6172 case "$config_option" in
6174 # take the last *-config setting. this is the highest config being used,
6175 # and is the one that we will use for tagging plugins
6176 BUILD_CONFIG
="$config_option"
6180 # these config options affect the Qt API/ABI. they should influence
6181 # the generation of the buildkey, so we don't skip them
6185 *) # skip all other options since they don't affect the Qt API/ABI.
6189 if [ "$SKIP" = "no" ]; then
6190 BUILD_OPTIONS
="$BUILD_OPTIONS $config_option"
6194 # put the options that we are missing into .options
6196 for opt
in `echo $ALL_OPTIONS`; do
6198 if echo $BUILD_OPTIONS |
grep $opt >/dev
/null
2>&1; then
6201 if [ "$SKIP" = "no" ]; then
6202 echo "$opt" >> .options
6206 # reconstruct BUILD_OPTIONS with a sorted negative feature list
6207 # (ie. only things that are missing are will be put into the build key)
6209 if [ -f .options
]; then
6210 for opt
in `sort -f .options | uniq`; do
6211 BUILD_OPTIONS
="$BUILD_OPTIONS no-$opt"
6216 # QT_NO* defines affect the Qt API (and binary compatibility). they need
6217 # to be included in the build key
6218 for build_option
in $D_FLAGS; do
6219 build_option
=`echo $build_option | cut -d \" -f 2 -`
6220 case "$build_option" in
6222 echo "$build_option" >> .options
6225 # skip all other compiler defines
6230 # sort the compile time defines (helps ensure that changes in this configure
6231 # script don't affect the QT_BUILD_KEY generation)
6232 if [ -f .options
]; then
6233 for opt
in `sort -f .options | uniq`; do
6234 BUILD_OPTIONS
="$BUILD_OPTIONS $opt"
6239 BUILD_OPTIONS
="$BUILD_CONFIG $BUILD_OPTIONS"
6240 # extract the operating system from the XPLATFORM
6241 TARGET_OPERATING_SYSTEM
=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
6243 # when cross-compiling, don't include build-host information (build key is target specific)
6244 QT_BUILD_KEY
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6245 if [ -n "$QT_NAMESPACE" ]; then
6246 QT_BUILD_KEY
="$QT_BUILD_KEY $QT_NAMESPACE"
6248 MAC_NEED_TWO_BUILD_KEYS
="no"
6249 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
6250 QT_BUILD_KEY_CARBON
=$QT_BUILD_KEY
6251 TARGET_OPERATING_SYSTEM
="$TARGET_OPERATING_SYSTEM-cocoa"
6252 QT_BUILD_KEY_COCOA
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6253 if [ "$CFG_MAC_CARBON" = "no" ]; then
6254 QT_BUILD_KEY
=$QT_BUILD_KEY_COCOA
6256 MAC_NEED_TWO_BUILD_KEYS
="yes"
6259 # don't break loading plugins build with an older version of Qt
6260 QT_BUILD_KEY_COMPAT
=
6261 if [ "$QT_CROSS_COMPILE" = "no" ]; then
6262 # previous versions of Qt used a build key built from the uname
6263 QT_BUILD_KEY_COMPAT
="$CFG_USER_BUILD_KEY $UNAME_MACHINE $UNAME_SYSTEM $COMPILER $BUILD_OPTIONS"
6264 if [ -n "$QT_NAMESPACE" ]; then
6265 QT_BUILD_KEY_COMPAT
="$QT_BUILD_KEY_COMPAT $QT_NAMESPACE"
6268 # strip out leading/trailing/extra whitespace
6269 QT_BUILD_KEY
=`echo $QT_BUILD_KEY | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6270 QT_BUILD_KEY_COMPAT
=`echo $QT_BUILD_KEY_COMPAT | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6272 #-------------------------------------------------------------------------------
6273 # part of configuration information goes into qconfig.h
6274 #-------------------------------------------------------------------------------
6276 case "$CFG_QCONFIG" in
6278 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6281 tmpconfig
="$outpath/src/corelib/global/qconfig.h.new"
6282 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6283 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6284 echo "#endif" >>"$tmpconfig"
6288 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6292 # define QT_EDITION $QT_EDITION
6295 /* Machine byte-order */
6296 #define Q_BIG_ENDIAN 4321
6297 #define Q_LITTLE_ENDIAN 1234
6300 if [ "$MAC_NEED_TWO_BUILD_KEYS" = "no" ]; then
6301 echo "#define QT_BUILD_KEY \"$QT_BUILD_KEY\"" \
6302 >> "$outpath/src/corelib/global/qconfig.h.new"
6304 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6306 #define QT_BUILD_KEY_CARBON "$QT_BUILD_KEY_CARBON"
6307 #define QT_BUILD_KEY_COCOA "$QT_BUILD_KEY_COCOA"
6311 if [ -n "$QT_BUILD_KEY_COMPAT" ]; then
6312 echo "#define QT_BUILD_KEY_COMPAT \"$QT_BUILD_KEY_COMPAT\"" \
6313 >> "$outpath/src/corelib/global/qconfig.h.new"
6315 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6317 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6318 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6319 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6320 #if defined(__BIG_ENDIAN__)
6321 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6322 #elif defined(__LITTLE_ENDIAN__)
6323 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6325 # error "Unable to determine byte order!"
6329 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6331 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6332 if [ "$CFG_ENDIAN" = "auto" ]; then
6333 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6334 #if defined(__BIG_ENDIAN__)
6335 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6336 #elif defined(__LITTLE_ENDIAN__)
6337 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6339 # error "Unable to determine byte order!"
6343 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6345 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6347 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6348 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6349 /* Non-IEEE double format */
6350 #define Q_DOUBLE_LITTLE "01234567"
6351 #define Q_DOUBLE_BIG "76543210"
6352 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6353 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6354 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6357 if [ "$CFG_ARMFPA" = "yes" ]; then
6358 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6359 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6360 #ifndef QT_BOOTSTRAPPED
6365 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6369 CFG_ARCH_STR
=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6370 CFG_HOST_ARCH_STR
=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6371 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6372 /* Machine Architecture */
6373 #ifndef QT_BOOTSTRAPPED
6374 # define QT_ARCH_${CFG_ARCH_STR}
6376 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6380 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6381 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6383 if [ "$CFG_LARGEFILE" = "yes" ]; then
6384 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6387 # if both carbon and cocoa are specified, enable the autodetection code.
6388 if [ "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
6389 echo "#define AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6390 elif [ "$CFG_MAC_COCOA" = "yes" ]; then
6391 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6394 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6395 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6398 if [ "$PLATFORM_MAC" = "yes" ]; then
6399 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6400 #if defined(__LP64__)
6401 # define QT_POINTER_SIZE 8
6403 # define QT_POINTER_SIZE 4
6407 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6408 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6412 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6414 if [ "$CFG_DEV" = "yes" ]; then
6415 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6418 # Embedded compile time options
6419 if [ "$PLATFORM_QWS" = "yes" ]; then
6420 # Add QWS to config.h
6421 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_WS_QWS"
6423 # Add excluded decorations to $QCONFIG_FLAGS
6424 decors
=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
6425 for decor
in $decors; do
6426 NODECORATION
=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6427 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
6430 # Figure which embedded drivers which are turned off
6431 CFG_GFX_OFF
="$CFG_GFX_AVAILABLE"
6432 for ADRIVER
in $CFG_GFX_ON; do
6433 CFG_GFX_OFF
=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
6436 CFG_KBD_OFF
="$CFG_KBD_AVAILABLE"
6437 # the um driver is currently not in the available list for external builds
6438 if [ "$CFG_DEV" = "no" ]; then
6439 CFG_KBD_OFF
="$CFG_KBD_OFF um"
6441 for ADRIVER
in $CFG_KBD_ON; do
6442 CFG_KBD_OFF
=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
6445 CFG_MOUSE_OFF
="$CFG_MOUSE_AVAILABLE"
6446 for ADRIVER
in $CFG_MOUSE_ON; do
6447 CFG_MOUSE_OFF
=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
6450 for DRIVER
in $CFG_GFX_OFF; do
6451 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6452 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
6455 for DRIVER
in $CFG_KBD_OFF; do
6456 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6457 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
6460 for DRIVER
in $CFG_MOUSE_OFF; do
6461 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6462 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
6466 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6467 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6470 # Add turned on SQL drivers
6471 for DRIVER
in $CFG_SQL_AVAILABLE; do
6472 eval "VAL=\$CFG_SQL_$DRIVER"
6475 ONDRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6476 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6477 SQL_DRIVERS
="$SQL_DRIVERS $DRIVER"
6480 SQL_PLUGINS
="$SQL_PLUGINS $DRIVER"
6486 QMakeVar
set sql-drivers
"$SQL_DRIVERS"
6487 QMakeVar
set sql-plugins
"$SQL_PLUGINS"
6489 # Add other configuration options to the qconfig.h file
6490 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6491 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
6492 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6493 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6494 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
6495 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ZLIB"
6496 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6497 [ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6"
6498 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SXE"
6499 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_DBUS"
6501 if [ "$PLATFORM_QWS" != "yes" ]; then
6502 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
6503 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
6506 # X11/Unix/Mac only configs
6507 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CUPS"
6508 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ICONV"
6509 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GLIB"
6510 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6511 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6512 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6513 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MREMAP"
6514 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6515 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6516 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6517 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_INOTIFY"
6518 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NAS"
6519 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NIS"
6520 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENSSL"
6521 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6523 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6524 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XCURSOR"
6525 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XFIXES"
6526 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6527 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINERAMA"
6528 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XKB"
6529 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRANDR"
6530 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRENDER"
6531 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MITSHM"
6532 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SHAPE"
6533 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6535 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6536 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6537 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6538 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6539 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6541 # sort QCONFIG_FLAGS for neatness if we can
6542 [ '!' -z "$AWK" ] && QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6543 QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS`
6545 if [ -n "$QCONFIG_FLAGS" ]; then
6546 for cfg
in $QCONFIG_FLAGS; do
6547 cfgd
=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6548 cfg
=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6549 # figure out define logic, so we can output the correct
6550 # ifdefs to override the global defines in a project
6552 if [ true
] && echo "$cfgd" |
grep 'QT_NO_' >/dev
/null
2>&1; then
6553 # QT_NO_option can be forcefully turned on by QT_option
6554 cfgdNeg
=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6555 elif [ true
] && echo "$cfgd" |
grep 'QT_' >/dev
/null
2>&1; then
6556 # QT_option can be forcefully turned off by QT_NO_option
6557 cfgdNeg
=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6560 if [ -z $cfgdNeg ]; then
6561 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6568 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6569 #if defined($cfgd) && defined($cfgdNeg)
6571 #elif !defined($cfgd) && !defined($cfgdNeg)
6580 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6581 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6582 #define QT_VISIBILITY_AVAILABLE
6587 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6588 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6589 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6591 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w
"$outpath/src/corelib/global/qconfig.h"
6592 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6593 chmod -w "$outpath/src/corelib/global/qconfig.h"
6594 for conf
in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
6595 if [ '!' -f "$conf" ]; then
6596 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
6601 #-------------------------------------------------------------------------------
6602 # save configuration into qconfig.pri
6603 #-------------------------------------------------------------------------------
6605 QTCONFIG
="$outpath/mkspecs/qconfig.pri"
6606 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG no_mocdepend"
6607 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6608 if [ "$CFG_DEBUG" = "yes" ]; then
6609 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG debug"
6610 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6611 QT_CONFIG
="$QT_CONFIG release"
6613 QT_CONFIG
="$QT_CONFIG debug"
6614 elif [ "$CFG_DEBUG" = "no" ]; then
6615 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG release"
6616 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6617 QT_CONFIG
="$QT_CONFIG debug"
6619 QT_CONFIG
="$QT_CONFIG release"
6621 if [ "$CFG_STL" = "yes" ]; then
6622 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG stl"
6624 if [ "$CFG_FRAMEWORK" = "no" ]; then
6625 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_no_framework"
6627 QT_CONFIG
="$QT_CONFIG qt_framework"
6628 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_framework"
6630 if [ "$PLATFORM_MAC" = "yes" ]; then
6631 QT_CONFIG
="$QT_CONFIG $CFG_MAC_ARCHS"
6634 # Make the application arch follow the Qt arch for single arch builds.
6635 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
6636 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
6637 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
6640 cat >>"$QTCONFIG.tmp" <<EOF
6642 CONFIG += $QTCONFIG_CONFIG
6644 QT_EDITION = $Edition
6645 QT_CONFIG += $QT_CONFIG
6648 QT_VERSION = $QT_VERSION
6649 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6650 QT_MINOR_VERSION = $QT_MINOR_VERSION
6651 QT_PATCH_VERSION = $QT_PATCH_VERSION
6654 QT_LIBINFIX = $QT_LIBINFIX
6655 QT_NAMESPACE = $QT_NAMESPACE
6656 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
6659 if [ "$CFG_RPATH" = "yes" ]; then
6660 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
6662 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6663 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6664 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6665 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6667 # replace qconfig.pri if it differs from the newly created temp file
6668 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6669 rm -f "$QTCONFIG.tmp"
6671 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6674 #-------------------------------------------------------------------------------
6675 # save configuration into .qmake.cache
6676 #-------------------------------------------------------------------------------
6678 CACHEFILE
="$outpath/.qmake.cache"
6679 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6680 cat >>"$CACHEFILE.tmp" <<EOF
6681 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
6682 QT_SOURCE_TREE = \$\$quote($relpath)
6683 QT_BUILD_TREE = \$\$quote($outpath)
6684 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6685 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
6686 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
6688 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6689 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
6690 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
6691 QMAKE_UIC3 = \$\$QT_BUILD_TREE/bin/uic3
6692 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
6693 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
6694 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6695 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6699 if [ -n "$QT_CFLAGS_PSQL" ]; then
6700 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp"
6702 if [ -n "$QT_LFLAGS_PSQL" ]; then
6703 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$CACHEFILE.tmp"
6705 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6706 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$CACHEFILE.tmp"
6708 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6709 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$CACHEFILE.tmp"
6711 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6712 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$CACHEFILE.tmp"
6714 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6715 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$CACHEFILE.tmp"
6717 if [ -n "$QT_LFLAGS_ODBC" ]; then
6718 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$CACHEFILE.tmp"
6721 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6722 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
6725 #dump in the OPENSSL_LIBS info
6726 if [ '!' -z "$OPENSSL_LIBS" ]; then
6727 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp"
6728 elif [ "$CFG_OPENSSL" = "linked" ]; then
6729 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$CACHEFILE.tmp"
6732 #dump in the SDK info
6733 if [ '!' -z "$CFG_SDK" ]; then
6734 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$CACHEFILE.tmp"
6737 # mac gcc -Xarch support
6738 if [ "$CFG_MAC_XARCH" = "no" ]; then
6739 echo "QMAKE_MAC_XARCH = no" >> "$CACHEFILE.tmp"
6742 #dump the qmake spec
6743 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6744 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6746 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6750 cat "$QMAKE_VARS_FILE" >> "$CACHEFILE.tmp"
6751 rm -f "$QMAKE_VARS_FILE" 2>/dev
/null
6755 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4
>/dev
/null
2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL
="yes"
6756 if [ "$CFG_INCREMENTAL" = "yes" ]; then
6757 find "$relpath" -perm u
+w
-mtime -3 |
grep 'cpp$' |
while read f
; do
6758 # don't need to worry about generated files
6759 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
6760 basename "$f" |
grep '^moc_' >/dev
/null
2>&1 && continue
6762 INCREMENTAL
="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
6764 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
6765 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
6768 # replace .qmake.cache if it differs from the newly created temp file
6769 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6770 rm -f "$CACHEFILE.tmp"
6772 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6775 #-------------------------------------------------------------------------------
6776 # give feedback on configuration
6777 #-------------------------------------------------------------------------------
6781 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6784 This target is using the GNU C++ compiler ($PLATFORM).
6786 Recent versions of this compiler automatically include code for
6787 exceptions, which increase both the size of the Qt libraries and
6788 the amount of memory taken by your applications.
6790 You may choose to re-run `basename $0` with the -no-exceptions
6791 option to compile Qt without exceptions. This is completely binary
6792 compatible, and existing applications will continue to work.
6800 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6803 This target is using the MIPSpro C++ compiler ($PLATFORM).
6805 You may choose to re-run `basename $0` with the -no-exceptions
6806 option to compile Qt without exceptions. This will make the
6807 size of the Qt library smaller and reduce the amount of memory
6808 taken by your applications.
6819 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" == "yes" ]; then
6821 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
6822 in debug mode will run out of memory on systems with 2GB or less.
6823 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
6824 -no-webkit or -release to skip webkit debug.
6829 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6830 echo "Build type: $PLATFORM"
6832 echo "Building on: $PLATFORM"
6833 echo "Building for: $XPLATFORM"
6836 if [ "$PLATFORM_MAC" = "yes" ]; then
6837 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
6839 echo "Architecture: $CFG_ARCH"
6842 if [ "$PLATFORM_QWS" = "yes" ]; then
6843 echo "Host architecture: $CFG_HOST_ARCH"
6846 if [ "$PLATFORM_MAC" = "yes" ]; then
6847 if [ "$CFG_MAC_COCOA" = "yes" ]; then
6848 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6849 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
6851 echo "Using framework: Cocoa"
6854 echo "Using framework: Carbon"
6858 if [ -n "$PLATFORM_NOTES" ]; then
6859 echo "Platform notes:"
6860 echo "$PLATFORM_NOTES"
6865 if [ "$OPT_VERBOSE" = "yes" ]; then
6866 if echo '\c' |
grep '\c' >/dev
/null
; then
6867 echo -n "qmake vars .......... "
6869 echo "qmake vars .......... \c"
6871 cat "$QMAKE_VARS_FILE" |
tr '\n' ' '
6872 echo "qmake switches ...... $QMAKE_SWITCHES"
6875 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ......... $INCREMENTAL"
6876 echo "Build ............... $CFG_BUILD_PARTS"
6877 echo "Configuration ....... $QMAKE_CONFIG $QT_CONFIG"
6878 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6879 echo "Debug ............... yes (combined)"
6880 if [ "$CFG_DEBUG" = "yes" ]; then
6881 echo "Default Link ........ debug"
6883 echo "Default Link ........ release"
6886 echo "Debug ............... $CFG_DEBUG"
6888 echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
6889 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
6890 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
6891 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
6892 echo "QtScriptTools module $CFG_SCRIPTTOOLS"
6893 echo "QtXmlPatterns module $CFG_XMLPATTERNS"
6894 echo "Phonon module ....... $CFG_PHONON"
6895 echo "SVG module .......... $CFG_SVG"
6896 echo "WebKit module ....... $CFG_WEBKIT"
6897 echo "STL support ......... $CFG_STL"
6898 echo "PCH support ......... $CFG_PRECOMPILE"
6899 echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
6900 if [ "${CFG_ARCH}" = "arm" ]; then
6901 echo "iWMMXt support ...... ${CFG_IWMMXT}"
6903 [ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
6904 echo "IPv6 support ........ $CFG_IPV6"
6905 echo "IPv6 ifname support . $CFG_IPV6IFNAME"
6906 echo "getaddrinfo support . $CFG_GETADDRINFO"
6907 echo "getifaddrs support .. $CFG_GETIFADDRS"
6908 echo "Accessibility ....... $CFG_ACCESSIBILITY"
6909 echo "NIS support ......... $CFG_NIS"
6910 echo "CUPS support ........ $CFG_CUPS"
6911 echo "Iconv support ....... $CFG_ICONV"
6912 echo "Glib support ........ $CFG_GLIB"
6913 echo "GStreamer support ... $CFG_GSTREAMER"
6914 echo "Large File support .. $CFG_LARGEFILE"
6915 echo "GIF support ......... $CFG_GIF"
6916 if [ "$CFG_TIFF" = "no" ]; then
6917 echo "TIFF support ........ $CFG_TIFF"
6919 echo "TIFF support ........ $CFG_TIFF ($CFG_LIBTIFF)"
6921 if [ "$CFG_JPEG" = "no" ]; then
6922 echo "JPEG support ........ $CFG_JPEG"
6924 echo "JPEG support ........ $CFG_JPEG ($CFG_LIBJPEG)"
6926 if [ "$CFG_PNG" = "no" ]; then
6927 echo "PNG support ......... $CFG_PNG"
6929 echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
6931 if [ "$CFG_MNG" = "no" ]; then
6932 echo "MNG support ......... $CFG_MNG"
6934 echo "MNG support ......... $CFG_MNG ($CFG_LIBMNG)"
6936 echo "zlib support ........ $CFG_ZLIB"
6937 echo "Session management .. $CFG_SM"
6938 if [ "$PLATFORM_QWS" = "yes" ]; then
6939 echo "Embedded support .... $CFG_EMBEDDED"
6940 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
6941 echo "Freetype2 support ... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
6943 echo "Freetype2 support ... $CFG_QWS_FREETYPE"
6945 # Normalize the decoration output first
6946 CFG_GFX_ON
=`echo ${CFG_GFX_ON}`
6947 CFG_GFX_PLUGIN
=`echo ${CFG_GFX_PLUGIN}`
6948 echo "Graphics (qt) ....... ${CFG_GFX_ON}"
6949 echo "Graphics (plugin) ... ${CFG_GFX_PLUGIN}"
6950 CFG_DECORATION_ON
=`echo ${CFG_DECORATION_ON}`
6951 CFG_DECORATION_PLUGIN
=`echo ${CFG_DECORATION_PLUGIN}`
6952 echo "Decorations (qt) .... $CFG_DECORATION_ON"
6953 echo "Decorations (plugin) $CFG_DECORATION_PLUGIN"
6954 CFG_KBD_ON
=`echo ${CFG_KBD_ON}`
6955 CFG_KBD_PLUGIN
=`echo ${CFG_KBD_PLUGIN}`
6956 echo "Keyboard driver (qt). ${CFG_KBD_ON}"
6957 echo "Keyboard driver (plugin) ${CFG_KBD_PLUGIN}"
6958 CFG_MOUSE_ON
=`echo ${CFG_MOUSE_ON}`
6959 CFG_MOUSE_PLUGIN
=`echo ${CFG_MOUSE_PLUGIN}`
6960 echo "Mouse driver (qt) ... $CFG_MOUSE_ON"
6961 echo "Mouse driver (plugin) $CFG_MOUSE_PLUGIN"
6963 if [ "$CFG_OPENGL" = "desktop" ]; then
6964 echo "OpenGL support ...... yes (Desktop OpenGL)"
6965 elif [ "$CFG_OPENGL" = "es1" ]; then
6966 echo "OpenGL support ...... yes (OpenGL ES 1.x Common profile)"
6967 elif [ "$CFG_OPENGL" = "es1cl" ]; then
6968 echo "OpenGL support ...... yes (OpenGL ES 1.x Common Lite profile)"
6969 elif [ "$CFG_OPENGL" = "es2" ]; then
6970 echo "OpenGL support ...... yes (OpenGL ES 2.x)"
6972 echo "OpenGL support ...... no"
6974 if [ "$PLATFORM_X11" = "yes" ]; then
6975 echo "NAS sound support ... $CFG_NAS"
6976 echo "XShape support ...... $CFG_XSHAPE"
6977 echo "Xinerama support .... $CFG_XINERAMA"
6978 echo "Xcursor support ..... $CFG_XCURSOR"
6979 echo "Xfixes support ...... $CFG_XFIXES"
6980 echo "Xrandr support ...... $CFG_XRANDR"
6981 echo "Xrender support ..... $CFG_XRENDER"
6982 echo "Xi support .......... $CFG_XINPUT"
6983 echo "MIT-SHM support ..... $CFG_MITSHM"
6984 echo "FontConfig support .. $CFG_FONTCONFIG"
6985 echo "XKB Support ......... $CFG_XKB"
6986 echo "immodule support .... $CFG_IM"
6987 echo "GTK theme support ... $CFG_QGTKSTYLE"
6989 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support ....... $CFG_SQL_mysql"
6990 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support .. $CFG_SQL_psql"
6991 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........ $CFG_SQL_odbc"
6992 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ......... $CFG_SQL_oci"
6993 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ......... $CFG_SQL_tds"
6994 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ......... $CFG_SQL_db2"
6995 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ... $CFG_SQL_ibase"
6996 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support .... $CFG_SQL_sqlite2"
6997 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ...... $CFG_SQL_sqlite ($CFG_SQLITE)"
7000 if [ "$CFG_OPENSSL" = "yes" ]; then
7001 OPENSSL_LINKAGE
="(run-time)"
7002 elif [ "$CFG_OPENSSL" = "linked" ]; then
7003 OPENSSL_LINKAGE
="(linked)"
7005 echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
7007 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
7009 # complain about not being able to use dynamic plugins if we are using a static build
7010 if [ "$CFG_SHARED" = "no" ]; then
7012 echo "WARNING: Using static linking will disable the use of dynamically"
7013 echo "loaded plugins. Make sure to import all needed static plugins,"
7014 echo "or compile needed modules into the library."
7017 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7019 echo "NOTE: When linking against OpenSSL, you can override the default"
7020 echo "library names through OPENSSL_LIBS."
7022 echo " ./configure -openssl-linked OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto'"
7025 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7027 echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
7032 sepath
=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7037 #-------------------------------------------------------------------------------
7038 # build makefiles based on the configuration
7039 #-------------------------------------------------------------------------------
7041 echo "Finding project files. Please wait..."
7042 "$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
7043 if [ -f "${relpath}/projects.pro" ]; then
7044 mkfile
="${outpath}/Makefile"
7045 [ -f "$mkfile" ] && chmod +w
"$mkfile"
7046 QTDIR
="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro" -o "$mkfile"
7049 # .projects -> projects to process
7050 # .projects.1 -> qt and moc
7051 # .projects.2 -> subdirs and libs
7052 # .projects.3 -> the rest
7053 rm -f .projects .projects
.1 .projects
.2 .projects
.3
7055 QMAKE_PROJECTS
=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7056 if [ -z "$AWK" ]; then
7057 for p
in `echo $QMAKE_PROJECTS`; do
7058 echo "$p" >> .projects
7061 cat >projects.
awk <<EOF
7067 first = "./.projects.1.tmp"
7068 second = "./.projects.2.tmp"
7069 third = "./.projects.3.tmp"
7074 if ( ! target_file )
7076 print input_file >target_file
7081 input_file = FILENAME
7086 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7092 matched_target == 0 && /^(TEMPLATE.*=)/ {
7093 if ( \$3 == "subdirs" )
7094 target_file = second
7095 else if ( \$3 == "lib" )
7101 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7102 if ( \$0 ~ /plugin/ )
7105 target_file = second
7110 if ( ! target_file )
7112 print input_file >>target_file
7119 for p
in `echo $QMAKE_PROJECTS`; do
7120 echo "$p" >> .projects.all
7123 # if you get errors about the length of the command line to awk, change the -l arg
7125 split -l 100 .projects.all .projects.all.
7126 for p
in .projects.all.
*; do
7127 "$AWK" -f projects.
awk `cat $p`
7128 [ -f .projects
.1.tmp
] && cat .projects
.1.tmp
>> .projects
.1
7129 [ -f .projects
.2.tmp
] && cat .projects
.2.tmp
>> .projects
.2
7130 [ -f .projects
.3.tmp
] && cat .projects
.3.tmp
>> .projects
.3
7131 rm -f .projects
.1.tmp .projects
.2.tmp .projects
.3.tmp
$p
7133 rm -f .projects.all
* projects.
awk
7135 [ -f .projects
.1 ] && cat .projects
.1 >>.projects
7136 [ -f .projects
.2 ] && cat .projects
.2 >>.projects
7137 rm -f .projects
.1 .projects
.2
7138 if [ -f .projects
.3 ] && [ "$OPT_FAST" = "no" ]; then
7139 cat .projects
.3 >>.projects
7143 # don't sort Qt and MOC in with the other project files
7144 # also work around a segfaulting uniq(1)
7145 if [ -f .sorted.projects
.2 ]; then
7146 sort .sorted.projects
.2 > .sorted.projects
.2.new
7147 mv -f .sorted.projects
.2.new .sorted.projects
.2
7148 cat .sorted.projects
.2 >> .sorted.projects
.1
7150 [ -f .sorted.projects
.1 ] && sort .sorted.projects
.1 >> .sorted.projects
7151 rm -f .sorted.projects
.2 .sorted.projects
.1
7155 if [ -f .projects
]; then
7156 uniq .projects
>.tmp
7157 mv -f .tmp .projects
7158 NORM_PROJECTS
=`cat .projects | wc -l | sed -e "s, ,,g"`
7160 if [ -f .projects
.3 ]; then
7161 uniq .projects
.3 >.tmp
7162 mv -f .tmp .projects
.3
7163 FAST_PROJECTS
=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7165 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7169 for part
in $CFG_BUILD_PARTS; do
7171 tools
) PART_ROOTS
="$PART_ROOTS tools" ;;
7172 libs
) PART_ROOTS
="$PART_ROOTS src" ;;
7173 examples
) PART_ROOTS
="$PART_ROOTS examples demos" ;;
7178 if [ "$CFG_DEV" = "yes" ]; then
7179 PART_ROOTS
="$PART_ROOTS tests"
7182 echo "Creating makefiles. Please wait..."
7183 for file in .projects .projects
.3; do
7184 [ '!' -f "$file" ] && continue
7185 for a
in `cat $file`; do
7187 for r
in $PART_ROOTS; do
7188 if echo "$a" |
grep "^$r" >/dev
/null
2>&1 ||
echo "$a" |
grep "^$relpath/$r" >/dev
/null
2>&1; then
7193 [ "$IN_ROOT" = "no" ] && continue
7196 *winmain
/winmain.pro
) continue ;;
7197 */qmake
/qmake.pro
) continue ;;
7198 *tools
/bootstrap
*|
*tools
/moc
*|
*tools
/rcc
*|
*tools
/uic
*) SPEC
=$QMAKESPEC ;;
7199 *) SPEC
=$XQMAKESPEC ;;
7201 dir
=`dirname "$a" | sed -e "s;$sepath;.;g"`
7202 test -d "$dir" || mkdir
-p "$dir"
7203 OUTDIR
="$outpath/$dir"
7204 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7205 # fast configure - the makefile exists, skip it
7206 # since the makefile exists, it was generated by qmake, which means we
7207 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7209 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7212 QMAKE_SPEC_ARGS
="-spec $SPEC"
7213 if echo '\c' |
grep '\c' >/dev
/null
; then
7219 QMAKE
="$outpath/bin/qmake"
7220 QMAKE_ARGS
="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7221 if [ "$file" = ".projects.3" ]; then
7222 if echo '\c' |
grep '\c' >/dev
/null
; then
7229 cat >"${OUTDIR}/Makefile" <<EOF
7230 # ${OUTDIR}/Makefile: generated by configure
7232 # WARNING: This makefile will be replaced with a real makefile.
7233 # All changes made to this file will be lost.
7235 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7237 cat >>"${OUTDIR}/Makefile" <<EOF
7239 all clean install qmake first Makefile: FORCE
7240 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7248 if [ "$OPT_VERBOSE" = "yes" ]; then
7249 echo " (`basename $SPEC`)"
7250 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7255 [ -f "${OUTDIR}/Makefile" ] && chmod +w
"${OUTDIR}/Makefile"
7256 QTDIR
="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7260 rm -f .projects .projects
.3
7262 #-------------------------------------------------------------------------------
7263 # XShape is important, DnD in the Designer doens't work without it
7264 #-------------------------------------------------------------------------------
7265 if [ "$PLATFORM_X11" = "yes" ] && [ "$CFG_XSHAPE" = "no" ]; then
7268 NOTICE: Qt will not be built with XShape support.
7270 As a result, drag-and-drop in the Qt Designer will NOT
7271 work. We recommend that you enable XShape support by passing
7272 the -xshape switch to $0.
7276 #-------------------------------------------------------------------------------
7277 # check for platforms that we don't yet know about
7278 #-------------------------------------------------------------------------------
7279 if [ "$CFG_ARCH" = "generic" ]; then
7282 NOTICE: Atomic operations are not yet supported for this
7285 Qt will use the 'generic' architecture instead, which uses a
7286 single pthread_mutex_t to protect all atomic operations. This
7287 implementation is the slow (but safe) fallback implementation
7288 for architectures Qt does not yet support.
7292 #-------------------------------------------------------------------------------
7293 # check if the user passed the -no-zlib option, which is no longer supported
7294 #-------------------------------------------------------------------------------
7295 if [ -n "$ZLIB_FORCED" ]; then
7296 which_zlib
="supplied"
7297 if [ "$CFG_ZLIB" = "system" ]; then
7303 NOTICE: The -no-zlib option was supplied but is no longer
7306 Qt now requires zlib support in all builds, so the -no-zlib
7307 option was ignored. Qt will be built using the $which_zlib
7312 #-------------------------------------------------------------------------------
7313 # finally save the executed command to another script
7314 #-------------------------------------------------------------------------------
7315 if [ `basename $0` != "config.status" ]; then
7316 CONFIG_STATUS
="$relpath/$relconf $OPT_CMDLINE"
7318 # add the system variables
7319 for varname
in $SYSTEM_VARIABLES; do
7321 'if [ -n "\$'${varname}'" ]; then
7322 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7327 echo "$CONFIG_STATUS" |
grep '\-confirm\-license' >/dev
/null
2>&1 || CONFIG_STATUS
="$CONFIG_STATUS -confirm-license"
7329 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7330 echo "#!/bin/sh" > "$outpath/config.status"
7331 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7332 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7333 echo "else" >> "$outpath/config.status"
7334 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7335 echo "fi" >> "$outpath/config.status"
7336 chmod +x
"$outpath/config.status"
7339 if [ -n "$RPATH_MESSAGE" ]; then
7341 echo "$RPATH_MESSAGE"
7344 MAKE
=`basename "$MAKE"`
7346 echo Qt is now configured
for building. Just run
\'$MAKE\'.
7347 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7348 echo Once everything is built
, Qt is installed.
7349 echo You should not run
\'$MAKE install\'.
7351 echo Once everything is built
, you must run
\'$MAKE install\'.
7352 echo Qt will be installed into
$QT_INSTALL_PREFIX
7355 echo To reconfigure
, run
\'$MAKE confclean
\' and
\'configure
\'.