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
125 #-----------------------------------------------------------------------------
126 # Qt version detection
127 #-----------------------------------------------------------------------------
128 QT_VERSION
=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
132 if [ -n "$QT_VERSION" ]; then
133 QT_VERSION
=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
134 MAJOR
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
135 if [ -n "$MAJOR" ]; then
136 MINOR
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
137 PATCH
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
138 QT_MAJOR_VERSION
="$MAJOR"
139 [ -z "$MINOR" ] || QT_MINOR_VERSION
="$MINOR"
140 [ -z "$PATCH" ] || QT_PATCH_VERSION
="$PATCH"
143 if [ -z "$QT_MAJOR_VERSION" ]; then
144 echo "Cannot process version from qglobal.h: $QT_VERSION"
145 echo "Cannot proceed."
149 QT_PACKAGEDATE
=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
150 if [ -z "$QT_PACKAGEDATE" ]; then
151 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
152 echo "Cannot proceed"
156 #-------------------------------------------------------------------------------
158 #-------------------------------------------------------------------------------
163 EditionString
=Commercial
167 # parse the arguments, setting things to "yes" or "no"
168 while [ "$#" -gt 0 ]; do
172 #Autoconf style options
174 VAR
=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
178 VAR
=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
182 VAR
=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
183 VAL
=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
186 VAR
=`echo $1 | sed "s,^--no-\(.*\),\1,"`
191 # this option may or may not be followed by an argument
192 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
200 if [ "$VAL" = "yes" ]; then
202 COMMERCIAL_USER
="yes" #doesn't matter we will display the help
205 COMMERCIAL_USER
="yes" #doesn't matter we will display the help
209 VAR
=`echo $1 | sed "s,^--\(.*\),\1,"`
213 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
220 if [ "$UNKNOWN_ARG" = "yes" ]; then
230 if [ "$PLATFORM_QWS" != "no" ]; then
231 if [ "$PLATFORM_QWS" = "maybe" ]; then
237 echo "No license exists to enable Qt for Embedded Linux. Disabling."
250 COMMERCIAL_USER
="yes"
264 if [ "$COMMERCIAL_USER" = "ask" ]; then
266 echo "Which edition of Qt do you want to use ?"
268 echo "Type 'c' if you want to use the Commercial Edition."
269 echo "Type 'o' if you want to use the Open Source Edition."
273 if [ "$commercial" = "c" ]; then
274 COMMERCIAL_USER
="yes"
276 else [ "$commercial" = "o" ];
283 if [ "$CFG_NOKIA" = "yes" ]; then
285 Edition
="NokiaInternalBuild"
286 EditionString
="Nokia Internal Build"
287 QT_EDITION
="QT_EDITION_OPENSOURCE"
288 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
289 elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL
] && [ $COMMERCIAL_USER = "yes" ]; then
290 # Commercial preview release
291 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
294 QT_EDITION
="QT_EDITION_DESKTOP"
295 LicenseType
="Technology Preview"
296 elif [ $COMMERCIAL_USER = "yes" ]; then
297 # one of commercial editions
298 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
299 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS
=yes
301 # read in the license file
302 if [ -f "$LICENSE_FILE" ]; then
303 .
"$LICENSE_FILE" >/dev
/null
2>&1
304 if [ -z "$LicenseKeyExt" ]; then
306 echo "You are using an old license file."
308 echo "Please install the license file supplied by Qt Software,"
309 echo "or install the Qt Open Source Edition if you intend to"
310 echo "develop free software."
313 if [ -z "$Licensee" ]; then
315 echo "Invalid license key. Please check the license key."
319 if [ -z "$LicenseKeyExt" ]; then
321 if echo '\c' |
grep '\c' >/dev
/null
; then
322 echo -n "Please enter your license key: "
324 echo "Please enter your license key: \c"
327 Licensee
="Unknown user"
332 echo "$LicenseKeyExt" |
grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev
/null
2>&1 \
333 && LicenseValid
="yes" \
335 if [ "$LicenseValid" != "yes" ]; then
337 echo "Invalid license key. Please check the license key."
340 ProductCode
=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
341 PlatformCode
=`echo $LicenseKeyExt | cut -f 2 -d - | cut -b 1`
342 LicenseTypeCode
=`echo $LicenseKeyExt | cut -f 3 -d -`
343 LicenseFeatureCode
=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
345 # determine which edition we are licensed to use
346 case "$LicenseTypeCode" in
348 LicenseType
="Commercial"
352 QT_EDITION
="QT_EDITION_UNIVERSAL"
355 Edition
="FullFramework"
356 EditionString
="Full Framework"
357 QT_EDITION
="QT_EDITION_DESKTOP"
360 Edition
="GUIFramework"
361 EditionString
="GUI Framework"
362 QT_EDITION
="QT_EDITION_DESKTOPLIGHT"
367 LicenseType
="Evaluation"
371 QT_EDITION
="QT_EDITION_EVALUATION"
376 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
378 echo "Invalid license key. Please check the license key."
382 # verify that we are licensed to use Qt on this platform
384 if [ "$PlatformCode" = "X" ]; then
386 LICENSE_EXTENSION
="-ALLOS"
387 elif [ "$PLATFORM_QWS" = "yes" ]; then
388 case $PlatformCode in
389 2|
4|
8|A|B|E|G|J|K|P|Q|S|U|V|W
)
390 # Qt for Embedded Linux
391 LICENSE_EXTENSION
="-EMBEDDED"
395 echo "You are not licensed for Qt for Embedded Linux."
397 echo "Please contact sales@trolltech.com to upgrade your license"
398 echo "to include Qt for Embedded Linux, or install the"
399 echo "Qt Open Source Edition if you intend to develop free software."
403 elif [ "$PLATFORM_MAC" = "yes" ]; then
404 case $PlatformCode in
405 2|
4|
5|
7|
9|B|C|E|F|G|L|M|U|W|Y
)
407 LICENSE_EXTENSION
="-DESKTOP"
409 3|
6|
8|A|D|H|J|K|P|Q|S|V
)
411 LICENSE_EXTENSION
="-EMBEDDED"
415 echo "You are not licensed for the Qt/Mac platform."
417 echo "Please contact sales@trolltech.com to upgrade your license"
418 echo "to include the Qt/Mac platform."
423 case $PlatformCode in
424 2|
3|
4|
5|
7|D|E|F|J|M|Q|S|T|V|Z
)
426 LICENSE_EXTENSION
="-DESKTOP"
428 6|
8|
9|A|B|C|G|H|K|P|U|W
)
430 LICENSE_EXTENSION
="-EMBEDDED"
434 echo "You are not licensed for the Qt/X11 platform."
436 echo "Please contact sales@trolltech.com to upgrade your license to"
437 echo "include the Qt/X11 platform, or install the Qt Open Source Edition"
438 echo "if you intend to develop free software."
444 if test -r "$relpath/.LICENSE"; then
445 # Generic, non-final license
447 line
=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
452 *TECHNOLOGY?PREVIEW
*)
459 echo >&2 "Invalid license files; cannot continue"
464 EditionString
="$Edition"
465 QT_EDITION
="QT_EDITION_DESKTOP"
468 case "$LicenseFeatureCode" in
471 case "$LicenseType" in
473 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
476 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
482 case "$LicenseType" in
484 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
487 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
493 echo "Invalid license key. Please check the license key."
497 if [ '!' -f "$outpath/LICENSE" ]; then
498 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
499 echo "this software has disappeared."
501 echo "Sorry, you are not licensed to use this software."
502 echo "Try re-installing."
506 elif [ $COMMERCIAL_USER = "no" ]; then
507 # Open Source edition - may only be used under the terms of the GPL or LGPL.
508 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
509 Licensee
="Open Source"
511 EditionString
="Open Source"
512 QT_EDITION
="QT_EDITION_OPENSOURCE"
515 #-------------------------------------------------------------------------------
516 # initalize variables
517 #-------------------------------------------------------------------------------
519 SYSTEM_VARIABLES
="CC CXX CFLAGS CXXFLAGS LDFLAGS"
520 for varname
in $SYSTEM_VARIABLES; do
521 qmakevarname
="${varname}"
522 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
523 if [ "${varname}" = "LDFLAGS" ]; then
524 qmakevarname
="LFLAGS"
527 'if [ -n "\$'${varname}'" ]; then
528 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
532 # Use CC/CXX to run config.tests
533 mkdir
-p "$outpath/config.tests"
534 rm -f "$outpath/config.tests/.qmake.cache"
535 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
537 QMakeVar add styles
"cde mac motif plastique cleanlooks windows"
538 QMakeVar add decorations
"default windows styled"
539 QMakeVar add gfx-drivers
"linuxfb"
540 QMakeVar add kbd-drivers
"tty"
541 QMakeVar add mouse-drivers
"pc linuxtp"
543 if [ "$CFG_DEV" = "yes" ]; then
544 QMakeVar add kbd-drivers
"um"
547 # QTDIR may be set and point to an old or system-wide Qt installation
550 # the minimum version of libdbus-1 that we require:
551 MIN_DBUS_1_VERSION
=0.62
553 # initalize internal variables
554 CFG_CONFIGURE_EXIT_ON_ERROR
=yes
556 CFG_EXCEPTIONS
=unspecified
557 CFG_SCRIPTTOOLS
=auto
# (yes|no|auto)
558 CFG_XMLPATTERNS
=auto
# (yes|no|auto)
587 CFG_QWS_FREETYPE
=auto
590 QT_DEFAULT_BUILD_PARTS
="libs tools examples demos docs translations"
595 CFG_PHONON_BACKEND
=yes
597 CFG_WEBKIT
=auto
# (yes|no|auto)
599 CFG_GFX_AVAILABLE
="linuxfb transformed qvfb vnc multiscreen"
600 CFG_GFX_ON
="linuxfb multiscreen"
601 CFG_GFX_PLUGIN_AVAILABLE
=
604 CFG_KBD_AVAILABLE
="tty usb sl5000 yopy vr41xx qvfb"
605 CFG_KBD_ON
="tty" #default, see QMakeVar above
606 CFG_MOUSE_AVAILABLE
="pc bus linuxtp yopy vr41xx tslib qvfb"
607 CFG_MOUSE_ON
="pc linuxtp" #default, see QMakeVar above
611 CFG_KBD_PLUGIN_AVAILABLE
=
614 CFG_MOUSE_PLUGIN_AVAILABLE
=
619 CFG_DECORATION_AVAILABLE
="styled windows default"
620 CFG_DECORATION_ON
="${CFG_DECORATION_AVAILABLE}" # all on by default
621 CFG_DECORATION_PLUGIN_AVAILABLE
=
622 CFG_DECORATION_PLUGIN
=
637 CFG_SEPARATE_DEBUG_INFO
=auto
638 CFG_REDUCE_EXPORTS
=auto
643 CFG_REDUCE_RELOCATIONS
=no
648 CFG_ACCESSIBILITY
=auto
652 CFG_DOUBLEFORMAT
=auto
655 CFG_CLOCK_GETTIME
=auto
656 CFG_CLOCK_MONOTONIC
=auto
669 COMMANDLINE_MAC_COCOA
=no
671 CFG_PREFIX_INSTALL
=yes
679 XPLATFORM
= # This seems to be the QMAKESPEC, like "linux-g++"
682 OPT_CONFIRM_LICENSE
=no
688 CFG_GRAPHICS_SYSTEM
=default
690 # initalize variables used for installation
698 QT_INSTALL_TRANSLATIONS
=
704 #flags for SQL drivers
713 # flags for libdbus-1
717 # flags for Glib (X11 only)
721 # flags for GStreamer (X11 only)
725 #-------------------------------------------------------------------------------
726 # check SQL drivers, mouse drivers and decorations available in this package
727 #-------------------------------------------------------------------------------
729 # opensource version removes some drivers, so force them to be off
735 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
736 for a
in "$relpath/src/plugins/sqldrivers/"*; do
739 CFG_SQL_AVAILABLE
="${CFG_SQL_AVAILABLE} ${base_a}"
740 eval "CFG_SQL_${base_a}=auto"
745 CFG_DECORATION_PLUGIN_AVAILABLE
=
746 if [ -d "$relpath/src/plugins/decorations" ]; then
747 for a
in "$relpath/src/plugins/decorations/"*; do
750 CFG_DECORATION_PLUGIN_AVAILABLE
="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
755 CFG_KBD_PLUGIN_AVAILABLE
=
756 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
757 for a
in "$relpath/src/plugins/kbddrivers/"*; do
760 CFG_KBD_PLUGIN_AVAILABLE
="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
765 CFG_MOUSE_PLUGIN_AVAILABLE
=
766 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
767 for a
in "$relpath/src/plugins/mousedrivers/"*; do
770 CFG_MOUSE_PLUGIN_AVAILABLE
="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
775 CFG_GFX_PLUGIN_AVAILABLE
=
776 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
777 for a
in "$relpath/src/plugins/gfxdrivers/"*; do
780 CFG_GFX_PLUGIN_AVAILABLE
="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
783 CFG_GFX_OFF
="$CFG_GFX_AVAILABLE" # assume all off
786 #-------------------------------------------------------------------------------
787 # parse command line arguments
788 #-------------------------------------------------------------------------------
790 # parse the arguments, setting things to "yes" or "no"
791 while [ "$#" -gt 0 ]; do
795 #Autoconf style options
797 VAR
=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
801 VAR
=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
805 VAR
=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
806 VAL
=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
809 VAR
=`echo $1 | sed "s,^--no-\(.*\),\1,"`
813 VAR
=`echo $1 | sed "s,^--\(.*\),\1,"`
817 -no-*-*|
-plugin-*-*|
-qt-*-*)
818 VAR
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
819 VAL
=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
823 VAR
=`echo $1 | sed "s,^-no-\(.*\),\1,"`
826 #Qt style yes options
827 -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)
828 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
831 #Qt style options that pass an argument
833 if [ "$PLATFORM_QWS" = "yes" ]; then
835 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
842 -prefix|
-docdir|
-headerdir|
-plugindir|
-datadir|
-libdir|
-bindir|
-translationdir|
-sysconfdir|
-examplesdir|
-demosdir|
-depths|
-make|
-nomake|
-platform|
-xplatform|
-buildkey|
-sdk|
-arch|
-host-arch|
-mysql_config)
843 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
847 #Qt style complex options in one command
848 -enable-*|
-disable-*)
849 VAR
=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
850 VAL
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
852 #Qt Builtin/System style options
853 -no-*|
-system-*|
-qt-*)
854 VAR
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
855 VAL
=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
857 #Options that cannot be generalized
864 # this option may or may not be followed by an argument
865 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
874 # this option may or may not be followed by an argument
875 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
883 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
884 # this option may or may not be followed by an argument
885 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
894 VAL
=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
898 VAL
=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
917 if [ "$1" = "-D" ]; then
921 VAL
=`echo $1 | sed 's,-D,,'`
926 if [ "$1" = "-I" ]; then
930 VAL
=`echo $1 | sed 's,-I,,'`
935 if [ "$1" = "-L" ]; then
939 VAL
=`echo $1 | sed 's,-L,,'`
944 if [ "$1" = "-R" ]; then
948 VAL
=`echo $1 | sed 's,-R,,'`
953 VAL
=`echo $1 | sed 's,-l,,'`
957 if [ "$1" = "-F" ]; then
961 VAL
=`echo $1 | sed 's,-F,,'`
966 if [ "$1" = "-fw" ]; then
970 VAL
=`echo $1 | sed 's,-fw,,'`
974 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
981 if [ "$UNKNOWN_ARG" = "yes" ]; then
982 echo "$1: unknown argument"
993 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
994 CFG_QT3SUPPORT
="$VAL"
1000 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1001 CFG_ACCESSIBILITY
="$VAL"
1010 CFG_USE_GNUMAKE
="$VAL"
1013 CFG_MYSQL_CONFIG
="$VAL"
1016 QT_INSTALL_PREFIX
="$VAL"
1019 QT_HOST_PREFIX
="$VAL"
1022 QT_FORCE_PKGCONFIG
=yes
1025 QT_INSTALL_DOCS
="$VAL"
1028 QT_INSTALL_HEADERS
="$VAL"
1031 QT_INSTALL_PLUGINS
="$VAL"
1034 QT_INSTALL_DATA
="$VAL"
1037 QT_INSTALL_LIBS
="$VAL"
1046 QT_INSTALL_TRANSLATIONS
="$VAL"
1048 sysconfdir|settingsdir
)
1049 QT_INSTALL_SETTINGS
="$VAL"
1052 QT_INSTALL_EXAMPLES
="$VAL"
1055 QT_INSTALL_DEMOS
="$VAL"
1061 QT_INSTALL_BINS
="$VAL"
1064 CFG_USER_BUILD_KEY
="$VAL"
1071 if [ "$PLATFORM_QWS" != "no" ]; then
1072 if [ "$PLATFORM_QWS" = "maybe" ]; then
1078 echo "No license exists to enable Qt for Embedded Linux. Disabling."
1083 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1090 if [ "$VAL" = "little" ]; then
1091 CFG_ENDIAN
="Q_LITTLE_ENDIAN"
1092 elif [ "$VAL" = "big" ]; then
1093 CFG_ENDIAN
="Q_BIG_ENDIAN"
1099 if [ "$VAL" = "little" ]; then
1100 CFG_HOST_ENDIAN
="Q_LITTLE_ENDIAN"
1101 elif [ "$VAL" = "big" ]; then
1102 CFG_HOST_ENDIAN
="Q_BIG_ENDIAN"
1108 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1115 CFG_QWS_DEPTHS
="$VAL"
1118 if [ "$VAL" = "auto" ] ||
[ "$VAL" = "desktop" ] ||
1119 [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
1120 [ "$VAL" = "es1cl" ] ||
[ "$VAL" = "es1" ] ||
[ "$VAL" = "es2" ]; then
1127 if [ "$PLATFORM_QWS" = "yes" ]; then
1128 echo "Error: Graphics System plugins are not supported on QWS."
1129 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1130 echo " rather than existing as a separate plugin."
1134 if [ "$VAL" = "opengl" ]; then
1135 CFG_GRAPHICS_SYSTEM
="opengl"
1136 elif [ "$VAL" = "raster" ]; then
1137 CFG_GRAPHICS_SYSTEM
="raster"
1144 qvfb
) # left for commandline compatibility, not documented
1145 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1146 if [ "$VAL" = "yes" ]; then
1147 QMakeVar add gfx-drivers qvfb
1148 QMakeVar add kbd-drivers qvfb
1149 QMakeVar add mouse-drivers qvfb
1150 CFG_GFX_ON
="$CFG_GFX_ON qvfb"
1151 CFG_KBD_ON
="$CFG_KBD_ON qvfb"
1152 CFG_MOUSE_ON
="$CFG_MOUSE_ON qvfb"
1159 CFG_NOBUILD_PARTS
="$CFG_NOBUILD_PARTS $VAL"
1162 CFG_BUILD_PARTS
="$CFG_BUILD_PARTS $VAL"
1165 if [ "$PLATFORM_MAC" = "yes" ]; then
1167 elif [ "$PLATFORM_QWS" = "yes" ]; then
1170 if [ "$CFG_FRAMEWORK" = "auto" ]; then
1176 if [ "$PLATFORM_MAC" = "yes" ]; then
1183 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1184 CFG_MAC_DWARF2
="$VAL"
1190 if [ "$PLATFORM_MAC" = "yes" ]; then
1191 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $VAL"
1200 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1201 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS x86 ppc"
1207 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1208 CFG_MAC_COCOA
="$VAL"
1209 COMMANDLINE_MAC_COCOA
="$VAL"
1215 if [ "$PLATFORM_MAC" = "yes" ]; then
1216 CFG_FRAMEWORK
="$VAL"
1222 if [ "$VAL" = "yes" ]; then
1224 QMakeVar add QMAKE_CFLAGS
-pg
1225 QMakeVar add QMAKE_CXXFLAGS
-pg
1226 QMakeVar add QMAKE_LFLAGS
-pg
1227 QMAKE_VARS
="$QMAKE_VARS CONFIG+=nostrip"
1232 exceptions|g
++-exceptions)
1233 if [ "$VAL" = "no" ]; then
1235 elif [ "$VAL" = "yes" ]; then
1243 # keep compatibility with old platform names
1249 PLATFORM
=hpux-acc-o64
1252 PLATFORM
=hpux-acc-64
1255 PLATFORM
=hpux-acc-64
1267 PLATFORM
=reliant-cds-64
1270 PLATFORM
=solaris-cc-64
1273 PLATFORM
=solaris-cc-64
1276 PLATFORM
=unixware-cc
1279 PLATFORM
=unixware-g
++
1282 PLATFORM
=unixware-cc
1285 PLATFORM
=unixware-g
++
1291 i386
) NATIVE_64_ARCH
="x86_64" ;;
1292 powerpc
) NATIVE_64_ARCH
="ppc64" ;;
1293 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1295 if [ ! -z "$NATIVE_64_ARCH" ]; then
1296 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1297 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1306 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1307 CFG_DEBUG_RELEASE
="$VAL"
1313 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1314 CFG_RELEASE_QMAKE
="$VAL"
1320 if [ "$VAL" = "yes" ]; then
1322 elif [ "$VAL" = "no" ]; then
1329 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1330 CFG_PREFIX_INSTALL
="$VAL"
1338 developer-build|commercial|opensource|nokia-developer
)
1339 # These switches have been dealt with already
1342 if [ "$VAL" = "yes" ]; then
1344 elif [ "$VAL" = "no" ]; then
1351 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1352 CFG_INCREMENTAL
="$VAL"
1358 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1359 CFG_CONFIGURE_EXIT_ON_ERROR
="$VAL"
1365 if [ "$PLATFORM_QWS" = "yes" ]; then
1366 FEATURE
=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1367 if [ "$VAL" = "no" ]; then
1368 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_$FEATURE"
1369 elif [ "$VAL" = "yes" ] ||
[ "$VAL" = "unknown" ]; then
1370 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_$FEATURE"
1379 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1386 [ "$VAL" = "qt" ] && VAL
=yes
1387 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1394 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1402 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1409 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1416 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1423 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1430 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1431 CFG_PRECOMPILE
="$VAL"
1436 separate-debug-info
)
1437 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1438 CFG_SEPARATE_DEBUG_INFO
="$VAL"
1444 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1445 CFG_REDUCE_EXPORTS
="$VAL"
1451 if [ "$VAL" = "no" ]; then
1458 if [ "$VAL" = "no" ]; then
1465 if [ "$VAL" = "no" ]; then
1472 if [ "$VAL" = "no" ]; then
1482 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1483 CFG_REDUCE_RELOCATIONS
="$VAL"
1489 [ "$VAL" = "qt" ] && VAL
=yes
1490 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1491 CFG_QWS_FREETYPE
="$VAL"
1497 [ "$VAL" = "qt" ] && VAL
=yes
1498 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1503 # No longer supported:
1504 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1507 if [ "$VAL" = "system" ]; then
1514 [ "$VAL" = "yes" ] && VAL
=qt
1515 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1522 [ "$VAL" = "yes" ] && VAL
=qt
1523 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1530 [ "$VAL" = "yes" ] && VAL
=qt
1531 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1538 [ "$VAL" = "yes" ] && VAL
=qt
1539 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1546 if [ "$VAL" = "system" ] ||
[ "$VAL" = "no" ]; then
1553 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1560 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1567 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1574 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1581 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1588 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1589 CFG_FONTCONFIG
="$VAL"
1595 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1602 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1609 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1616 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1623 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1624 CFG_GSTREAMER
="$VAL"
1630 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1631 CFG_QGTKSTYLE
="$VAL"
1637 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "linked" ]; then
1639 elif [ "$VAL" = "runtime" ]; then
1646 if [ "$VAL" = "yes" ]; then
1653 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1660 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1661 CFG_LARGEFILE
="$VAL"
1667 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1674 if [ "$VAL" = "yes" ]; then
1675 CFG_OPENSSL
="linked"
1681 if [ "$VAL" = "yes" ]; then
1689 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1690 CFG_XMLPATTERNS
="yes"
1692 if [ "$VAL" = "no" ]; then
1693 CFG_XMLPATTERNS
="no"
1700 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1701 CFG_SCRIPTTOOLS
="yes"
1703 if [ "$VAL" = "no" ]; then
1704 CFG_SCRIPTTOOLS
="no"
1711 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1714 if [ "$VAL" = "no" ]; then
1722 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1725 if [ "$VAL" = "no" ]; then
1733 if [ "$VAL" = "yes" ]; then
1734 OPT_CONFIRM_LICENSE
="$VAL"
1740 if [ "$VAL" = "yes" ]; then
1746 sql-
*|gfx-
*|decoration-
*|kbd-
*|mouse-
*)
1747 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1748 # if autoconf style options were used, $VAL can be "yes" or "no"
1749 [ "$VAL" = "yes" ] && VAL
=qt
1750 # now $VAL should be "no", "qt", or "plugin"... double-check
1751 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1754 # now $VAL is "no", "qt", or "plugin"
1756 VAL
=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1757 VAR
=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1759 # Grab the available values
1762 avail
="$CFG_SQL_AVAILABLE"
1765 avail
="$CFG_GFX_AVAILABLE"
1766 if [ "$OPT" = "plugin" ]; then
1767 avail
="$CFG_GFX_PLUGIN_AVAILABLE"
1771 avail
="$CFG_DECORATION_AVAILABLE"
1772 if [ "$OPT" = "plugin" ]; then
1773 avail
="$CFG_DECORATION_PLUGIN_AVAILABLE"
1777 avail
="$CFG_KBD_AVAILABLE"
1778 if [ "$OPT" = "plugin" ]; then
1779 avail
="$CFG_KBD_PLUGIN_AVAILABLE"
1783 avail
="$CFG_MOUSE_AVAILABLE"
1784 if [ "$OPT" = "plugin" ]; then
1785 avail
="$CFG_MOUSE_PLUGIN_AVAILABLE"
1790 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1794 # Check that that user's value is available.
1797 if [ "$VAL" = "$d" ]; then
1802 [ "$found" = yes ] || ERROR
=yes
1804 if [ "$VAR" = "sql" ]; then
1805 # set the CFG_SQL_driver
1806 eval "CFG_SQL_$VAL=\$OPT"
1810 if [ "$OPT" = "plugin" ] ||
[ "$OPT" = "qt" ]; then
1811 if [ "$OPT" = "plugin" ]; then
1812 [ "$VAR" = "decoration" ] && QMakeVar del
"${VAR}s" "$VAL"
1813 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
1814 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
1815 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
1816 [ "$VAR" = "mouse" ] && QMakeVar del
"${VAR}s" "$VAL"
1817 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
1818 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
1819 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
1822 if [ "$VAR" = "gfx" ] ||
[ "$VAR" = "kbd" ] ||
[ "$VAR" = "decoration" ] ||
[ "$VAR" = "mouse" ]; then
1823 [ "$VAR" = "gfx" ] && CFG_GFX_ON
="$CFG_GFX_ON $VAL"
1824 [ "$VAR" = "kbd" ] && CFG_KBD_ON
="$CFG_KBD_ON $VAL"
1825 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
="$CFG_DECORATION_ON $VAL"
1826 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
="$CFG_MOUSE_ON $VAL"
1830 QMakeVar add
"${VAR}s" "${VAL}"
1831 elif [ "$OPT" = "no" ]; then
1832 PLUG_VAR
="${VAR}-plugin"
1833 if [ "$VAR" = "gfx" ] ||
[ "$VAR" = "kbd" ] ||
[ "$VAR" = "mouse" ]; then
1834 IN_VAR
="${VAR}-driver"
1838 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
1839 [ "$VAR" = "gfx" ] && CFG_GFX_ON
=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
1840 [ "$VAR" = "kbd" ] && CFG_KBD_ON
=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
1841 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
1842 QMakeVar del
"${IN_VAR}s" "$VAL"
1843 QMakeVar del
"${PLUG_VAR}s" "$VAL"
1845 if [ "$ERROR" = "yes" ]; then
1846 echo "$CURRENT_OPT: unknown argument"
1851 if [ "$VAL" = "yes" ]; then
1852 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1853 QMAKE_SWITCHES
="$QMAKE_SWITCHES -d"
1857 elif [ "$VAL" = "no" ]; then
1858 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" |
grep ' -d' >/dev
/null
2>&1; then
1859 QMAKE_SWITCHES
=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1868 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1875 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1882 D_FLAGS
="$D_FLAGS \"$VAL\""
1885 I_FLAGS
="$I_FLAGS -I\"${VAL}\""
1888 L_FLAGS
="$L_FLAGS -L\"${VAL}\""
1891 RPATH_FLAGS
="$RPATH_FLAGS \"${VAL}\""
1894 l_FLAGS
="$l_FLAGS -l\"${VAL}\""
1897 if [ "$PLATFORM_MAC" = "yes" ]; then
1898 L_FLAGS
="$L_FLAGS -F\"${VAL}\""
1899 I_FLAGS
="$I_FLAGS -F\"${VAL}\""
1905 if [ "$PLATFORM_MAC" = "yes" ]; then
1906 l_FLAGS
="$l_FLAGS -framework \"${VAL}\""
1915 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1922 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1923 CFG_PHONON_BACKEND
="$VAL"
1932 if [ "$UNKNOWN_OPT" = "yes" ]; then
1933 echo "${CURRENT_OPT}: invalid command-line switch"
1939 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
1940 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
1944 # update QT_CONFIG to show our current predefined configuration
1945 case "$CFG_QCONFIG" in
1946 minimal|small|medium|large|full
)
1947 # these are a sequence of increasing functionality
1948 for c
in minimal small medium large full
; do
1949 QT_CONFIG
="$QT_CONFIG $c-config"
1950 [ "$CFG_QCONFIG" = $c ] && break
1954 # not known to be sufficient for anything
1955 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ]; then
1956 echo >&2 "Error: configuration file not found:"
1957 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
1962 #-------------------------------------------------------------------------------
1963 # build tree initialization
1964 #-------------------------------------------------------------------------------
1966 # where to find which..
1967 unixtests
="$relpath/config.tests/unix"
1968 mactests
="$relpath/config.tests/mac"
1969 WHICH
="$unixtests/which.test"
1971 PERL
=`$WHICH perl 2>/dev/null`
1973 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
1975 for e
in gawk nawk
awk; do
1976 if "$WHICH" $e >/dev
/null
2>&1 && ( $e -f /dev
/null
/dev
/null
) >/dev
/null
2>&1; then
1982 ### skip this if the user just needs help...
1983 if [ "$OPT_HELP" != "yes" ]; then
1985 # is this a shadow build?
1986 if [ "$OPT_SHADOW" = "maybe" ]; then
1988 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
1989 if [ -h "$outpath" ]; then
1990 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW
=yes
1996 if [ "$OPT_SHADOW" = "yes" ]; then
1997 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" ]; then
1998 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
1999 echo >&2 "Cannot proceed."
2002 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2005 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2007 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2008 echo "By default, Qt is built in release mode with separate debug information, so"
2009 echo "-debug-and-release is not necessary anymore"
2013 # detect build style
2014 if [ "$CFG_DEBUG" = "auto" ]; then
2015 if [ "$PLATFORM_MAC" = "yes" ]; then
2016 CFG_DEBUG_RELEASE
=yes
2018 elif [ "$CFG_DEV" = "yes" ]; then
2019 CFG_DEBUG_RELEASE
=no
2022 CFG_DEBUG_RELEASE
=no
2026 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2027 QMAKE_CONFIG
="$QMAKE_CONFIG build_all"
2030 if [ "$CFG_SILENT" = "yes" ]; then
2031 QMAKE_CONFIG
="$QMAKE_CONFIG silent"
2034 # if the source tree is different from the build tree,
2035 # symlink or copy part of the sources
2036 if [ "$OPT_SHADOW" = "yes" ]; then
2037 echo "Preparing build tree..."
2039 if [ -z "$PERL" ]; then
2041 echo "You need perl in your PATH to make a shadow build."
2042 echo "Cannot proceed."
2046 [ -d "$outpath/bin" ] || mkdir
-p "$outpath/bin"
2048 # symlink the qmake directory
2049 find "$relpath/qmake" |
while read a
; do
2050 my_a
=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2051 if [ '!' -f "$my_a" ]; then
2052 if [ -d "$a" ]; then
2053 # directories are created...
2056 a_dir
=`dirname "$my_a"`
2057 [ -d "$a_dir" ] || mkdir
-p "$a_dir"
2058 # ... and files are symlinked
2059 case `basename "$a"` in
2060 *.o|
*.d|GNUmakefile
*|qmake
)
2071 # make a syncqt script that can be used in the shadow
2072 rm -f "$outpath/bin/syncqt"
2073 if [ -x "$relpath/bin/syncqt" ]; then
2074 mkdir
-p "$outpath/bin"
2075 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2076 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
2077 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" $*" >>"$outpath/bin/syncqt"
2078 chmod 755 "$outpath/bin/syncqt"
2081 # symlink the mkspecs directory
2082 mkdir
-p "$outpath/mkspecs"
2083 rm -f "$outpath"/mkspecs
/*
2084 ln -s "$relpath"/mkspecs
/* "$outpath/mkspecs"
2085 rm -f "$outpath/mkspecs/default"
2087 # symlink the doc directory
2088 rm -rf "$outpath/doc"
2089 ln -s "$relpath/doc" "$outpath/doc"
2091 # make sure q3porting.xml can be found
2092 mkdir
-p "$outpath/tools/porting/src"
2093 rm -f "$outpath/tools/porting/src/q3porting.xml"
2094 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2097 # symlink files from src/gui/embedded neccessary to build qvfb
2098 if [ "$CFG_DEV" = "yes" ]; then
2099 for f
in qvfbhdr.h qlock_p.h qlock.cpp qwssignalhandler_p.h qwssignalhandler.cpp
; do
2100 dest
="${relpath}/tools/qvfb/${f}"
2102 ln -s "${relpath}/src/gui/embedded/${f}" "${dest}"
2106 # symlink fonts to be able to run application from build directory
2107 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then
2108 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2109 mkdir
-p "${outpath}/lib"
2110 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2114 if [ "$OPT_FAST" = "auto" ]; then
2115 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2122 # find a make command
2123 if [ -z "$MAKE" ]; then
2125 for mk
in gmake
make; do
2126 if "$WHICH" $mk >/dev
/null
2>&1; then
2131 if [ -z "$MAKE" ]; then
2132 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2133 echo >&2 "Cannot proceed."
2140 #-------------------------------------------------------------------------------
2141 # auto-detect all that hasn't been specified in the arguments
2142 #-------------------------------------------------------------------------------
2144 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED
=auto
2145 if [ "$CFG_EMBEDDED" != "no" ]; then
2146 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2148 [ -z "$PLATFORM" ] && PLATFORM
=qws
/macx-generic-g
++
2149 if [ -z "$XPLATFORM" ]; then
2150 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2151 XPLATFORM
="qws/macx-$CFG_EMBEDDED-g++"
2155 [ -z "$PLATFORM" ] && PLATFORM
=qws
/freebsd-generic-g
++
2156 if [ -z "$XPLATFORM" ]; then
2157 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2158 XPLATFORM
="qws/freebsd-$CFG_EMBEDDED-g++"
2162 [ -z "$PLATFORM" ] && PLATFORM
=qws
/solaris-generic-g
++
2163 if [ -z "$XPLATFORM" ]; then
2164 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2165 XPLATFORM
="qws/solaris-$CFG_EMBEDDED-g++"
2169 if [ -z "$PLATFORM" ]; then
2170 case "$UNAME_MACHINE" in
2172 PLATFORM
=qws
/linux-x86-g
++
2175 PLATFORM
=qws
/linux-x86_64-g
++
2178 PLATFORM
=qws
/linux-ppc-g
++
2181 PLATFORM
=qws
/linux-generic-g
++
2185 if [ -z "$XPLATFORM" ]; then
2186 if [ "$CFG_EMBEDDED" = "auto" ]; then
2187 if [ -n "$CFG_ARCH" ]; then
2188 CFG_EMBEDDED
=$CFG_ARCH
2190 case "$UNAME_MACHINE" in
2201 CFG_EMBEDDED
=generic
2206 XPLATFORM
="qws/linux-$CFG_EMBEDDED-g++"
2213 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2219 if [ -z "$PLATFORM" ]; then
2221 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2223 if [ "$PLATFORM_MAC" = "yes" ]; then
2225 # PLATFORM=macx-xcode
2232 #PLATFORM=aix-g++-64
2234 #PLATFORM=aix-xlc-64
2236 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2246 # PLATFORM=dynix-g++
2252 PLATFORM
=freebsd-g
++
2254 - Also available for FreeBSD: freebsd-icc
2258 PLATFORM
=openbsd-g
++
2269 #PLATFORM=irix-cc-64
2271 - Also available for IRIX: irix-g++ irix-cc-64
2275 case "$UNAME_MACHINE" in
2277 #PLATFORM=hpuxi-acc-32
2278 PLATFORM
=hpuxi-acc-64
2280 - Also available for HP-UXi: hpuxi-acc-32
2286 #PLATFORM=hpux-acc-64
2288 #PLATFORM=hpux-acc-o64
2290 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2299 - Also available for Tru64: tru64-g++
2303 case "$UNAME_MACHINE" in
2305 PLATFORM
=linux-g
++-64
2312 - Also available for Linux: linux-kcc linux-icc linux-cxx
2316 #PLATFORM=solaris-g++
2318 #PLATFORM=solaris-cc64
2320 - Also available for Solaris: solaris-g++ solaris-cc-64
2323 ReliantUNIX-
*:*|SINIX-
*:*)
2324 PLATFORM
=reliant-cds
2325 #PLATFORM=reliant-cds-64
2327 - Also available for Reliant UNIX: reliant-cds-64
2337 #PLATFORM=unixware-g++
2338 PLATFORM
=unixware-cc
2340 - Also available for OpenUNIX: unixware-g++
2344 #PLATFORM=unixware-g++
2345 PLATFORM
=unixware-cc
2347 - Also available for UnixWare: unixware-g++
2354 - Also available for SCO OpenServer: sco-g++
2358 PLATFORM
=unixware-g
++
2361 if [ "$OPT_HELP" != "yes" ]; then
2363 for p
in $PLATFORMS; do
2364 echo " $relconf $* -platform $p"
2367 echo " The build script does not currently recognize all" >&2
2368 echo " platforms supported by Qt." >&2
2369 echo " Rerun this script with a -platform option listed to" >&2
2370 echo " set the system/compiler combination you use." >&2
2377 if [ "$PLATFORM_QWS" = "yes" ]; then
2379 PLATFORMS
=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2381 PLATFORMS
=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2384 [ -z "$XPLATFORM" ] && XPLATFORM
="$PLATFORM"
2385 if [ -d "$PLATFORM" ]; then
2386 QMAKESPEC
="$PLATFORM"
2388 QMAKESPEC
="$relpath/mkspecs/${PLATFORM}"
2390 if [ -d "$XPLATFORM" ]; then
2391 XQMAKESPEC
="$XPLATFORM"
2393 XQMAKESPEC
="$relpath/mkspecs/${XPLATFORM}"
2395 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2396 QT_CROSS_COMPILE
=yes
2397 QMAKE_CONFIG
="$QMAKE_CONFIG cross_compile"
2400 if [ "$PLATFORM_MAC" = "yes" ]; then
2401 if [ `basename $QMAKESPEC` = "macx-xcode" ] ||
[ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2403 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2404 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2405 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2406 echo " built with 'macx-g++'" >&2
2412 # check specified platforms are supported
2413 if [ '!' -d "$QMAKESPEC" ]; then
2415 echo " The specified system/compiler is not supported:"
2419 echo " Please see the README file for a complete list."
2423 if [ '!' -d "$XQMAKESPEC" ]; then
2425 echo " The specified system/compiler is not supported:"
2429 echo " Please see the README file for a complete list."
2433 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2435 echo " The specified system/compiler port is not complete:"
2437 echo " $XQMAKESPEC/qplatformdefs.h"
2439 echo " Please contact qt-bugs@trolltech.com."
2444 # now look at the configs and figure out what platform we are config'd for
2445 [ "$CFG_EMBEDDED" = "no" ] \
2446 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2448 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2450 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2451 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2452 if echo $UNAME_RELEASE |
grep "^5\.[5|6]" >/dev
/null
2>&1; then
2453 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2454 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2458 #-------------------------------------------------------------------------------
2459 # determine the system architecture
2460 #-------------------------------------------------------------------------------
2461 if [ "$OPT_VERBOSE" = "yes" ]; then
2462 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2465 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2466 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2468 echo "You have specified a target architecture with -embedded and -arch."
2469 echo "The two architectures you have specified are different, so we can"
2470 echo "not proceed. Either set both to be the same, or only use -embedded."
2476 if [ -z "${CFG_HOST_ARCH}" ]; then
2477 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2479 CFG_HOST_ARCH
=`uname -p`
2480 if [ "$OPT_VERBOSE" = "yes" ]; then
2481 echo " SGI ($CFG_HOST_ARCH)"
2485 case "$UNAME_MACHINE" in
2487 if [ "$OPT_VERBOSE" = "yes" ]; then
2488 echo " Sun SPARC (sparc)"
2495 if [ "$OPT_VERBOSE" = "yes" ]; then
2496 echo " 64-bit AMD 80x86 (x86_64)"
2498 CFG_HOST_ARCH
=x86_64
2501 if [ "$OPT_VERBOSE" = "yes" ]; then
2502 echo " 32-bit Intel 80x86 (i386)"
2510 case "$UNAME_MACHINE" in
2512 if [ "$OPT_VERBOSE" = "yes" ]; then
2513 echo " 32-bit Apple PowerPC (powerpc)"
2517 if [ "$OPT_VERBOSE" = "yes" ]; then
2518 echo " 32-bit Intel 80x86 (i386)"
2522 CFG_HOST_ARCH
=macosx
2525 if [ "$OPT_VERBOSE" = "yes" ]; then
2526 echo " 64-bit IBM PowerPC (powerpc)"
2528 CFG_HOST_ARCH
=powerpc
2531 if [ "$OPT_VERBOSE" = "yes" ]; then
2532 echo " HP PA-RISC (parisc)"
2534 CFG_HOST_ARCH
=parisc
2537 if [ "$OPT_VERBOSE" = "yes" ]; then
2538 echo " 32-bit Intel 80x86 (i386)"
2542 *:*:x86_64|
*:*:amd64
)
2543 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2544 if [ "$OPT_VERBOSE" = "yes" ]; then
2545 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2549 if [ "$OPT_VERBOSE" = "yes" ]; then
2550 echo " 64-bit AMD 80x86 (x86_64)"
2552 CFG_HOST_ARCH
=x86_64
2556 if [ "$OPT_VERBOSE" = "yes" ]; then
2557 echo " 32-bit PowerPC (powerpc)"
2559 CFG_HOST_ARCH
=powerpc
2562 if [ "$OPT_VERBOSE" = "yes" ]; then
2563 echo " 64-bit PowerPC (powerpc)"
2565 CFG_HOST_ARCH
=powerpc
2568 if [ "$OPT_VERBOSE" = "yes" ]; then
2569 echo " IBM S/390 (s390)"
2574 if [ "$OPT_VERBOSE" = "yes" ]; then
2580 if [ "$OPT_VERBOSE" = "yes" ]; then
2581 echo " Linux on SPARC"
2586 if [ "$OPT_VERBOSE" = "yes" ]; then
2587 echo " Trying '$UNAME_MACHINE'..."
2589 CFG_HOST_ARCH
="$UNAME_MACHINE"
2594 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2595 if [ -n "$CFG_ARCH" ]; then
2596 CFG_EMBEDDED
=$CFG_ARCH
2599 case "$CFG_EMBEDDED" in
2619 CFG_ARCH
="$CFG_EMBEDDED"
2622 elif [ "$PLATFORM_MAC" = "yes" ] ||
[ -z "$CFG_ARCH" ]; then
2623 CFG_ARCH
=$CFG_HOST_ARCH
2626 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
2627 if [ "$OPT_VERBOSE" = "yes" ]; then
2628 echo " '$CFG_ARCH' is supported"
2631 if [ "$OPT_VERBOSE" = "yes" ]; then
2632 echo " '$CFG_ARCH' is unsupported, using 'generic'"
2636 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
2637 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
2638 if [ "$OPT_VERBOSE" = "yes" ]; then
2639 echo " '$CFG_HOST_ARCH' is supported"
2642 if [ "$OPT_VERBOSE" = "yes" ]; then
2643 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
2645 CFG_HOST_ARCH
=generic
2649 if [ "$OPT_VERBOSE" = "yes" ]; then
2650 echo "System architecture: '$CFG_ARCH'"
2651 if [ "$PLATFORM_QWS" = "yes" ]; then
2652 echo "Host architecture: '$CFG_HOST_ARCH'"
2656 #-------------------------------------------------------------------------------
2657 # tests that don't need qmake (must be run before displaying help)
2658 #-------------------------------------------------------------------------------
2660 if [ -z "$PKG_CONFIG" ]; then
2661 # See if PKG_CONFIG is set in the mkspec:
2662 PKG_CONFIG
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
2664 if [ -z "$PKG_CONFIG" ]; then
2665 PKG_CONFIG
=`$WHICH pkg-config 2>/dev/null`
2668 # Work out if we can use pkg-config
2669 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2670 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2672 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2673 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2674 echo >&2 "environment!"
2676 if [ -z "$PKG_CONFIG_PATH" ]; then
2678 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2679 echo >&2 "the host compiler's .pc files will be used. This is probably"
2680 echo >&2 "not what you want."
2682 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2684 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2685 echo >&2 "been set. This means your toolchain's .pc files must contain"
2686 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2687 echo >&2 "tests are failing, please check these files."
2695 # check -arch arguments for validity.
2696 if [ "$PLATFORM_MAC" = "yes" ]; then
2697 ALLOWED
="x86 ppc x86_64 ppc64"
2698 for i
in $CFG_MAC_ARCHS
2700 if echo "$ALLOWED" |
grep -w -v "$i" > /dev
/null
2>&1; then
2701 echo "Unknown architecture: \"$i\". Supported architechtures: x86 ppc x86_64 ppc64";
2707 # find the default framework value
2708 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2709 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2710 CFG_FRAMEWORK
="$CFG_SHARED"
2711 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2713 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2721 QMAKE_CONF_COMPILER
=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
2723 [ -z "$TEST_COMPILER" ] && TEST_COMPILER
=$QMAKE_CONF_COMPILER
2725 # auto-detect precompiled header support
2726 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2727 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2729 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2734 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2736 echo "WARNING: Using universal binaries disables precompiled headers."
2741 #auto-detect DWARF2 on the mac
2742 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "auto" ]; then
2743 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2750 # auto-detect support for -Xarch on the mac
2751 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" == "auto" ]; then
2752 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2759 # don't autodetect support for separate debug info on objcopy when
2760 # cross-compiling as lots of toolchains seems to have problems with this
2761 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2762 CFG_SEPARATE_DEBUG_INFO
="no"
2765 # auto-detect support for separate debug info in objcopy
2766 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2767 TEST_COMPILER_CFLAGS
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_].*=%%p' | tr '\n' ' '`
2768 TEST_COMPILER_CXXFLAGS
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_].*=%%p' | tr '\n' ' '`
2769 TEST_OBJCOPY
=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
2770 COMPILER_WITH_FLAGS
="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2771 COMPILER_WITH_FLAGS
=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2772 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2773 CFG_SEPARATE_DEBUG_INFO
=no
2777 # binutils on HP-UX is buggy; default to no.
2778 CFG_SEPARATE_DEBUG_INFO
=no
2781 CFG_SEPARATE_DEBUG_INFO
=yes
2787 # auto-detect -fvisibility support
2788 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2789 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2790 CFG_REDUCE_EXPORTS
=no
2792 CFG_REDUCE_EXPORTS
=yes
2796 # detect the availability of the -Bsymbolic-functions linker optimization
2797 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2798 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2799 CFG_REDUCE_RELOCATIONS
=no
2801 CFG_REDUCE_RELOCATIONS
=yes
2805 # auto-detect GNU make support
2806 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v |
grep "GNU Make" >/dev
/null
2>&1; then
2810 # If -opengl wasn't specified, don't try to auto-detect
2811 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
2816 if [ "$PLATFORM_MAC" = "yes" ]; then
2817 if [ "$CFG_OPENGL" = "auto" ] ||
[ "$CFG_OPENGL" = "yes" ]; then
2822 # find the default framework value
2823 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2824 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2825 CFG_FRAMEWORK
="$CFG_SHARED"
2826 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2828 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2836 # x11 tests are done after qmake is built
2839 #setup the build parts
2840 if [ -z "$CFG_BUILD_PARTS" ]; then
2841 CFG_BUILD_PARTS
="$QT_DEFAULT_BUILD_PARTS"
2843 # don't build tools by default when cross-compiling
2844 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2845 CFG_BUILD_PARTS
=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2848 for nobuild
in $CFG_NOBUILD_PARTS; do
2849 CFG_BUILD_PARTS
=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2851 if echo $CFG_BUILD_PARTS |
grep -v libs
>/dev
/null
2>&1; then
2853 # echo "WARNING: libs is a required part of the build."
2855 CFG_BUILD_PARTS
="$CFG_BUILD_PARTS libs"
2858 #-------------------------------------------------------------------------------
2859 # post process QT_INSTALL_* variables
2860 #-------------------------------------------------------------------------------
2863 if [ -z "$QT_INSTALL_PREFIX" ]; then
2864 if [ "$CFG_DEV" = "yes" ]; then
2865 QT_INSTALL_PREFIX
="$outpath" # At Trolltech, we use sandboxed builds by default
2866 elif [ "$PLATFORM_QWS" = "yes" ]; then
2867 QT_INSTALL_PREFIX
="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
2868 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2869 QT_INSTALL_PREFIX
="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
2872 QT_INSTALL_PREFIX
="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
2875 QT_INSTALL_PREFIX
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2878 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2879 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2880 if [ "$PLATFORM_MAC" = "yes" ]; then
2881 QT_INSTALL_DOCS
="/Developer/Documentation/Qt"
2884 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS
="$QT_INSTALL_PREFIX/doc" #fallback
2887 QT_INSTALL_DOCS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2890 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2891 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2892 if [ "$PLATFORM_MAC" = "yes" ]; then
2893 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2898 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS
="$QT_INSTALL_PREFIX/include"
2901 QT_INSTALL_HEADERS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2904 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2905 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2906 if [ "$PLATFORM_MAC" = "yes" ]; then
2907 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2908 QT_INSTALL_LIBS
="/Libraries/Frameworks"
2912 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS
="$QT_INSTALL_PREFIX/lib" #fallback
2914 QT_INSTALL_LIBS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2917 if [ -z "$QT_INSTALL_BINS" ]; then #default
2918 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2919 if [ "$PLATFORM_MAC" = "yes" ]; then
2920 QT_INSTALL_BINS
="/Developer/Applications/Qt"
2923 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS
="$QT_INSTALL_PREFIX/bin" #fallback
2926 QT_INSTALL_BINS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2929 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2930 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2931 if [ "$PLATFORM_MAC" = "yes" ]; then
2932 QT_INSTALL_PLUGINS
="/Developer/Applications/Qt/plugins"
2935 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS
="$QT_INSTALL_PREFIX/plugins" #fallback
2937 QT_INSTALL_PLUGINS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2940 if [ -z "$QT_INSTALL_DATA" ]; then #default
2941 QT_INSTALL_DATA
="$QT_INSTALL_PREFIX"
2943 QT_INSTALL_DATA
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2946 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2947 QT_INSTALL_TRANSLATIONS
="$QT_INSTALL_PREFIX/translations"
2949 QT_INSTALL_TRANSLATIONS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2952 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2953 if [ "$PLATFORM_MAC" = "yes" ]; then
2954 QT_INSTALL_SETTINGS
=/Library
/Preferences
/Qt
2956 QT_INSTALL_SETTINGS
=/etc
/xdg
2959 QT_INSTALL_SETTINGS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2962 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2963 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2964 if [ "$PLATFORM_MAC" = "yes" ]; then
2965 QT_INSTALL_EXAMPLES
="/Developer/Examples/Qt"
2968 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES
="$QT_INSTALL_PREFIX/examples" #fallback
2970 QT_INSTALL_EXAMPLES
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2973 if [ -z "$QT_INSTALL_DEMOS" ]; then #default
2974 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2975 if [ "$PLATFORM_MAC" = "yes" ]; then
2976 QT_INSTALL_DEMOS
="/Developer/Examples/Qt/Demos"
2979 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS
="$QT_INSTALL_PREFIX/demos"
2981 QT_INSTALL_DEMOS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
2983 #-------------------------------------------------------------------------------
2984 # help - interactive parts of the script _after_ this section please
2985 #-------------------------------------------------------------------------------
2987 # next, emit a usage message if something failed.
2988 if [ "$OPT_HELP" = "yes" ]; then
2989 [ "x$ERROR" = "xyes" ] && echo
2990 if [ "$CFG_NIS" = "no" ]; then
2997 if [ "$CFG_CUPS" = "no" ]; then
3004 if [ "$CFG_ICONV" = "no" ]; then
3011 if [ "$CFG_LARGEFILE" = "no" ]; then
3018 if [ "$CFG_STL" = "auto" ] ||
[ "$CFG_STL" = "yes" ]; then
3025 if [ "$CFG_IPV6" = "auto" ]; then
3029 if [ "$CFG_PRECOMPILE" = "auto" ] ||
[ "$CFG_PRECOMPILE" = "no" ]; then
3038 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3039 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
3040 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3041 [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
3042 [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3043 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3044 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3045 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3046 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3047 [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3048 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3049 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3050 [-no-make <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3051 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3052 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
3053 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3054 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3055 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3056 [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3057 [-no-openssl] [-openssl] [-openssl-linked]
3058 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit]
3059 [-no-scripttools] [-scripttools]
3061 [additional platform specific options (see below)]
3064 Installation options:
3066 These are optional, but you may specify install directories.
3068 -prefix <dir> ...... This will install everything relative to <dir>
3069 (default $QT_INSTALL_PREFIX)
3071 if [ "$PLATFORM_QWS" = "yes" ]; then
3074 -hostprefix [dir] .. Tools and libraries needed when developing
3075 applications are installed in [dir]. If [dir] is
3076 not given, the current build directory will be used.
3081 * -prefix-install .... Force a sandboxed "local" installation of
3082 Qt. This will install into
3083 $QT_INSTALL_PREFIX, if this option is
3084 disabled then some platforms will attempt a
3085 "system" install by placing default values to
3086 be placed in a system location other than
3089 You may use these to separate different parts of the install:
3091 -bindir <dir> ......... Executables will be installed to <dir>
3092 (default PREFIX/bin)
3093 -libdir <dir> ......... Libraries will be installed to <dir>
3094 (default PREFIX/lib)
3095 -docdir <dir> ......... Documentation will be installed to <dir>
3096 (default PREFIX/doc)
3097 -headerdir <dir> ...... Headers will be installed to <dir>
3098 (default PREFIX/include)
3099 -plugindir <dir> ...... Plugins will be installed to <dir>
3100 (default PREFIX/plugins)
3101 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3103 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3104 (default PREFIX/translations)
3105 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3106 (default PREFIX/etc/settings)
3107 -examplesdir <dir> .... Examples will be installed to <dir>
3108 (default PREFIX/examples)
3109 -demosdir <dir> ....... Demos will be installed to <dir>
3110 (default PREFIX/demos)
3112 You may use these options to turn on strict plugin loading.
3114 -buildkey <key> .... Build the Qt library and plugins using the specified
3115 <key>. When the library loads plugins, it will only
3116 load those that have a matching key.
3120 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3121 that needs to be evaluated. If the evaluation succeeds, the feature is
3122 included. Here is a short explanation of each option:
3124 * -release ........... Compile and link Qt with debugging turned off.
3125 -debug ............. Compile and link Qt with debugging turned on.
3126 -debug-and-release . Compile and link two versions of Qt, with and without
3127 debugging turned on (Mac only).
3129 -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting)
3131 -opensource......... Compile and link the Open-Source Edition of Qt.
3132 -commercial......... Compile and link the Commercial Edition of Qt.
3135 * -shared ............ Create and use shared Qt libraries.
3136 -static ............ Create and use static Qt libraries.
3138 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3140 -fast .............. Configure Qt quickly by generating Makefiles only for
3141 library and subdirectory targets. All other Makefiles
3142 are created as wrappers, which will in turn run qmake.
3144 -no-largefile ...... Disables large file support.
3145 + -largefile ......... Enables Qt to access files larger than 4 GB.
3148 if [ "$PLATFORM_QWS" = "yes" ]; then
3155 if [ "$CFG_DBUS" = "no" ]; then
3164 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3165 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3167 -no-accessibility .. Do not compile Accessibility support.
3168 * -accessibility ..... Compile Accessibility support.
3170 $SHN -no-stl ............ Do not compile STL support.
3171 $SHY -stl ............... Compile STL support.
3173 -no-sql-<driver> ... Disable SQL <driver> entirely.
3174 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3176 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3179 Possible values for <driver>:
3180 [ $CFG_SQL_AVAILABLE ]
3182 -system-sqlite ..... Use sqlite from the operating system.
3184 -no-qt3support ..... Disables the Qt 3 support functionality.
3185 * -qt3support ........ Enables the Qt 3 support functionality.
3187 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3188 + -xmlpatterns ....... Build the QtXmlPatterns module.
3189 QtXmlPatterns is built if a decent C++ compiler
3190 is used and exceptions are enabled.
3192 -no-phonon ......... Do not build the Phonon module.
3193 + -phonon ............ Build the Phonon module.
3194 Phonon is built if a decent C++ compiler is used.
3195 -no-phonon-backend.. Do not build the platform phonon plugin.
3196 + -phonon-backend..... Build the platform phonon plugin.
3198 -no-svg ............ Do not build the SVG module.
3199 + -svg ............... Build the SVG module.
3201 -no-webkit ......... Do not build the WebKit module.
3202 + -webkit ............ Build the WebKit module.
3203 WebKit is built if a decent C++ compiler is used.
3205 -no-scripttools .... Do not build the QtScriptTools module.
3206 + -scripttools ....... Build the QtScriptTools module.
3208 -platform target ... The operating system and compiler you are building
3211 See the README file for a list of supported
3212 operating systems and compilers.
3214 if [ "${PLATFORM_QWS}" != "yes" ]; then
3216 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3217 raster - Software rasterizer
3218 opengl - Rendering via OpenGL, Experimental!
3223 -no-mmx ............ Do not compile with use of MMX instructions.
3224 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3225 -no-sse ............ Do not compile with use of SSE instructions.
3226 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3228 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3229 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3231 -D <string> ........ Add an explicit define to the preprocessor.
3232 -I <string> ........ Add an explicit include path.
3233 -L <string> ........ Add an explicit library path.
3235 -help, -h .......... Display this information.
3237 Third Party Libraries:
3239 -qt-zlib ........... Use the zlib bundled with Qt.
3240 + -system-zlib ....... Use zlib from the operating system.
3241 See http://www.gzip.org/zlib
3243 -no-gif ............ Do not compile the plugin for GIF reading support.
3244 * -qt-gif ............ Compile the plugin for GIF reading support.
3245 See also src/plugins/imageformats/gif/qgifhandler.h
3247 -no-libtiff ........ Do not compile the plugin for TIFF support.
3248 -qt-libtiff ........ Use the libtiff bundled with Qt.
3249 + -system-libtiff .... Use libtiff from the operating system.
3250 See http://www.libtiff.org
3252 -no-libpng ......... Do not compile in PNG support.
3253 -qt-libpng ......... Use the libpng bundled with Qt.
3254 + -system-libpng ..... Use libpng from the operating system.
3255 See http://www.libpng.org/pub/png
3257 -no-libmng ......... Do not compile the plugin for MNG support.
3258 -qt-libmng ......... Use the libmng bundled with Qt.
3259 + -system-libmng ..... Use libmng from the operating system.
3260 See http://www.libmng.com
3262 -no-libjpeg ........ Do not compile the plugin for JPEG support.
3263 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3264 + -system-libjpeg .... Use libjpeg from the operating system.
3265 See http://www.ijg.org
3267 -no-openssl ........ Do not compile support for OpenSSL.
3268 + -openssl ........... Enable run-time OpenSSL support.
3269 -openssl-linked .... Enabled linked OpenSSL support.
3271 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3276 -make <part> ....... Add part to the list of parts to be built at make time.
3277 ($QT_DEFAULT_BUILD_PARTS)
3278 -nomake <part> ..... Exclude part from the list of parts to be built.
3280 -R <string> ........ Add an explicit runtime library path to the Qt
3282 -l <string> ........ Add an explicit library.
3284 -no-rpath .......... Do not use the library install path as a runtime
3286 + -rpath ............. Link Qt libraries and executables using the library
3287 install path as a runtime library path. Equivalent
3288 to -R install_libpath
3290 -continue .......... Continue as far as possible if an error occurs.
3292 -verbose, -v ....... Print verbose information about each step of the
3295 -silent ............ Reduce the build output so that warnings and errors
3296 can be seen more easily.
3298 * -no-optimized-qmake ... Do not build qmake optimized.
3299 -optimized-qmake ...... Build qmake optimized.
3301 $NSN -no-nis ............ Do not compile NIS support.
3302 $NSY -nis ............... Compile NIS support.
3304 $CUN -no-cups ........... Do not compile CUPS support.
3305 $CUY -cups .............. Compile CUPS support.
3306 Requires cups/cups.h and libcups.so.2.
3308 $CIN -no-iconv .......... Do not compile support for iconv(3).
3309 $CIY -iconv ............. Compile support for iconv(3).
3311 $PHN -no-pch ............ Do not use precompiled header support.
3312 $PHY -pch ............... Use precompiled header support.
3314 $DBN -no-dbus ........... Do not compile the QtDBus module.
3315 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3316 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3318 -reduce-relocations ..... Reduce relocations in the libraries through extra
3319 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3320 experimental; needs GNU ld >= 2.18).
3323 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3324 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3331 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3339 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
3343 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3344 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3350 if [ "$PLATFORM_X11" = "yes" ]; then
3351 if [ "$CFG_SM" = "no" ]; then
3358 if [ "$CFG_XSHAPE" = "no" ]; then
3365 if [ "$CFG_XINERAMA" = "no" ]; then
3372 if [ "$CFG_FONTCONFIG" = "no" ]; then
3379 if [ "$CFG_XCURSOR" = "no" ]; then
3386 if [ "$CFG_XFIXES" = "no" ]; then
3393 if [ "$CFG_XRANDR" = "no" ]; then
3400 if [ "$CFG_XRENDER" = "no" ]; then
3407 if [ "$CFG_MITSHM" = "no" ]; then
3414 if [ "$CFG_XINPUT" = "no" ]; then
3421 if [ "$CFG_XKB" = "no" ]; then
3428 if [ "$CFG_IM" = "no" ]; then
3439 -no-gtkstyle ....... Do not build the GTK theme integration.
3440 + -gtkstyle .......... Build the GTK theme integration.
3442 * -no-nas-sound ...... Do not compile in NAS sound support.
3443 -system-nas-sound .. Use NAS libaudio from the operating system.
3444 See http://radscan.com/nas.html
3446 -no-opengl ......... Do not support OpenGL.
3447 + -opengl <api> ...... Enable OpenGL support.
3448 With no parameter, this will auto-detect the "best"
3449 OpenGL API to use. If desktop OpenGL is avaliable, it
3450 will be used. Use desktop, es1, es1cl or es2 for <api>
3451 to force the use of the Desktop (OpenGL 1.x or 2.x),
3452 OpenGL ES 1.x Common profile, 1.x Common Lite profile
3453 or 2.x APIs instead. On X11, the EGL API will be used
3454 to manage GL contexts in the case of OpenGL ES.
3456 $SMN -no-sm ............. Do not support X Session Management.
3457 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3459 $SHN -no-xshape ......... Do not compile XShape support.
3460 $SHY -xshape ............ Compile XShape support.
3461 Requires X11/extensions/shape.h.
3463 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3464 $XAY -xinerama .......... Compile Xinerama support.
3465 Requires X11/extensions/Xinerama.h and libXinerama.
3466 By default, Xinerama support will be compiled if
3467 available and the shared libraries are dynamically
3470 $XCN -no-xcursor ........ Do not compile Xcursor support.
3471 $XCY -xcursor ........... Compile Xcursor support.
3472 Requires X11/Xcursor/Xcursor.h and libXcursor.
3473 By default, Xcursor support will be compiled if
3474 available and the shared libraries are dynamically
3477 $XFN -no-xfixes ......... Do not compile Xfixes support.
3478 $XFY -xfixes ............ Compile Xfixes support.
3479 Requires X11/extensions/Xfixes.h and libXfixes.
3480 By default, Xfixes support will be compiled if
3481 available and the shared libraries are dynamically
3484 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3485 $XZY -xrandr ............ Compile Xrandr support.
3486 Requires X11/extensions/Xrandr.h and libXrandr.
3488 $XRN -no-xrender ........ Do not compile Xrender support.
3489 $XRY -xrender ........... Compile Xrender support.
3490 Requires X11/extensions/Xrender.h and libXrender.
3492 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3493 $XMY -mitshm ............ Compile MIT-SHM support.
3494 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3496 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3497 $FCGY -fontconfig ........ Compile FontConfig support.
3498 Requires fontconfig/fontconfig.h, libfontconfig,
3499 freetype.h and libfreetype.
3501 $XIN -no-xinput.......... Do not compile Xinput support.
3502 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3503 which requires IRIX with wacom.h and libXi or
3504 XFree86 with X11/extensions/XInput.h and libXi.
3506 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3507 $XKY -xkb ............... Compile XKB support.
3512 if [ "$PLATFORM_MAC" = "yes" ]; then
3517 -Fstring ........... Add an explicit framework path.
3518 -fw string ......... Add an explicit framework.
3520 -cocoa ............. Build the Cocoa version of Qt. Note that -no-framework
3521 and -static is not supported with -cocoa. Specifying
3522 this option creates Qt binaries that requires Mac OS X
3525 * -framework ......... Build Qt as a series of frameworks and
3526 link tools against those frameworks.
3527 -no-framework ...... Do not build Qt as a series of frameworks.
3529 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3530 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3532 -universal ......... Equivalent to -arch "ppc x86"
3534 -arch <arch> ....... Build Qt for <arch>
3535 Example values for <arch>: x86 ppc x86_64 ppc64
3536 Multiple -arch arguments can be specified, 64-bit archs
3537 will be built with the Cocoa framework.
3539 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3540 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3545 if [ "$PLATFORM_QWS" = "yes" ]; then
3548 Qt for Embedded Linux only:
3550 -xplatform target ... The target platform when cross-compiling.
3552 -no-feature-<feature> Do not compile in <feature>.
3553 -feature-<feature> .. Compile in <feature>. The available features
3554 are described in src/corelib/global/qfeatures.txt
3556 -embedded <arch> .... This will enable the embedded build, you must have a
3557 proper license for this switch to work.
3558 Example values for <arch>: arm mips x86 generic
3560 -armfpa ............. Target platform is uses the ARM-FPA floating point format.
3561 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3563 The floating point format is usually autodetected by configure. Use this
3564 to override the detected value.
3566 -little-endian ...... Target platform is little endian (LSB first).
3567 -big-endian ......... Target platform is big endian (MSB first).
3569 -host-little-endian . Host platform is little endian (LSB first).
3570 -host-big-endian .... Host platform is big endian (MSB first).
3572 You only need to specify the endianness when
3573 cross-compiling, otherwise the host
3574 endianness will be used.
3576 -no-freetype ........ Do not compile in Freetype2 support.
3577 -qt-freetype ........ Use the libfreetype bundled with Qt.
3578 * -system-freetype .... Use libfreetype from the operating system.
3579 See http://www.freetype.org/
3581 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3582 default ($CFG_QCONFIG).
3584 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3585 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3587 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3588 by default all available decorations are on.
3589 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3590 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3591 linked to at run time.
3592 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3593 -no-decoration-<style> ....Disable decoration <style> entirely.
3594 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3596 -no-opengl .......... Do not support OpenGL.
3597 -opengl <api> ....... Enable OpenGL ES support
3598 With no parameter, this will attempt to auto-detect OpenGL ES 1.x
3599 or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection.
3601 NOTE: A QGLScreen driver for the hardware is required to support
3602 OpenGL ES on Qt for Embedded Linux.
3604 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3605 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3606 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3607 linked to at run time.
3608 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3609 -no-gfx-<driver> ... Disable graphics <driver> entirely.
3610 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3612 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
3613 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3615 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
3617 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
3619 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
3620 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3622 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
3623 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3624 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
3626 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
3627 -no-mouse-<driver> ... Disable mouse <driver> entirely.
3628 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3630 -iwmmxt ............ Compile using the iWMMXt instruction set
3631 (available on some XScale CPUs).
3637 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3638 if [ "$CFG_GLIB" = "no" ]; then
3646 $GBN -no-glib ........... Do not compile Glib support.
3647 $GBY -glib .............. Compile Glib support.
3652 [ "x$ERROR" = "xyes" ] && exit 1
3657 # -----------------------------------------------------------------------------
3658 # LICENSING, INTERACTIVE PART
3659 # -----------------------------------------------------------------------------
3661 if [ "$PLATFORM_QWS" = "yes" ]; then
3662 Platform
="Qt for Embedded Linux"
3663 elif [ "$PLATFORM_MAC" = "yes" ]; then
3671 echo "This is the $Platform ${EditionString} Edition."
3674 if [ "$Edition" = "NokiaInternalBuild" ]; then
3675 echo "Detected -nokia-developer option"
3676 echo "Nokia employees and agents are allowed to use this software under"
3677 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
3678 elif [ "$Edition" = "OpenSource" ]; then
3680 echo "You are licensed to use this software under the terms of"
3681 echo "the GNU General Public License (GPL) versions 3."
3682 echo "You are also licensed to use this software under the terms of"
3683 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3686 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3687 echo "You have already accepted the terms of the $LicenseType license."
3690 echo "Type '3' to view the GNU General Public License version 3."
3691 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3692 echo "Type 'yes' to accept this license offer."
3693 echo "Type 'no' to decline this license offer."
3695 if echo '\c' |
grep '\c' >/dev
/null
; then
3696 echo -n "Do you accept the terms of $affix license? "
3698 echo "Do you accept the terms of $affix license? \c"
3703 if [ "$acceptance" = "yes" ]; then
3705 elif [ "$acceptance" = "no" ]; then
3706 echo "You are not licensed to use this software."
3709 elif [ "$acceptance" = "3" ]; then
3710 more "$relpath/LICENSE.GPL3"
3711 elif [ "$acceptance" = "L" ]; then
3712 more "$relpath/LICENSE.LGPL"
3715 elif [ "$Edition" = "Preview" ]; then
3716 TheLicense
=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3719 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3720 echo "You have already accepted the terms of the $LicenseType license."
3723 echo "You are licensed to use this software under the terms of"
3724 echo "the $TheLicense"
3726 echo "Type '?' to read the Preview License."
3727 echo "Type 'yes' to accept this license offer."
3728 echo "Type 'no' to decline this license offer."
3730 if echo '\c' |
grep '\c' >/dev
/null
; then
3731 echo -n "Do you accept the terms of the license? "
3733 echo "Do you accept the terms of the license? \c"
3738 if [ "$acceptance" = "yes" ]; then
3740 elif [ "$acceptance" = "no" ] ;then
3741 echo "You are not licensed to use this software."
3744 elif [ "$acceptance" = "?" ]; then
3745 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3748 elif [ "$Edition" != "OpenSource" ]; then
3749 if [ -n "$ExpiryDate" ]; then
3750 ExpiryDate
=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3751 [ -z "$ExpiryDate" ] && ExpiryDate
="0"
3752 Today
=`date +%Y%m%d`
3753 if [ "$Today" -gt "$ExpiryDate" ]; then
3754 case "$LicenseType" in
3755 Commercial|Academic|Educational
)
3756 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3758 echo "NOTICE NOTICE NOTICE NOTICE"
3760 echo " Your support and upgrade period has expired."
3762 echo " You are no longer licensed to use this version of Qt."
3763 echo " Please contact sales@trolltech.com to renew your support"
3764 echo " and upgrades for this license."
3766 echo "NOTICE NOTICE NOTICE NOTICE"
3771 echo "WARNING WARNING WARNING WARNING"
3773 echo " Your support and upgrade period has expired."
3775 echo " You may continue to use your last licensed release"
3776 echo " of Qt under the terms of your existing license"
3777 echo " agreement. But you are not entitled to technical"
3778 echo " support, nor are you entitled to use any more recent"
3779 echo " Qt releases."
3781 echo " Please contact sales@trolltech.com to renew your"
3782 echo " support and upgrades for this license."
3784 echo "WARNING WARNING WARNING WARNING"
3791 echo "NOTICE NOTICE NOTICE NOTICE"
3793 echo " Your Evaluation license has expired."
3795 echo " You are no longer licensed to use this software. Please"
3796 echo " contact sales@trolltech.com to purchase license, or install"
3797 echo " the Qt Open Source Edition if you intend to develop free"
3800 echo "NOTICE NOTICE NOTICE NOTICE"
3807 TheLicense
=`head -n 1 "$outpath/LICENSE"`
3809 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3810 echo "You have already accepted the terms of the $TheLicense."
3813 echo "You are licensed to use this software under the terms of"
3814 echo "the $TheLicense."
3816 echo "Type '?' to view the $TheLicense."
3817 echo "Type 'yes' to accept this license offer."
3818 echo "Type 'no' to decline this license offer."
3820 if echo '\c' |
grep '\c' >/dev
/null
; then
3821 echo -n "Do you accept the terms of the $TheLicense? "
3823 echo "Do you accept the terms of the $TheLicense? \c"
3828 if [ "$acceptance" = "yes" ]; then
3830 elif [ "$acceptance" = "no" ]; then
3831 echo "You are not licensed to use this software."
3834 else [ "$acceptance" = "?" ]
3835 more "$outpath/LICENSE"
3840 # this should be moved somewhere else
3843 AIX_VERSION
=`uname -v`
3844 if [ "$AIX_VERSION" -lt "5" ]; then
3845 QMakeVar add QMAKE_LIBS_X11
-lbind
3852 #-------------------------------------------------------------------------------
3853 # generate qconfig.cpp
3854 #-------------------------------------------------------------------------------
3855 [ -d "$outpath/src/corelib/global" ] || mkdir
-p "$outpath/src/corelib/global"
3857 LICENSE_USER_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
3858 LICENSE_PRODUCTS_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
3859 PREFIX_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
3860 DOCUMENTATION_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
3861 HEADERS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
3862 LIBRARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
3863 BINARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
3864 PLUGINS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
3865 DATA_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
3866 TRANSLATIONS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
3867 SETTINGS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
3868 EXAMPLES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
3869 DEMOS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
3871 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3873 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
3874 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
3877 if [ ! -z "$QT_HOST_PREFIX" ]; then
3878 HOSTPREFIX_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
3879 HOSTDOCUMENTATION_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
3880 HOSTHEADERS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
3881 HOSTLIBRARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
3882 HOSTBINARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
3883 HOSTPLUGINS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
3884 HOSTDATA_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
3885 HOSTTRANSLATIONS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
3886 HOSTSETTINGS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
3887 HOSTEXAMPLES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
3888 HOSTDEMOS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
3890 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3892 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
3893 /* Installation Info */
3894 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
3895 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
3896 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
3897 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
3898 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
3899 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
3900 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
3901 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
3902 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
3903 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
3904 static const char qt_configure_demos_path_str [256 + 12] = "$HOSTDEMOS_PATH_STR";
3905 #else // QT_BOOTSTRAPPED
3909 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3910 /* Installation Info */
3911 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
3912 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
3913 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
3914 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
3915 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
3916 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
3917 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
3918 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
3919 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
3920 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
3921 static const char qt_configure_demos_path_str [256 + 12] = "$DEMOS_PATH_STR";
3924 if [ ! -z "$QT_HOST_PREFIX" ]; then
3925 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3926 #endif // QT_BOOTSTRAPPED
3931 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3932 /* strlen( "qt_lcnsxxxx" ) == 12 */
3933 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3934 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3935 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
3936 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
3937 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
3938 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
3939 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
3940 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
3941 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
3942 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
3943 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3944 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
3945 #define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;
3948 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3949 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3950 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3952 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w
"$outpath/src/corelib/global/qconfig.cpp"
3953 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3954 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3957 # -----------------------------------------------------------------------------
3959 # -----------------------------------------------------------------------------
3962 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3964 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS
="$SYNCQT_OPTS -check-includes"
3965 if [ "$OPT_SHADOW" = "yes" ]; then
3966 "$outpath/bin/syncqt" $SYNCQT_OPTS
3967 elif [ "$CFG_DEV" = "yes" ]; then
3968 QTDIR
="$relpath" perl
"$outpath/bin/syncqt" $SYNCQT_OPTS
3973 # $2: optional transformation
3974 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3975 # is where the resulting variable is written to
3976 setBootstrapVariable
()
3978 variableRegExp
="^$1[^_A-Z0-9]"
3979 getQMakeConf |
grep "$variableRegExp" |
( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) |
$AWK '
3981 varLength = index($0, "=") - 1
3982 valStart = varLength + 2
3983 if (substr($0, varLength, 1) == "+") {
3984 varLength = varLength - 1
3985 valStart = valStart + 1
3987 var = substr($0, 0, varLength)
3988 gsub("[ \t]+", "", var)
3989 val = substr($0, valStart)
3990 printf "%s_%s = %s\n", var, NR, val
3993 if (length(var) > 0) {
3995 for (i = 1; i <= NR; ++i)
3996 printf " $(%s_%s)", var, i
4003 if true
; then ###[ '!' -f "$outpath/bin/qmake" ];
4004 echo "Creating qmake. Please wait..."
4007 QCONFIG_H
="$outpath/src/corelib/global/qconfig.h"
4008 QMAKE_QCONFIG_H
="${QCONFIG_H}.qmake"
4009 if [ -f "$QCONFIG_H" ]; then
4010 OLD_QCONFIG_H
=$QCONFIG_H
4011 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4014 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4015 # when building qmake, we use #defines for the install paths,
4016 # however they are real functions in the library
4017 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4018 mkdir
-p "$outpath/src/corelib/global"
4019 [ -f "$QCONFIG_H" ] && chmod +w
"$QCONFIG_H"
4020 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4023 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4024 for conf
in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
4025 if [ '!' -f "$conf" ]; then
4026 ln -s "$QCONFIG_H" "$conf"
4030 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4031 rm -f mkspecs
/default
4032 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs
/default
4034 for mkfile
in GNUmakefile Makefile
; do
4037 in_mkfile
="${mkfile}.in"
4038 if [ "$mkfile" = "Makefile" ]; then
4039 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4040 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4042 in_mkfile
="${mkfile}.unix"
4044 in_mkfile
="$relpath/qmake/$in_mkfile"
4045 mkfile
="$outpath/qmake/$mkfile"
4046 if [ -f "$mkfile" ]; then
4047 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags
>/dev
/null
2>&1 && chflags nouchg
"$mkfile"
4050 [ -f "$in_mkfile" ] ||
continue
4052 echo "########################################################################" >$mkfile
4053 echo "## This file was autogenerated by configure, all changes will be lost ##" >>$mkfile
4054 echo "########################################################################" >>$mkfile
4057 EXTRA_CFLAGS
="\$(QMAKE_CFLAGS)"
4058 EXTRA_CXXFLAGS
="\$(QMAKE_CXXFLAGS)"
4059 EXTRA_LFLAGS
="\$(QMAKE_LFLAGS)"
4061 if [ "$PLATFORM" = "irix-cc" ] ||
[ "$PLATFORM" = "irix-cc-64" ]; then
4062 EXTRA_LFLAGS
="$EXTRA_LFLAGS -lm"
4065 [ -n "$CC" ] && echo "CC = $CC" >>$mkfile
4066 [ -n "$CXX" ] && echo "CXX = $CXX" >>$mkfile
4067 if [ "$CFG_SILENT" = "yes" ]; then
4068 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC
's,QMAKE_CC.*=,CC=\@,'
4069 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX
's,QMAKE_CXX.*=,CXX=\@,'
4071 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC
's,QMAKE_CC,CC,'
4072 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX
's,QMAKE_CXX,CXX,'
4074 setBootstrapVariable QMAKE_CFLAGS
4075 setBootstrapVariable QMAKE_CXXFLAGS
's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4076 setBootstrapVariable QMAKE_LFLAGS
4078 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4079 EXTRA_CFLAGS
="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4080 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4082 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4083 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4084 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4085 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4086 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4087 elif [ "$CFG_DEBUG" = "yes" ]; then
4088 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4089 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4090 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4091 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4094 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
4095 setBootstrapVariable QMAKE_RPATH
's,\$\$LITERAL_WHITESPACE, ,'
4096 for rpath
in $RPATH_FLAGS; do
4097 EXTRA_LFLAGS
="\$(QMAKE_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4100 if [ "$PLATFORM_MAC" = "yes" ]; then
4101 if [ "$PLATFORM" = "macx-icc" ]; then
4102 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >>"$mkfile"
4104 echo "export MACOSX_DEPLOYMENT_TARGET = 10.3" >>"$mkfile"
4106 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4107 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4108 EXTRA_LFLAGS
="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4109 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4110 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4111 EXTRA_OBJS
="qsettings_mac.o qcore_mac.o"
4112 EXTRA_SRCS
="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4113 if echo "$CFG_MAC_ARCHS" |
grep x86
> /dev
/null
2>&1; then
4114 X86_CFLAGS
="-arch i386"
4115 X86_LFLAGS
="-arch i386"
4116 EXTRA_CFLAGS
="$X86_CFLAGS $EXTRA_CFLAGS"
4117 EXTRA_CXXFLAGS
="$X86_CFLAGS $EXTRA_CXXFLAGS"
4118 EXTRA_LFLAGS
="$EXTRA_LFLAGS $X86_LFLAGS"
4120 if echo "$CFG_MAC_ARCHS" |
grep ppc
> /dev
/null
2>&1; then
4121 PPC_CFLAGS
="-arch ppc"
4122 PPC_LFLAGS
="-arch ppc"
4123 EXTRA_CFLAGS
="$PPC_CFLAGS $EXTRA_CFLAGS"
4124 EXTRA_CXXFLAGS
="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4125 EXTRA_LFLAGS
="$EXTRA_LFLAGS $PPC_LFLAGS"
4127 if [ '!' -z "$CFG_SDK" ]; then
4128 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4129 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4130 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4131 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4132 EXTRA_LFLAGS
="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4135 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS
="$EXTRA_CFLAGS -DQWS"
4136 if [ '!' -z "$D_FLAGS" ]; then
4137 for DEF
in $D_FLAGS; do
4138 EXTRA_CFLAGS
="$EXTRA_CFLAGS \"-D${DEF}\""
4141 QMAKE_BIN_DIR
="$QT_INSTALL_BINS"
4142 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR
="${QT_INSTALL_PREFIX}/bin"
4143 QMAKE_DATA_DIR
="$QT_INSTALL_DATA"
4144 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR
="${QT_INSTALL_PREFIX}"
4146 adjrelpath
=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4147 adjoutpath
=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4148 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4149 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4150 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4151 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4152 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4153 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4154 -e "s,@QMAKESPEC@,$QMAKESPEC,g" "$in_mkfile" >>"$mkfile"
4156 if "$WHICH" makedepend
>/dev
/null
2>&1 && grep 'depend:' "$mkfile" >/dev
/null
2>&1; then
4157 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend
) >/dev
/null
2>&1
4158 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"${mkfile}.tmp"
4159 mv "${mkfile}.tmp" "${mkfile}"
4163 QMAKE_BUILD_ERROR
=no
4164 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR
=yes
4165 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4166 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4167 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4170 #-------------------------------------------------------------------------------
4171 # tests that need qmake
4172 #-------------------------------------------------------------------------------
4174 # detect availability of float math.h functions
4175 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/floatmath
"floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4176 CFG_USE_FLOATMATH
=yes
4178 CFG_USE_FLOATMATH
=no
4181 # detect mmx support
4182 if [ "${CFG_MMX}" = "auto" ]; then
4183 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mmx
"mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4190 # detect 3dnow support
4191 if [ "${CFG_3DNOW}" = "auto" ]; then
4192 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/3dnow
"3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4199 # detect sse support
4200 if [ "${CFG_SSE}" = "auto" ]; then
4201 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sse
"sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4208 # detect sse2 support
4209 if [ "${CFG_SSE2}" = "auto" ]; then
4210 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sse2
"sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4217 # check iWMMXt support
4218 if [ "$CFG_IWMMXT" = "yes" ]; then
4219 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/iwmmxt
"iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"; then
4220 echo "The iWMMXt functionality test failed!"
4221 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4227 if [ "$CFG_ZLIB" = "no" ]; then
4228 # Note: Qt no longer support builds without zlib
4229 # So we force a "no" to be "auto" here.
4230 # If you REALLY really need no zlib support, you can still disable
4231 # it by doing the following:
4232 # add "no-zlib" to mkspecs/qconfig.pri
4233 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4235 # There's no guarantee that Qt will build under those conditions
4240 if [ "$CFG_ZLIB" = "auto" ]; then
4241 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/zlib
"zlib" $L_FLAGS $I_FLAGS $l_FLAGS; then
4248 # detect how jpeg should be built
4249 if [ "$CFG_JPEG" = "auto" ]; then
4250 if [ "$CFG_SHARED" = "yes" ]; then
4257 if [ "$CFG_LIBJPEG" = "auto" ]; then
4258 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/libjpeg
"libjpeg" $L_FLAGS $I_FLAGS $l_FLAGS; then
4265 # detect how gif should be built
4266 if [ "$CFG_GIF" = "auto" ]; then
4267 if [ "$CFG_SHARED" = "yes" ]; then
4274 # detect how tiff should be built
4275 if [ "$CFG_TIFF" = "auto" ]; then
4276 if [ "$CFG_SHARED" = "yes" ]; then
4284 if [ "$CFG_LIBTIFF" = "auto" ]; then
4285 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/libtiff
"libtiff" $L_FLAGS $I_FLAGS $l_FLAGS; then
4292 # detect how mng should be built
4293 if [ "$CFG_MNG" = "auto" ]; then
4294 if [ "$CFG_SHARED" = "yes" ]; then
4301 if [ "$CFG_LIBMNG" = "auto" ]; then
4302 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/libmng
"libmng" $L_FLAGS $I_FLAGS $l_FLAGS; then
4310 if [ "$CFG_LIBPNG" = "auto" ]; then
4311 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/libpng
"libpng" $L_FLAGS $I_FLAGS $l_FLAGS; then
4318 # detect accessibility
4319 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4320 CFG_ACCESSIBILITY
=yes
4323 # auto-detect SQL-modules support
4324 for _SQLDR
in $CFG_SQL_AVAILABLE; do
4327 if [ "$CFG_SQL_mysql" != "no" ]; then
4328 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG
=`$WHICH mysql_config`
4329 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4330 QT_CFLAGS_MYSQL
=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4331 QT_LFLAGS_MYSQL_R
=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4332 QT_LFLAGS_MYSQL
=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4333 QT_MYSQL_VERSION
=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4334 QT_MYSQL_VERSION_MAJOR
=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4336 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4337 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4338 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4339 echo " You need MySql 4 or higher."
4340 echo " If you believe this message is in error you may use the continue"
4341 echo " switch (-continue) to $0 to continue."
4346 QT_LFLAGS_MYSQL_R
=""
4350 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; then
4351 QMakeVar add CONFIG use_libmysqlclient_r
4352 if [ "$CFG_SQL_mysql" = "auto" ]; then
4353 CFG_SQL_mysql
=plugin
4355 QT_LFLAGS_MYSQL
="$QT_LFLAGS_MYSQL_R"
4356 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; then
4357 if [ "$CFG_SQL_mysql" = "auto" ]; then
4358 CFG_SQL_mysql
=plugin
4361 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4362 echo "MySQL support cannot be enabled due to functionality tests!"
4363 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4364 echo " If you believe this message is in error you may use the continue"
4365 echo " switch (-continue) to $0 to continue."
4370 QT_LFLAGS_MYSQL_R
=""
4378 if [ "$CFG_SQL_psql" != "no" ]; then
4379 if "$WHICH" pg_config
>/dev
/null
2>&1; then
4380 QT_CFLAGS_PSQL
=`pg_config --includedir 2>/dev/null`
4381 QT_LFLAGS_PSQL
=`pg_config --libdir 2>/dev/null`
4383 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL
="-I$QT_CFLAGS_PSQL"
4384 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL
="-L$QT_LFLAGS_PSQL"
4385 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; then
4386 if [ "$CFG_SQL_psql" = "auto" ]; then
4390 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4391 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4392 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4393 echo " If you believe this message is in error you may use the continue"
4394 echo " switch (-continue) to $0 to continue."
4405 if [ "$CFG_SQL_odbc" != "no" ]; then
4406 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/odbc
"ODBC" $L_FLAGS $I_FLAGS $l_FLAGS; then
4407 if [ "$CFG_SQL_odbc" = "auto" ]; then
4411 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4412 echo "ODBC support cannot be enabled due to functionality tests!"
4413 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4414 echo " If you believe this message is in error you may use the continue"
4415 echo " switch (-continue) to $0 to continue."
4424 if [ "$CFG_SQL_oci" != "no" ]; then
4425 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/oci
"OCI" $L_FLAGS $I_FLAGS $l_FLAGS; then
4426 if [ "$CFG_SQL_oci" = "auto" ]; then
4430 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4431 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4432 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4433 echo " If you believe this message is in error you may use the continue"
4434 echo " switch (-continue) to $0 to continue."
4443 if [ "$CFG_SQL_tds" != "no" ]; then
4444 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/tds
"TDS" $L_FLAGS $I_FLAGS $l_FLAGS; then
4445 if [ "$CFG_SQL_tds" = "auto" ]; then
4449 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4450 echo "TDS 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."
4462 if [ "$CFG_SQL_db2" != "no" ]; then
4463 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/db2
"DB2" $L_FLAGS $I_FLAGS $l_FLAGS; then
4464 if [ "$CFG_SQL_db2" = "auto" ]; then
4468 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4469 echo "ODBC support cannot be enabled due to functionality tests!"
4470 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4471 echo " If you believe this message is in error you may use the continue"
4472 echo " switch (-continue) to $0 to continue."
4481 if [ "$CFG_SQL_ibase" != "no" ]; then
4482 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/ibase
"InterBase" $L_FLAGS $I_FLAGS $l_FLAGS; then
4483 if [ "$CFG_SQL_ibase" = "auto" ]; then
4484 CFG_SQL_ibase
=plugin
4487 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4488 echo "InterBase support cannot be enabled due to functionality tests!"
4489 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4490 echo " If you believe this message is in error you may use the continue"
4491 echo " switch (-continue) to $0 to continue."
4500 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4501 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sqlite2
"SQLite2" $L_FLAGS $I_FLAGS $l_FLAGS; then
4502 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4503 CFG_SQL_sqlite2
=plugin
4506 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4507 echo "SQLite2 support cannot be enabled due to functionality tests!"
4508 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4509 echo " If you believe this message is in error you may use the continue"
4510 echo " switch (-continue) to $0 to continue."
4519 if [ "$CFG_SQL_sqlite" != "no" ]; then
4520 SQLITE_AUTODETECT_FAILED
="no"
4521 if [ "$CFG_SQLITE" = "system" ]; then
4522 if [ -n "$PKG_CONFIG" ]; then
4523 QT_CFLAGS_SQLITE
=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4524 QT_LFLAGS_SQLITE
=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4526 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; then
4527 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4528 CFG_SQL_sqlite
=plugin
4530 QMAKE_CONFIG
="$QMAKE_CONFIG system-sqlite"
4532 SQLITE_AUTODETECT_FAILED
="yes"
4535 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4536 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4537 CFG_SQL_sqlite
=plugin
4540 SQLITE_AUTODETECT_FAILED
="yes"
4544 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4545 echo "SQLite support cannot be enabled due to functionality tests!"
4546 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4547 echo " If you believe this message is in error you may use the continue"
4548 echo " switch (-continue) to $0 to continue."
4554 if [ "$OPT_VERBOSE" = "yes" ]; then
4555 echo "unknown SQL driver: $_SQLDR"
4561 # auto-detect NIS support
4562 if [ "$CFG_NIS" != "no" ]; then
4563 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/nis
"NIS" $L_FLAGS $I_FLAGS $l_FLAGS; then
4566 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4567 echo "NIS support cannot be enabled due to functionality tests!"
4568 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4569 echo " If you believe this message is in error you may use the continue"
4570 echo " switch (-continue) to $0 to continue."
4578 # auto-detect CUPS support
4579 if [ "$CFG_CUPS" != "no" ]; then
4580 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/cups
"Cups" $L_FLAGS $I_FLAGS $l_FLAGS; then
4583 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4584 echo "Cups 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."
4595 # auto-detect iconv(3) support
4596 if [ "$CFG_ICONV" != "no" ]; then
4597 if [ "$PLATFORM_QWS" = "yes" ]; then
4599 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/iconv" "POSIX iconv" $L_FLAGS $I_FLAGS $l_FLAGS; then
4601 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/gnu-libiconv" "GNU libiconv" $L_FLAGS $I_FLAGS $l_FLAGS; then
4604 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4605 echo "Iconv support cannot be enabled due to functionality tests!"
4606 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4607 echo " If you believe this message is in error you may use the continue"
4608 echo " switch (-continue) to $0 to continue."
4616 # auto-detect libdbus-1 support
4617 if [ "$CFG_DBUS" != "no" ]; then
4618 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1
2>/dev
/null
; then
4619 QT_CFLAGS_DBUS
=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4620 QT_LIBS_DBUS
=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4622 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; then
4623 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS
=yes
4624 QMakeVar
set QT_CFLAGS_DBUS
"$QT_CFLAGS_DBUS"
4625 QMakeVar
set QT_LIBS_DBUS
"$QT_LIBS_DBUS"
4627 if [ "$CFG_DBUS" = "auto" ]; then
4629 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4630 # CFG_DBUS is "yes" or "linked" here
4632 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4633 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4634 echo " If you believe this message is in error you may use the continue"
4635 echo " switch (-continue) to $0 to continue."
4641 # Generate a CRC of the namespace for using in constants for the Carbon port.
4642 # This should mean that you really *can* load two Qt's and have our custom
4643 # Carbon events work.
4644 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
4645 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`
4648 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
4649 # auto-detect Glib support
4650 if [ "$CFG_GLIB" != "no" ]; then
4651 if [ -n "$PKG_CONFIG" ]; then
4652 QT_CFLAGS_GLIB
=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4653 QT_LIBS_GLIB
=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4655 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
4657 QMakeVar
set QT_CFLAGS_GLIB
"$QT_CFLAGS_GLIB"
4658 QMakeVar
set QT_LIBS_GLIB
"$QT_LIBS_GLIB"
4660 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4661 echo "Glib support cannot be enabled due to functionality tests!"
4662 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4663 echo " If you believe this message is in error you may use the continue"
4664 echo " switch (-continue) to $0 to continue."
4672 if [ "$CFG_PHONON" != "no" ]; then
4673 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
4674 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4675 if [ -n "$PKG_CONFIG" ]; then
4676 QT_CFLAGS_GSTREAMER
=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4677 QT_LIBS_GSTREAMER
=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4679 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
4681 QMakeVar
set QT_CFLAGS_GSTREAMER
"$QT_CFLAGS_GSTREAMER"
4682 QMakeVar
set QT_LIBS_GSTREAMER
"$QT_LIBS_GSTREAMER"
4684 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4685 echo "Gstreamer support cannot be enabled due to functionality tests!"
4686 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4687 echo " If you believe this message is in error you may use the continue"
4688 echo " switch (-continue) to $0 to continue."
4694 elif [ "$CFG_GLIB" = "no" ]; then
4698 if [ "$CFG_GSTREAMER" = "yes" ]; then
4701 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4702 echo "Phonon support cannot be enabled due to functionality tests!"
4703 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4704 echo " If you believe this message is in error you may use the continue"
4705 echo " switch (-continue) to $0 to continue."
4718 if [ "$PLATFORM_X11" = "yes" ]; then
4719 x11tests
="$relpath/config.tests/x11"
4722 # work around broken X11 headers when using GCC 2.95 or later
4724 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE
=yes
4725 if [ $NOTYPE = "yes" ]; then
4726 QMakeVar add QMAKE_CXXFLAGS
-fpermissive
4727 X11TESTS_FLAGS
="$X11TESTS_FLAGS -fpermissive"
4730 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
4731 if [ "$CFG_OPENGL" = "auto" ] ||
[ "$CFG_OPENGL" = "yes" ]; then
4732 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
4734 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
4736 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
4738 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
4741 if [ "$CFG_OPENGL" = "yes" ]; then
4742 echo "All the OpenGL functionality tests failed!"
4743 echo " You might need to modify the include and library search paths by editing"
4744 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4745 echo " ${XQMAKESPEC}."
4752 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4753 if [ "$CFG_OPENGL" = "desktop" ]; then
4754 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/glxfbconfig
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4755 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4762 elif [ "$CFG_OPENGL" = "es1cl" ]; then
4763 # OpenGL ES 1.x common lite
4764 if ! "$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
4765 echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
4766 echo " You might need to modify the include and library search paths by editing"
4767 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4768 echo " ${XQMAKESPEC}."
4771 elif [ "$CFG_OPENGL" = "es1" ]; then
4773 if ! "$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
4774 echo "The OpenGL ES 1.x functionality test failed!"
4775 echo " You might need to modify the include and library search paths by editing"
4776 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4777 echo " ${XQMAKESPEC}."
4780 elif [ "$CFG_OPENGL" = "es2" ]; then
4782 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
4783 echo "The OpenGL ES 2.0 functionality test failed!"
4784 echo " You might need to modify the include and library search paths by editing"
4785 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4786 echo " ${XQMAKESPEC}."
4789 elif [ "$CFG_OPENGL" = "desktop" ]; then
4790 # Desktop OpenGL support
4791 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
4792 echo "The OpenGL functionality test failed!"
4793 echo " You might need to modify the include and library search paths by editing"
4794 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4795 echo " ${XQMAKESPEC}."
4800 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4801 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/glxfbconfig
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4802 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4810 # if opengl is disabled and the user specified graphicssystem gl, disable it...
4811 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
4812 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
4813 CFG_GRAPHICS_SYSTEM
=default
4816 # auto-detect Xcursor support
4817 if [ "$CFG_XCURSOR" != "no" ]; then
4818 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
4819 if [ "$CFG_XCURSOR" != "runtime" ]; then
4823 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4824 echo "Xcursor support cannot be enabled due to functionality tests!"
4825 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4826 echo " If you believe this message is in error you may use the continue"
4827 echo " switch (-continue) to $0 to continue."
4835 # auto-detect Xfixes support
4836 if [ "$CFG_XFIXES" != "no" ]; then
4837 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xfixes
"Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4838 if [ "$CFG_XFIXES" != "runtime" ]; then
4842 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4843 echo "Xfixes support cannot be enabled due to functionality tests!"
4844 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4845 echo " If you believe this message is in error you may use the continue"
4846 echo " switch (-continue) to $0 to continue."
4854 # auto-detect Xrandr support (resize and rotate extension)
4855 if [ "$CFG_XRANDR" != "no" ]; then
4856 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
4857 if [ "$CFG_XRANDR" != "runtime" ]; then
4861 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4862 echo "Xrandr support cannot be enabled due to functionality tests!"
4863 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4864 echo " If you believe this message is in error you may use the continue"
4865 echo " switch (-continue) to $0 to continue."
4873 # auto-detect Xrender support
4874 if [ "$CFG_XRENDER" != "no" ]; then
4875 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
4878 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4879 echo "Xrender support cannot be enabled due to functionality tests!"
4880 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4881 echo " If you believe this message is in error you may use the continue"
4882 echo " switch (-continue) to $0 to continue."
4890 # auto-detect MIT-SHM support
4891 if [ "$CFG_MITSHM" != "no" ]; then
4892 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
4895 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4896 echo "MITSHM support cannot be enabled due to functionality tests!"
4897 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4898 echo " If you believe this message is in error you may use the continue"
4899 echo " switch (-continue) to $0 to continue."
4907 # auto-detect FontConfig support
4908 if [ "$CFG_FONTCONFIG" != "no" ]; then
4909 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig
2>/dev
/null
; then
4910 QT_CFLAGS_FONTCONFIG
=`$PKG_CONFIG --cflags fontconfig 2>/dev/null`
4911 QT_LIBS_FONTCONFIG
=`$PKG_CONFIG --libs fontconfig 2>/dev/null`
4913 QT_CFLAGS_FONTCONFIG
=
4914 QT_LIBS_FONTCONFIG
="-lfreetype -lfontconfig"
4916 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
4918 QMakeVar
set QMAKE_CFLAGS_X11
"$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
4919 QMakeVar
set QMAKE_LIBS_X11
"$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
4920 CFG_LIBFREETYPE
=system
4922 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4923 echo "FontConfig support cannot be enabled due to functionality tests!"
4924 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4925 echo " If you believe this message is in error you may use the continue"
4926 echo " switch (-continue) to $0 to continue."
4934 # auto-detect Session Management support
4935 if [ "$CFG_SM" = "auto" ]; then
4936 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
4939 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4940 echo "Session Management support cannot be enabled due to functionality tests!"
4941 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4942 echo " If you believe this message is in error you may use the continue"
4943 echo " switch (-continue) to $0 to continue."
4951 # auto-detect SHAPE support
4952 if [ "$CFG_XSHAPE" != "no" ]; then
4953 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
4956 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4957 echo "XShape support cannot be enabled due to functionality tests!"
4958 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4959 echo " If you believe this message is in error you may use the continue"
4960 echo " switch (-continue) to $0 to continue."
4968 # auto-detect Xinerama support
4969 if [ "$CFG_XINERAMA" != "no" ]; then
4970 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
4971 if [ "$CFG_XINERAMA" != "runtime" ]; then
4975 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4976 echo "Xinerama support cannot be enabled due to functionality tests!"
4977 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4978 echo " If you believe this message is in error you may use the continue"
4979 echo " switch (-continue) to $0 to continue."
4987 # auto-detect Xinput support
4988 if [ "$CFG_XINPUT" != "no" ]; then
4989 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
4990 if [ "$CFG_XINPUT" != "runtime" ]; then
4994 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4995 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
4996 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4997 echo " If you believe this message is in error you may use the continue"
4998 echo " switch (-continue) to $0 to continue."
5006 # auto-detect XKB support
5007 if [ "$CFG_XKB" != "no" ]; then
5008 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
5011 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5012 echo "XKB support cannot be enabled due to functionality tests!"
5013 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5014 echo " If you believe this message is in error you may use the continue"
5015 echo " switch (-continue) to $0 to continue."
5023 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5024 if [ -n "$PKG_CONFIG" ]; then
5025 QT_CFLAGS_QGTKSTYLE
=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5026 QT_LIBS_QGTKSTYLE
=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5028 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5030 QMakeVar
set QT_CFLAGS_QGTKSTYLE
"$QT_CFLAGS_QGTKSTYLE"
5031 QMakeVar
set QT_LIBS_QGTKSTYLE
"$QT_LIBS_QGTKSTYLE"
5033 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5034 echo "Gtk theme support cannot be enabled due to functionality tests!"
5035 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5036 echo " If you believe this message is in error you may use the continue"
5037 echo " switch (-continue) to $0 to continue."
5043 elif [ "$CFG_GLIB" = "no" ]; then
5049 if [ "$PLATFORM_MAC" = "yes" ]; then
5050 if [ "$CFG_PHONON" != "no" ]; then
5051 # Always enable Phonon (unless it was explicitly disabled)
5057 if [ "$PLATFORM_QWS" = "yes" ]; then
5059 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5060 if [ "$CFG_OPENGL" = "yes" ]; then
5061 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
5063 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
5065 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
5068 echo "All the OpenGL ES functionality tests failed!"
5069 echo " You might need to modify the include and library search paths by editing"
5070 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5071 echo " ${XQMAKESPEC}."
5074 elif [ "$CFG_OPENGL" = "es1" ]; then
5076 if ! "$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
5077 echo "The OpenGL ES 1.x functionality test failed!"
5078 echo " You might need to modify the include and library search paths by editing"
5079 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5080 echo " ${XQMAKESPEC}."
5083 elif [ "$CFG_OPENGL" = "es2" ]; then
5085 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
5086 echo "The OpenGL ES 2.0 functionality test failed!"
5087 echo " You might need to modify the include and library search paths by editing"
5088 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5089 echo " ${XQMAKESPEC}."
5092 elif [ "$CFG_OPENGL" = "desktop" ]; then
5093 # Desktop OpenGL support
5094 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5099 for screen
in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5100 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5101 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/ahi
"Ahi" $L_FLAGS $I_FLAGS $l_FLAGS; then
5102 echo "The Ahi screen driver functionality test failed!"
5103 echo " You might need to modify the include and library search paths by editing"
5104 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5105 echo " ${XQMAKESPEC}."
5110 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5111 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/svgalib
"SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS; then
5112 echo "The SVGAlib screen driver functionality test failed!"
5113 echo " You might need to modify the include and library search paths by editing"
5114 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5115 echo " ${XQMAKESPEC}."
5120 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5121 if [ -n "$PKG_CONFIG" ]; then
5122 if $PKG_CONFIG --exists directfb
2>/dev
/null
; then
5123 QT_CFLAGS_DIRECTFB
=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5124 QT_LIBS_DIRECTFB
=`$PKG_CONFIG --libs directfb 2>/dev/null`
5125 elif directfb-config
--version >/dev
/null
2>&1; then
5126 QT_CFLAGS_DIRECTFB
=`directfb-config --cflags 2>/dev/null`
5127 QT_LIBS_DIRECTFB
=`directfb-config --libs 2>/dev/null`
5131 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5132 if [ -n "$QT_CFLAGS_DIRECTFB" ] ||
[ -n "$QT_LIBS_DIRECTFB" ]; then
5133 QMakeVar
set QT_CFLAGS_DIRECTFB
"$QT_CFLAGS_DIRECTFB"
5134 QMakeVar
set QT_LIBS_DIRECTFB
"$QT_LIBS_DIRECTFB"
5137 if ! "$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; then
5138 echo "The DirectFB screen driver functionality test failed!"
5139 echo " You might need to modify the include and library search paths by editing"
5140 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5141 echo " ${XQMAKESPEC}."
5149 for mouse
in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5150 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5151 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/tslib
"tslib" $L_FLAGS $I_FLAGS $l_FLAGS; then
5152 echo "The tslib functionality test failed!"
5153 echo " You might need to modify the include and library search paths by editing"
5154 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5155 echo " ${XQMAKESPEC}."
5164 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/sound
"sound" $L_FLAGS $I_FLAGS $l_FLAGS; then
5165 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SOUND"
5171 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE
="$CFG_QWS_FREETYPE"
5172 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE
=no
5173 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5174 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/freetype
"FreeType" $L_FLAGS $I_FLAGS $l_FLAGS ; then
5175 CFG_LIBFREETYPE
=system
5181 if [ "$CFG_ENDIAN" = "auto" ]; then
5182 if [ "$PLATFORM_MAC" = "yes" ]; then
5185 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5187 if [ "$F" -eq 0 ]; then
5188 CFG_ENDIAN
="Q_LITTLE_ENDIAN"
5189 elif [ "$F" -eq 1 ]; then
5190 CFG_ENDIAN
="Q_BIG_ENDIAN"
5193 echo "The target system byte order could not be detected!"
5194 echo "Turn on verbose messaging (-v) to see the final report."
5195 echo "You can use the -little-endian or -big-endian switch to"
5196 echo "$0 to continue."
5202 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5203 if [ "$PLATFORM_MAC" = "yes" ]; then
5206 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5208 if [ "$F" -eq 0 ]; then
5209 CFG_HOST_ENDIAN
="Q_LITTLE_ENDIAN"
5210 elif [ "$F" -eq 1 ]; then
5211 CFG_HOST_ENDIAN
="Q_BIG_ENDIAN"
5214 echo "The host system byte order could not be detected!"
5215 echo "Turn on verbose messaging (-v) to see the final report."
5216 echo "You can use the -host-little-endian or -host-big-endian switch to"
5217 echo "$0 to continue."
5223 if [ "$CFG_ARMFPA" != "auto" ]; then
5224 if [ "$CFG_ARMFPA" = "yes" ]; then
5225 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5226 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5228 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5231 CFG_DOUBLEFORMAT
="normal"
5236 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5237 if [ "$PLATFORM_QWS" != "yes" ]; then
5238 CFG_DOUBLEFORMAT
=normal
5240 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5242 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5243 CFG_DOUBLEFORMAT
=normal
5244 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
5245 CFG_DOUBLEFORMAT
=normal
5246 elif [ "$F" -eq 10 ]; then
5247 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE"
5248 elif [ "$F" -eq 11 ]; then
5249 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG"
5250 elif [ "$F" -eq 12 ]; then
5251 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5253 elif [ "$F" -eq 13 ]; then
5254 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5258 echo "The system floating point format could not be detected."
5259 echo "This may cause data to be generated in a wrong format"
5260 echo "Turn on verbose messaging (-v) to see the final report."
5261 # we do not fail on this since this is a new test, and if it fails,
5262 # the old behavior should be correct in most cases
5263 CFG_DOUBLEFORMAT
=normal
5269 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stl
"STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5273 if [ "$CFG_STL" != "no" ]; then
5274 if [ "$HAVE_STL" = "yes" ]; then
5277 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5278 echo "STL support cannot be enabled due to functionality tests!"
5279 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5280 echo " If you believe this message is in error you may use the continue"
5281 echo " switch (-continue) to $0 to continue."
5289 # find if the platform supports IPv6
5290 if [ "$CFG_IPV6" != "no" ]; then
5291 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/ipv6
"IPv6" $L_FLAGS $I_FLAGS $l_FLAGS; then
5294 if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5295 echo "IPv6 support cannot be enabled due to functionality tests!"
5296 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5297 echo " If you believe this message is in error you may use the continue"
5298 echo " switch (-continue) to $0 to continue."
5306 # detect POSIX clock_gettime()
5307 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5308 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
5309 CFG_CLOCK_GETTIME
=yes
5311 CFG_CLOCK_GETTIME
=no
5315 # detect POSIX monotonic clocks
5316 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5317 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
5318 CFG_CLOCK_MONOTONIC
=yes
5320 CFG_CLOCK_MONOTONIC
=no
5322 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5323 CFG_CLOCK_MONOTONIC
=no
5327 if [ "$CFG_MREMAP" = "auto" ]; then
5328 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mremap
"mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5335 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5336 if [ "$CFG_GETADDRINFO" != "no" ]; then
5337 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getaddrinfo
"getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5340 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5341 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5342 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5343 echo " If you believe this message is in error you may use the continue"
5344 echo " switch (-continue) to $0 to continue."
5352 # find if the platform provides inotify
5353 if [ "$CFG_INOTIFY" != "no" ]; then
5354 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/inotify
"inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5357 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5358 echo "inotify support cannot be enabled due to functionality tests!"
5359 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5360 echo " If you believe this message is in error you may use the continue"
5361 echo " switch (-continue) to $0 to continue."
5369 # find if the platform provides if_nametoindex (ipv6 interface name support)
5370 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5371 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
5374 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5375 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5376 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5377 echo " If you believe this message is in error you may use the continue"
5378 echo " switch (-continue) to $0 to continue."
5386 # find if the platform provides getifaddrs (network interface enumeration)
5387 if [ "$CFG_GETIFADDRS" != "no" ]; then
5388 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getifaddrs
"getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5391 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5392 echo "getifaddrs support cannot be enabled due to functionality tests!"
5393 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5394 echo " If you believe this message is in error you may use the continue"
5395 echo " switch (-continue) to $0 to continue."
5403 # find if the platform supports X/Open Large File compilation environment
5404 if [ "$CFG_LARGEFILE" != "no" ]; then
5405 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
5408 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5409 echo "X/Open Large File support cannot be enabled due to functionality tests!"
5410 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5411 echo " If you believe this message is in error you may use the continue"
5412 echo " switch (-continue) to $0 to continue."
5421 if [ "$CFG_OPENSSL" != "no" ]; then
5422 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/openssl
"OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5423 if [ "$CFG_OPENSSL" = "auto" ]; then
5427 if ( [ "$CFG_OPENSSL" = "yes" ] ||
[ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5428 echo "OpenSSL support cannot be enabled due to functionality tests!"
5429 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5430 echo " If you believe this message is in error you may use the continue"
5431 echo " switch (-continue) to $0 to continue."
5439 if [ "$CFG_PTMALLOC" != "no" ]; then
5440 # build ptmalloc, copy .a file to lib/
5441 echo "Building ptmalloc. Please wait..."
5442 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
5443 mkdir
"$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
5445 QMakeVar add QMAKE_LFLAGS
"$outpath/lib/libptmalloc3.a"
5448 #-------------------------------------------------------------------------------
5449 # ask for all that hasn't been auto-detected or specified in the arguments
5450 #-------------------------------------------------------------------------------
5452 ### fix this: user input should be validated in a loop
5453 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PLATFORM_QWS" = "yes" ]; then
5455 echo "Choose pixel-depths to support:"
5457 echo " 1. 1bpp, black/white"
5458 echo " 4. 4bpp, grayscale"
5459 echo " 8. 8bpp, paletted"
5460 echo " 12. 12bpp, rgb 4-4-4"
5461 echo " 15. 15bpp, rgb 5-5-5"
5462 echo " 16. 16bpp, rgb 5-6-5"
5463 echo " 18. 18bpp, rgb 6-6-6"
5464 echo " 24. 24bpp, rgb 8-8-8"
5465 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
5466 echo " all. All supported depths"
5468 echo "Your choices (default 8,16,32):"
5470 if [ -z "$CFG_QWS_DEPTHS" ] ||
[ "$CFG_QWS_DEPTHS" = "yes" ]; then
5471 CFG_QWS_DEPTHS
=8,16,32
5474 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
5475 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
5476 CFG_QWS_DEPTHS
="1 4 8 12 15 16 18 24 32 generic"
5478 for D
in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
5480 1|
4|
8|
12|
15|
16|
18|
24|
32) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
5481 generic
) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
5486 # enable dwarf2 support on Mac
5487 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5488 QT_CONFIG
="$QT_CONFIG dwarf2"
5491 # Set the default arch. Select 32-bit/carbon if nothing else has
5492 # been specified on the configure line.
5493 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" == "" ]; then
5494 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
5496 if [ "$QT_MAC_DEFUALT_ARCH" == "x86_64" ]; then
5497 CFG_MAC_ARCHS
=" x86"
5498 elif [ "$QT_MAC_DEFUALT_ARCH" == "ppc64" ]; then
5499 CFG_MAC_ARCHS
=" ppc"
5501 CFG_MAC_ARCHS
=" $QT_MAC_DEFUALT_ARCH"
5504 [ "$OPT_VERBOSE" == "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
5507 # enable cocoa and/or carbon on Mac
5508 if [ "$CFG_MAC_COCOA" = "yes" ]; then
5509 # -cocoa on the command line disables carbon completely (i.e. use cocoa for 32-bit as well)
5512 # check which archs are in use, enable cocoa if we find a 64-bit one
5513 if echo "$CFG_MAC_ARCHS" |
grep 64 > /dev
/null
2>&1; then
5514 CFG_MAC_COCOA
="yes";
5515 CFG_MAC_CARBON
="no";
5516 if echo "$CFG_MAC_ARCHS" |
grep -w ppc
> /dev
/null
2>&1; then
5517 CFG_MAC_CARBON
="yes";
5519 if echo "$CFG_MAC_ARCHS" |
grep -w x86
> /dev
/null
2>&1; then
5520 CFG_MAC_CARBON
="yes";
5523 # no 64-bit archs found.
5528 # set the global Mac deployment target. This is overridden on an arch-by-arch basis
5529 # in some cases, see code further down
5530 case "$PLATFORM,$CFG_MAC_COCOA" in
5533 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.5
5538 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.4
5542 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.3
5546 # enable Qt 3 support functionality
5547 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5548 QT_CONFIG
="$QT_CONFIG qt3support"
5552 if [ "$CFG_PHONON" = "yes" ]; then
5553 QT_CONFIG
="$QT_CONFIG phonon"
5554 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5555 QT_CONFIG
="$QT_CONFIG phonon-backend"
5558 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_PHONON"
5561 # disable accessibility
5562 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5563 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5565 QT_CONFIG
="$QT_CONFIG accessibility"
5569 if [ "$CFG_OPENGL" = "no" ]; then
5570 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENGL"
5572 QT_CONFIG
="$QT_CONFIG opengl"
5575 if [ "$CFG_OPENGL" = "es1" ] ||
[ "$CFG_OPENGL" = "es1cl" ] ||
[ "$CFG_OPENGL" = "es2" ]; then
5576 if [ "$PLATFORM_QWS" = "yes" ]; then
5577 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
5578 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_USE_EGLWINDOWSURFACE"
5580 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES"
5583 if [ "$CFG_OPENGL" = "es1" ]; then
5584 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1"
5585 QT_CONFIG
="$QT_CONFIG opengles1"
5588 if [ "$CFG_OPENGL" = "es1cl" ]; then
5589 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1_CL"
5590 QT_CONFIG
="$QT_CONFIG opengles1cl"
5593 if [ "$CFG_OPENGL" = "es2" ]; then
5594 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5595 QT_CONFIG
="$QT_CONFIG opengles2"
5598 # safe execution environment
5599 if [ "$CFG_SXE" != "no" ]; then
5600 QT_CONFIG
="$QT_CONFIG sxe"
5603 # build up the variables for output
5604 if [ "$CFG_DEBUG" = "yes" ]; then
5605 QMAKE_OUTDIR
="${QMAKE_OUTDIR}debug"
5606 QMAKE_CONFIG
="$QMAKE_CONFIG debug"
5607 elif [ "$CFG_DEBUG" = "no" ]; then
5608 QMAKE_OUTDIR
="${QMAKE_OUTDIR}release"
5609 QMAKE_CONFIG
="$QMAKE_CONFIG release"
5611 if [ "$CFG_SHARED" = "yes" ]; then
5612 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-shared"
5613 QMAKE_CONFIG
="$QMAKE_CONFIG shared dll"
5614 elif [ "$CFG_SHARED" = "no" ]; then
5615 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-static"
5616 QMAKE_CONFIG
="$QMAKE_CONFIG static"
5618 if [ "$PLATFORM_QWS" = "yes" ]; then
5619 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
5620 QMAKE_CONFIG
="$QMAKE_CONFIG embedded"
5621 QT_CONFIG
="$QT_CONFIG embedded"
5622 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5624 QMakeVar
set PRECOMPILED_DIR
".pch/$QMAKE_OUTDIR"
5625 QMakeVar
set OBJECTS_DIR
".obj/$QMAKE_OUTDIR"
5626 QMakeVar
set MOC_DIR
".moc/$QMAKE_OUTDIR"
5627 QMakeVar
set RCC_DIR
".rcc/$QMAKE_OUTDIR"
5628 QMakeVar
set UI_DIR
".uic/$QMAKE_OUTDIR"
5629 if [ "$CFG_LARGEFILE" = "yes" ]; then
5630 QMAKE_CONFIG
="$QMAKE_CONFIG largefile"
5632 if [ "$CFG_STL" = "no" ]; then
5633 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STL"
5635 QMAKE_CONFIG
="$QMAKE_CONFIG stl"
5637 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5638 QMAKE_CONFIG
="$QMAKE_CONFIG GNUmake"
5640 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_exports"
5641 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_relocations"
5642 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG precompile_header"
5643 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5644 QMakeVar add QMAKE_CFLAGS
-g
5645 QMakeVar add QMAKE_CXXFLAGS
-g
5646 QMAKE_CONFIG
="$QMAKE_CONFIG separate_debug_info"
5648 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG mmx"
5649 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG 3dnow"
5650 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse"
5651 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse2"
5652 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG iwmmxt"
5653 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG $CFG_MAC_ARCHS"
5654 if [ "$CFG_IPV6" = "yes" ]; then
5655 QT_CONFIG
="$QT_CONFIG ipv6"
5657 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5658 QT_CONFIG
="$QT_CONFIG clock-gettime"
5660 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5661 QT_CONFIG
="$QT_CONFIG clock-monotonic"
5663 if [ "$CFG_MREMAP" = "yes" ]; then
5664 QT_CONFIG
="$QT_CONFIG mremap"
5666 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5667 QT_CONFIG
="$QT_CONFIG getaddrinfo"
5669 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5670 QT_CONFIG
="$QT_CONFIG ipv6ifname"
5672 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5673 QT_CONFIG
="$QT_CONFIG getifaddrs"
5675 if [ "$CFG_INOTIFY" = "yes" ]; then
5676 QT_CONFIG
="$QT_CONFIG inotify"
5678 if [ "$CFG_LIBJPEG" = "system" ]; then
5679 QT_CONFIG
="$QT_CONFIG system-jpeg"
5681 if [ "$CFG_JPEG" = "no" ]; then
5682 QT_CONFIG
="$QT_CONFIG no-jpeg"
5683 elif [ "$CFG_JPEG" = "yes" ]; then
5684 QT_CONFIG
="$QT_CONFIG jpeg"
5686 if [ "$CFG_LIBMNG" = "system" ]; then
5687 QT_CONFIG
="$QT_CONFIG system-mng"
5689 if [ "$CFG_MNG" = "no" ]; then
5690 QT_CONFIG
="$QT_CONFIG no-mng"
5691 elif [ "$CFG_MNG" = "yes" ]; then
5692 QT_CONFIG
="$QT_CONFIG mng"
5694 if [ "$CFG_LIBPNG" = "no" ]; then
5697 if [ "$CFG_LIBPNG" = "system" ]; then
5698 QT_CONFIG
="$QT_CONFIG system-png"
5700 if [ "$CFG_PNG" = "no" ]; then
5701 QT_CONFIG
="$QT_CONFIG no-png"
5702 elif [ "$CFG_PNG" = "yes" ]; then
5703 QT_CONFIG
="$QT_CONFIG png"
5705 if [ "$CFG_GIF" = "no" ]; then
5706 QT_CONFIG
="$QT_CONFIG no-gif"
5707 elif [ "$CFG_GIF" = "yes" ]; then
5708 QT_CONFIG
="$QT_CONFIG gif"
5710 if [ "$CFG_LIBTIFF" = "system" ]; then
5711 QT_CONFIG
="$QT_CONFIG system-tiff"
5713 if [ "$CFG_TIFF" = "no" ]; then
5714 QT_CONFIG
="$QT_CONFIG no-tiff"
5715 elif [ "$CFG_TIFF" = "yes" ]; then
5716 QT_CONFIG
="$QT_CONFIG tiff"
5718 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5719 QT_CONFIG
="$QT_CONFIG no-freetype"
5720 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5721 QT_CONFIG
="$QT_CONFIG system-freetype"
5723 QT_CONFIG
="$QT_CONFIG freetype"
5726 if [ "x$PLATFORM_MAC" = "xyes" ]; then
5727 #On Mac we implicitly link against libz, so we
5728 #never use the 3rdparty stuff.
5729 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB
="system"
5731 if [ "$CFG_ZLIB" = "yes" ]; then
5732 QT_CONFIG
="$QT_CONFIG zlib"
5733 elif [ "$CFG_ZLIB" = "system" ]; then
5734 QT_CONFIG
="$QT_CONFIG system-zlib"
5737 [ "$CFG_NIS" = "yes" ] && QT_CONFIG
="$QT_CONFIG nis"
5738 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG
="$QT_CONFIG cups"
5739 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG
="$QT_CONFIG iconv"
5740 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG
="$QT_CONFIG gnu-libiconv"
5741 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG
="$QT_CONFIG glib"
5742 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG
="$QT_CONFIG gstreamer"
5743 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG
="$QT_CONFIG dbus"
5744 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG
="$QT_CONFIG dbus dbus-linked"
5745 [ "$CFG_NAS" = "system" ] && QT_CONFIG
="$QT_CONFIG nas"
5746 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG
="$QT_CONFIG openssl"
5747 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG
="$QT_CONFIG openssl-linked"
5749 if [ "$PLATFORM_X11" = "yes" ]; then
5750 [ "$CFG_SM" = "yes" ] && QT_CONFIG
="$QT_CONFIG x11sm"
5752 # for some reason, the following libraries are not always built shared,
5753 # so *every* program/lib (including Qt) has to link against them
5754 if [ "$CFG_XSHAPE" = "yes" ]; then
5755 QT_CONFIG
="$QT_CONFIG xshape"
5757 if [ "$CFG_XINERAMA" = "yes" ]; then
5758 QT_CONFIG
="$QT_CONFIG xinerama"
5759 QMakeVar
set QMAKE_LIBS_X11
'-lXinerama $$QMAKE_LIBS_X11'
5761 if [ "$CFG_XCURSOR" = "yes" ]; then
5762 QT_CONFIG
="$QT_CONFIG xcursor"
5763 QMakeVar
set QMAKE_LIBS_X11
'-lXcursor $$QMAKE_LIBS_X11'
5765 if [ "$CFG_XFIXES" = "yes" ]; then
5766 QT_CONFIG
="$QT_CONFIG xfixes"
5767 QMakeVar
set QMAKE_LIBS_X11
'-lXfixes $$QMAKE_LIBS_X11'
5769 if [ "$CFG_XRANDR" = "yes" ]; then
5770 QT_CONFIG
="$QT_CONFIG xrandr"
5771 if [ "$CFG_XRENDER" != "yes" ]; then
5772 # libXrandr uses 1 function from libXrender, so we always have to have it :/
5773 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr -lXrender $$QMAKE_LIBS_X11'
5775 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr $$QMAKE_LIBS_X11'
5778 if [ "$CFG_XRENDER" = "yes" ]; then
5779 QT_CONFIG
="$QT_CONFIG xrender"
5780 QMakeVar
set QMAKE_LIBS_X11
'-lXrender $$QMAKE_LIBS_X11'
5782 if [ "$CFG_MITSHM" = "yes" ]; then
5783 QT_CONFIG
="$QT_CONFIG mitshm"
5785 if [ "$CFG_FONTCONFIG" = "yes" ]; then
5786 QT_CONFIG
="$QT_CONFIG fontconfig"
5788 if [ "$CFG_XINPUT" = "yes" ]; then
5789 QMakeVar
set QMAKE_LIBS_X11
'-lXi $$QMAKE_LIBS_X11'
5791 if [ "$CFG_XINPUT" = "yes" ]; then
5792 QT_CONFIG
="$QT_CONFIG xinput tablet"
5794 if [ "$CFG_XKB" = "yes" ]; then
5795 QT_CONFIG
="$QT_CONFIG xkb"
5799 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES
"$D_FLAGS"
5800 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS
"$L_FLAGS"
5801 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS
"$l_FLAGS"
5803 if [ "$PLATFORM_MAC" = "yes" ]; then
5804 if [ "$CFG_RPATH" = "yes" ]; then
5805 QMAKE_CONFIG
="$QMAKE_CONFIG absolute_library_soname"
5807 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
5808 if [ -n "$RPATH_FLAGS" ]; then
5810 echo "ERROR: -R cannot be used on this platform as \$QMAKE_RPATH is"
5814 elif [ "$CFG_RPATH" = "yes" ]; then
5815 RPATH_MESSAGE
=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5819 if [ "$CFG_RPATH" = "yes" ]; then
5820 # set the default rpath to the library installation directory
5821 RPATH_FLAGS
="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5823 if [ -n "$RPATH_FLAGS" ]; then
5824 # add the user defined rpaths
5825 QMakeVar add QMAKE_RPATHDIR
"$RPATH_FLAGS"
5829 if [ '!' -z "$I_FLAGS" ]; then
5830 # add the user define include paths
5831 QMakeVar add QMAKE_CFLAGS
"$I_FLAGS"
5832 QMakeVar add QMAKE_CXXFLAGS
"$I_FLAGS"
5835 # turn off exceptions for the compilers that support it
5836 if [ "$PLATFORM_QWS" = "yes" ]; then
5837 COMPILER
=`echo $XPLATFORM | cut -f 3- -d-`
5839 COMPILER
=`echo $PLATFORM | cut -f 2- -d-`
5841 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
5845 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5846 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG exceptions"
5850 # Some Qt modules are too advanced in C++ for some old compilers
5851 # Detect here the platforms where they are known to work.
5853 # See Qt documentation for more information on which features are
5854 # supported and on which compilers.
5856 canBuildQtXmlPatterns
="yes"
5857 canBuildWebKit
="$HAVE_STL"
5859 # WebKit requires stdint.h
5860 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stdint
"Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
5861 if [ $?
!= "0" ]; then
5865 case "$XPLATFORM" in
5867 # PA-RISC's assembly is too limited
5868 # gcc 3.4 on that platform can't build QtXmlPatterns
5869 # the assembly it generates cannot be compiled
5871 # Check gcc's version
5872 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5876 canBuildQtXmlPatterns
="no"
5880 canBuildQtXmlPatterns
="no"
5885 # Check gcc's version
5886 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5894 canBuildQtXmlPatterns
="no"
5899 # Check the compiler version
5900 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5903 canBuildQtXmlPatterns
="no"
5909 canBuildQtXmlPatterns
="no"
5916 canBuildQtXmlPatterns
="no"
5923 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
5924 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
5927 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
5928 CFG_XMLPATTERNS
="$canBuildQtXmlPatterns"
5929 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
5930 CFG_XMLPATTERNS
="no"
5932 if [ "$CFG_XMLPATTERNS" = "yes" ]; then
5933 QT_CONFIG
="$QT_CONFIG xmlpatterns"
5935 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
5938 if [ "$CFG_SVG" = "yes" ]; then
5939 QT_CONFIG
="$QT_CONFIG svg"
5941 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SVG"
5944 if [ "$CFG_WEBKIT" = "auto" ]; then
5945 CFG_WEBKIT
="$canBuildWebKit"
5948 if [ "$CFG_WEBKIT" = "yes" ]; then
5949 QT_CONFIG
="$QT_CONFIG webkit"
5950 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
5954 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_WEBKIT"
5957 if [ "$CFG_SCRIPTTOOLS" = "auto" ]; then
5958 CFG_SCRIPTTOOLS
="yes"
5961 if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
5962 QT_CONFIG
="$QT_CONFIG scripttools"
5963 CFG_SCRIPTTOOLS
="yes"
5965 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
5968 if [ "$CFG_EXCEPTIONS" = "no" ]; then
5971 QMakeVar add QMAKE_CFLAGS
-fno-exceptions
5972 QMakeVar add QMAKE_CXXFLAGS
-fno-exceptions
5973 QMakeVar add QMAKE_LFLAGS
-fno-exceptions
5978 QMakeVar add QMAKE_CFLAGS
-LANG:exceptions
=off
5979 QMakeVar add QMAKE_CXXFLAGS
-LANG:exceptions
=off
5980 QMakeVar add QMAKE_LFLAGS
-LANG:exceptions
=off
5987 QMAKE_CONFIG
="$QMAKE_CONFIG exceptions_off"
5990 # On Mac, set the minimum deployment target using Xarch when that is supported (10.5 and up).
5991 # On 10.4 the deployment version is set to 10.3 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET env. variable
5992 # "-cocoa" on the command line means Cocoa is used in 32-bit mode also, in this case fall back on
5993 # QMAKE_MACOSX_DEPLOYMENT_TARGET which will be set to 10.5.
5994 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] && [ "$COMMANDLINE_MAC_COCOA" != "yes" ]; then
5995 if echo "$CFG_MAC_ARCHS" |
grep '\<x86\>' > /dev
/null
2>&1; then
5996 QMakeVar add QMAKE_CFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
5997 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
5998 QMakeVar add QMAKE_LFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
5999 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86
"-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
6001 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc\>' > /dev
/null
2>&1; then
6002 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc -mmacosx-version-min=10.3"
6003 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc -mmacosx-version-min=10.3"
6004 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc -mmacosx-version-min=10.3"
6005 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC
"-arch ppc -Xarch_ppc -mmacosx-version-min=10.3"
6007 if echo "$CFG_MAC_ARCHS" |
grep '\<x86_64\>' > /dev
/null
2>&1; then
6008 QMakeVar add QMAKE_CFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6009 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6010 QMakeVar add QMAKE_LFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6011 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64
"-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
6013 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc64\>' > /dev
/null
2>&1; then
6014 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6015 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6016 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6017 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64
"-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
6021 #-------------------------------------------------------------------------------
6022 # generate QT_BUILD_KEY
6023 #-------------------------------------------------------------------------------
6025 # some compilers generate binary incompatible code between different versions,
6026 # so we need to generate a build key that is different between these compilers
6030 COMPILER_VERSION
=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6032 case "$COMPILER_VERSION" in
6034 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6035 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6036 QT_GCC_PATCH_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6039 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6040 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6041 QT_GCC_PATCH_VERSION
=0
6045 case "$COMPILER_VERSION" in
6047 COMPILER_VERSION
="2.95.*"
6050 COMPILER_VERSION
="3.*"
6053 COMPILER_VERSION
="4"
6058 [ '!' -z "$COMPILER_VERSION" ] && COMPILER
="g++-${COMPILER_VERSION}"
6065 # QT_CONFIG can contain the following:
6067 # Things that affect the Qt API/ABI:
6070 # minimal-config small-config medium-config large-config full-config
6072 # Different edition modules:
6073 # network canvas table xml opengl sql
6078 # Things that do not affect the Qt API/ABI:
6079 # system-jpeg no-jpeg jpeg
6080 # system-mng no-mng mng
6081 # system-png no-png png
6082 # system-zlib no-zlib zlib
6083 # system-libtiff no-libtiff
6097 # X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb
6098 # Embedded: embedded freetype
6104 # determine the build options
6105 for config_option
in $QMAKE_CONFIG $QT_CONFIG; do
6107 case "$config_option" in
6109 # take the last *-config setting. this is the highest config being used,
6110 # and is the one that we will use for tagging plugins
6111 BUILD_CONFIG
="$config_option"
6115 # these config options affect the Qt API/ABI. they should influence
6116 # the generation of the buildkey, so we don't skip them
6120 *) # skip all other options since they don't affect the Qt API/ABI.
6124 if [ "$SKIP" = "no" ]; then
6125 BUILD_OPTIONS
="$BUILD_OPTIONS $config_option"
6129 # put the options that we are missing into .options
6131 for opt
in `echo $ALL_OPTIONS`; do
6133 if echo $BUILD_OPTIONS |
grep $opt >/dev
/null
2>&1; then
6136 if [ "$SKIP" = "no" ]; then
6137 echo "$opt" >> .options
6141 # reconstruct BUILD_OPTIONS with a sorted negative feature list
6142 # (ie. only things that are missing are will be put into the build key)
6144 if [ -f .options
]; then
6145 for opt
in `sort -f .options | uniq`; do
6146 BUILD_OPTIONS
="$BUILD_OPTIONS no-$opt"
6151 # QT_NO* defines affect the Qt API (and binary compatibility). they need
6152 # to be included in the build key
6153 for build_option
in $D_FLAGS; do
6154 build_option
=`echo $build_option | cut -d \" -f 2 -`
6155 case "$build_option" in
6157 echo "$build_option" >> .options
6160 # skip all other compiler defines
6165 # sort the compile time defines (helps ensure that changes in this configure
6166 # script don't affect the QT_BUILD_KEY generation)
6167 if [ -f .options
]; then
6168 for opt
in `sort -f .options | uniq`; do
6169 BUILD_OPTIONS
="$BUILD_OPTIONS $opt"
6174 BUILD_OPTIONS
="$BUILD_CONFIG $BUILD_OPTIONS"
6175 # extract the operating system from the XPLATFORM
6176 TARGET_OPERATING_SYSTEM
=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
6178 # when cross-compiling, don't include build-host information (build key is target specific)
6179 QT_BUILD_KEY
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6180 MAC_NEED_TWO_BUILD_KEYS
="no"
6181 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
6182 QT_BUILD_KEY_CARBON
=$QT_BUILD_KEY
6183 TARGET_OPERATING_SYSTEM
="$TARGET_OPERATING_SYSTEM-cocoa"
6184 QT_BUILD_KEY_COCOA
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6185 if [ "$CFG_MAC_CARBON" = "no" ]; then
6186 QT_BUILD_KEY
=$QT_BUILD_KEY_COCOA
6188 MAC_NEED_TWO_BUILD_KEYS
="yes"
6191 # don't break loading plugins build with an older version of Qt
6192 QT_BUILD_KEY_COMPAT
=
6193 if [ "$QT_CROSS_COMPILE" = "no" ]; then
6194 # previous versions of Qt used a build key built from the uname
6195 QT_BUILD_KEY_COMPAT
="$CFG_USER_BUILD_KEY $UNAME_MACHINE $UNAME_SYSTEM $COMPILER $BUILD_OPTIONS"
6197 # strip out leading/trailing/extra whitespace
6198 QT_BUILD_KEY
=`echo $QT_BUILD_KEY | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6199 QT_BUILD_KEY_COMPAT
=`echo $QT_BUILD_KEY_COMPAT | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6201 #-------------------------------------------------------------------------------
6202 # part of configuration information goes into qconfig.h
6203 #-------------------------------------------------------------------------------
6205 case "$CFG_QCONFIG" in
6207 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6210 tmpconfig
="$outpath/src/corelib/global/qconfig.h.new"
6211 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6212 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6213 echo "#endif" >>"$tmpconfig"
6217 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6221 # define QT_EDITION $QT_EDITION
6224 /* Machine byte-order */
6225 #define Q_BIG_ENDIAN 4321
6226 #define Q_LITTLE_ENDIAN 1234
6229 if [ "$MAC_NEED_TWO_BUILD_KEYS" = "no" ]; then
6230 echo "#define QT_BUILD_KEY \"$QT_BUILD_KEY\"" \
6231 >> "$outpath/src/corelib/global/qconfig.h.new"
6233 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6235 #define QT_BUILD_KEY_CARBON "$QT_BUILD_KEY_CARBON"
6236 #define QT_BUILD_KEY_COCOA "$QT_BUILD_KEY_COCOA"
6240 if [ -n "$QT_BUILD_KEY_COMPAT" ]; then
6241 echo "#define QT_BUILD_KEY_COMPAT \"$QT_BUILD_KEY_COMPAT\"" \
6242 >> "$outpath/src/corelib/global/qconfig.h.new"
6244 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6246 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6247 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6248 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6249 #if defined(__BIG_ENDIAN__)
6250 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6251 #elif defined(__LITTLE_ENDIAN__)
6252 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6254 # error "Unable to determine byte order!"
6258 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6260 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6261 if [ "$CFG_ENDIAN" = "auto" ]; then
6262 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6263 #if defined(__BIG_ENDIAN__)
6264 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6265 #elif defined(__LITTLE_ENDIAN__)
6266 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6268 # error "Unable to determine byte order!"
6272 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6274 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6276 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6277 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6278 /* Non-IEEE double format */
6279 #define Q_DOUBLE_LITTLE "01234567"
6280 #define Q_DOUBLE_BIG "76543210"
6281 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6282 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6283 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6286 if [ "$CFG_ARMFPA" = "yes" ]; then
6287 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6288 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6289 #ifndef QT_BOOTSTRAPPED
6294 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6298 CFG_ARCH_STR
=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6299 CFG_HOST_ARCH_STR
=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6300 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6301 /* Machine Architecture */
6302 #ifndef QT_BOOTSTRAPPED
6303 # define QT_ARCH_${CFG_ARCH_STR}
6305 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6309 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6310 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6312 if [ "$CFG_LARGEFILE" = "yes" ]; then
6313 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6316 # if both carbon and cocoa are specified, enable the autodetection code.
6317 if [ "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
6318 echo "#define AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6319 elif [ "$CFG_MAC_COCOA" = "yes" ]; then
6320 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6323 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6324 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6327 if [ "$PLATFORM_MAC" = "yes" ]; then
6328 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6329 #if defined(__LP64__)
6330 # define QT_POINTER_SIZE 8
6332 # define QT_POINTER_SIZE 4
6336 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6337 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6341 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6343 if [ "$CFG_DEV" = "yes" ]; then
6344 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6347 # Embedded compile time options
6348 if [ "$PLATFORM_QWS" = "yes" ]; then
6349 # Add QWS to config.h
6350 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_WS_QWS"
6352 # Add excluded decorations to $QCONFIG_FLAGS
6353 decors
=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
6354 for decor
in $decors; do
6355 NODECORATION
=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6356 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
6359 # Figure which embedded drivers which are turned off
6360 CFG_GFX_OFF
="$CFG_GFX_AVAILABLE"
6361 for ADRIVER
in $CFG_GFX_ON; do
6362 CFG_GFX_OFF
=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
6365 CFG_KBD_OFF
="$CFG_KBD_AVAILABLE"
6366 # the um driver is currently not in the available list for external builds
6367 if [ "$CFG_DEV" = "no" ]; then
6368 CFG_KBD_OFF
="$CFG_KBD_OFF um"
6370 for ADRIVER
in $CFG_KBD_ON; do
6371 CFG_KBD_OFF
=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
6374 CFG_MOUSE_OFF
="$CFG_MOUSE_AVAILABLE"
6375 for ADRIVER
in $CFG_MOUSE_ON; do
6376 CFG_MOUSE_OFF
=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
6379 for DRIVER
in $CFG_GFX_OFF; do
6380 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6381 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
6384 for DRIVER
in $CFG_KBD_OFF; do
6385 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6386 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
6389 for DRIVER
in $CFG_MOUSE_OFF; do
6390 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6391 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
6395 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6396 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6399 # Add turned on SQL drivers
6400 for DRIVER
in $CFG_SQL_AVAILABLE; do
6401 eval "VAL=\$CFG_SQL_$DRIVER"
6404 ONDRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6405 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6406 SQL_DRIVERS
="$SQL_DRIVERS $DRIVER"
6409 SQL_PLUGINS
="$SQL_PLUGINS $DRIVER"
6415 QMakeVar
set sql-drivers
"$SQL_DRIVERS"
6416 QMakeVar
set sql-plugins
"$SQL_PLUGINS"
6418 # Add other configuration options to the qconfig.h file
6419 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6420 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
6421 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6422 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6423 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
6424 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ZLIB"
6425 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6426 [ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6"
6427 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SXE"
6428 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_DBUS"
6430 if [ "$PLATFORM_QWS" != "yes" ]; then
6431 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
6432 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
6435 # X11/Unix/Mac only configs
6436 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CUPS"
6437 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ICONV"
6438 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GLIB"
6439 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6440 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6441 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6442 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MREMAP"
6443 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6444 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6445 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6446 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_INOTIFY"
6447 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NAS"
6448 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NIS"
6449 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENSSL"
6450 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6452 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6453 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XCURSOR"
6454 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XFIXES"
6455 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6456 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINERAMA"
6457 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XKB"
6458 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRANDR"
6459 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRENDER"
6460 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MITSHM"
6461 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SHAPE"
6462 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6464 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6465 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6466 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6467 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6468 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6470 # sort QCONFIG_FLAGS for neatness if we can
6471 [ '!' -z "$AWK" ] && QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6472 QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS`
6474 if [ -n "$QCONFIG_FLAGS" ]; then
6475 for cfg
in $QCONFIG_FLAGS; do
6476 cfgd
=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6477 cfg
=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6478 # figure out define logic, so we can output the correct
6479 # ifdefs to override the global defines in a project
6481 if [ true
] && echo "$cfgd" |
grep 'QT_NO_' >/dev
/null
2>&1; then
6482 # QT_NO_option can be forcefully turned on by QT_option
6483 cfgdNeg
=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6484 elif [ true
] && echo "$cfgd" |
grep 'QT_' >/dev
/null
2>&1; then
6485 # QT_option can be forcefully turned off by QT_NO_option
6486 cfgdNeg
=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6489 if [ -z $cfgdNeg ]; then
6490 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6497 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6498 #if defined($cfgd) && defined($cfgdNeg)
6500 #elif !defined($cfgd) && !defined($cfgdNeg)
6509 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6510 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6511 #define QT_VISIBILITY_AVAILABLE
6516 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6517 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6518 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6520 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w
"$outpath/src/corelib/global/qconfig.h"
6521 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6522 chmod -w "$outpath/src/corelib/global/qconfig.h"
6523 for conf
in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
6524 if [ '!' -f "$conf" ]; then
6525 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
6530 #-------------------------------------------------------------------------------
6531 # save configuration into qconfig.pri
6532 #-------------------------------------------------------------------------------
6534 QTCONFIG
="$outpath/mkspecs/qconfig.pri"
6535 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG no_mocdepend"
6536 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6537 if [ "$CFG_DEBUG" = "yes" ]; then
6538 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG debug"
6539 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6540 QT_CONFIG
="$QT_CONFIG release"
6542 QT_CONFIG
="$QT_CONFIG debug"
6543 elif [ "$CFG_DEBUG" = "no" ]; then
6544 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG release"
6545 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6546 QT_CONFIG
="$QT_CONFIG debug"
6548 QT_CONFIG
="$QT_CONFIG release"
6550 if [ "$CFG_STL" = "yes" ]; then
6551 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG stl"
6553 if [ "$CFG_FRAMEWORK" = "no" ]; then
6554 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_no_framework"
6556 QT_CONFIG
="$QT_CONFIG qt_framework"
6557 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_framework"
6559 if [ "$PLATFORM_MAC" = "yes" ]; then
6560 QT_CONFIG
="$QT_CONFIG $CFG_MAC_ARCHS"
6563 # Make the application arch follow the Qt arch for single arch builds.
6564 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
6565 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
6566 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
6569 cat >>"$QTCONFIG.tmp" <<EOF
6571 CONFIG += $QTCONFIG_CONFIG
6573 QT_EDITION = $Edition
6574 QT_CONFIG += $QT_CONFIG
6577 QT_VERSION = $QT_VERSION
6578 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6579 QT_MINOR_VERSION = $QT_MINOR_VERSION
6580 QT_PATCH_VERSION = $QT_PATCH_VERSION
6583 QT_LIBINFIX = $QT_LIBINFIX
6584 QT_NAMESPACE = $QT_NAMESPACE
6585 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
6588 if [ "$CFG_RPATH" = "yes" ]; then
6589 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
6591 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6592 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6593 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6594 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6596 # replace qconfig.pri if it differs from the newly created temp file
6597 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6598 rm -f "$QTCONFIG.tmp"
6600 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6603 #-------------------------------------------------------------------------------
6604 # save configuration into .qmake.cache
6605 #-------------------------------------------------------------------------------
6607 CACHEFILE
="$outpath/.qmake.cache"
6608 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6609 cat >>"$CACHEFILE.tmp" <<EOF
6610 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
6611 QT_SOURCE_TREE = \$\$quote($relpath)
6612 QT_BUILD_TREE = \$\$quote($outpath)
6613 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6614 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
6615 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
6617 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6618 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
6619 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
6620 QMAKE_UIC3 = \$\$QT_BUILD_TREE/bin/uic3
6621 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
6622 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
6623 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6624 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6628 if [ -n "$QT_CFLAGS_PSQL" ]; then
6629 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp"
6631 if [ -n "$QT_LFLAGS_PSQL" ]; then
6632 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$CACHEFILE.tmp"
6634 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6635 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$CACHEFILE.tmp"
6637 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6638 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$CACHEFILE.tmp"
6640 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6641 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$CACHEFILE.tmp"
6643 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6644 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$CACHEFILE.tmp"
6647 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6648 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
6651 #dump in the OPENSSL_LIBS info
6652 if [ '!' -z "$OPENSSL_LIBS" ]; then
6653 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp"
6654 elif [ "$CFG_OPENSSL" = "linked" ]; then
6655 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$CACHEFILE.tmp"
6658 #dump in the SDK info
6659 if [ '!' -z "$CFG_SDK" ]; then
6660 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$CACHEFILE.tmp"
6663 # mac gcc -Xarch support
6664 if [ "$CFG_MAC_XARCH" = "no" ]; then
6665 echo "QMAKE_MAC_XARCH = no" >> "$CACHEFILE.tmp"
6668 #dump the qmake spec
6669 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6670 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6672 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6676 cat "$QMAKE_VARS_FILE" >> "$CACHEFILE.tmp"
6677 rm -f "$QMAKE_VARS_FILE" 2>/dev
/null
6681 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4
>/dev
/null
2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL
="yes"
6682 if [ "$CFG_INCREMENTAL" = "yes" ]; then
6683 find "$relpath" -perm u
+w
-mtime -3 |
grep 'cpp$' |
while read f
; do
6684 # don't need to worry about generated files
6685 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
6686 basename "$f" |
grep '^moc_' >/dev
/null
2>&1 && continue
6688 INCREMENTAL
="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
6690 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
6691 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
6694 # replace .qmake.cache if it differs from the newly created temp file
6695 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6696 rm -f "$CACHEFILE.tmp"
6698 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6701 #-------------------------------------------------------------------------------
6702 # give feedback on configuration
6703 #-------------------------------------------------------------------------------
6707 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6710 This target is using the GNU C++ compiler ($PLATFORM).
6712 Recent versions of this compiler automatically include code for
6713 exceptions, which increase both the size of the Qt libraries and
6714 the amount of memory taken by your applications.
6716 You may choose to re-run `basename $0` with the -no-exceptions
6717 option to compile Qt without exceptions. This is completely binary
6718 compatible, and existing applications will continue to work.
6726 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6729 This target is using the MIPSpro C++ compiler ($PLATFORM).
6731 You may choose to re-run `basename $0` with the -no-exceptions
6732 option to compile Qt without exceptions. This will make the
6733 size of the Qt library smaller and reduce the amount of memory
6734 taken by your applications.
6745 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" == "yes" ]; then
6747 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
6748 in debug mode will run out of memory on systems with 2GB or less.
6749 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
6750 -no-webkit or -release to skip webkit debug.
6755 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6756 echo "Build type: $PLATFORM"
6758 echo "Building on: $PLATFORM"
6759 echo "Building for: $XPLATFORM"
6762 if [ "$PLATFORM_MAC" = "yes" ]; then
6763 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
6765 echo "Architecture: $CFG_ARCH"
6768 if [ "$PLATFORM_QWS" = "yes" ]; then
6769 echo "Host architecture: $CFG_HOST_ARCH"
6772 if [ "$PLATFORM_MAC" = "yes" ]; then
6773 if [ "$CFG_MAC_COCOA" = "yes" ]; then
6774 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6775 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
6777 echo "Using framework: Cocoa"
6780 echo "Using framework: Carbon"
6784 if [ -n "$PLATFORM_NOTES" ]; then
6785 echo "Platform notes:"
6786 echo "$PLATFORM_NOTES"
6791 if [ "$OPT_VERBOSE" = "yes" ]; then
6792 if echo '\c' |
grep '\c' >/dev
/null
; then
6793 echo -n "qmake vars .......... "
6795 echo "qmake vars .......... \c"
6797 cat "$QMAKE_VARS_FILE" |
tr '\n' ' '
6798 echo "qmake switches ...... $QMAKE_SWITCHES"
6801 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ......... $INCREMENTAL"
6802 echo "Build ............... $CFG_BUILD_PARTS"
6803 echo "Configuration ....... $QMAKE_CONFIG $QT_CONFIG"
6804 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6805 echo "Debug ............... yes (combined)"
6806 if [ "$CFG_DEBUG" = "yes" ]; then
6807 echo "Default Link ........ debug"
6809 echo "Default Link ........ release"
6812 echo "Debug ............... $CFG_DEBUG"
6814 echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
6815 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
6816 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
6817 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
6818 echo "QtScriptTools module $CFG_SCRIPTTOOLS"
6819 echo "QtXmlPatterns module $CFG_XMLPATTERNS"
6820 echo "Phonon module ....... $CFG_PHONON"
6821 echo "SVG module .......... $CFG_SVG"
6822 echo "WebKit module ....... $CFG_WEBKIT"
6823 echo "STL support ......... $CFG_STL"
6824 echo "PCH support ......... $CFG_PRECOMPILE"
6825 echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
6826 if [ "${CFG_ARCH}" = "arm" ]; then
6827 echo "iWMMXt support ...... ${CFG_IWMMXT}"
6829 [ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
6830 echo "IPv6 support ........ $CFG_IPV6"
6831 echo "IPv6 ifname support . $CFG_IPV6IFNAME"
6832 echo "getaddrinfo support . $CFG_GETADDRINFO"
6833 echo "getifaddrs support .. $CFG_GETIFADDRS"
6834 echo "Accessibility ....... $CFG_ACCESSIBILITY"
6835 echo "NIS support ......... $CFG_NIS"
6836 echo "CUPS support ........ $CFG_CUPS"
6837 echo "Iconv support ....... $CFG_ICONV"
6838 echo "Glib support ........ $CFG_GLIB"
6839 echo "GStreamer support ... $CFG_GSTREAMER"
6840 echo "Large File support .. $CFG_LARGEFILE"
6841 echo "GIF support ......... $CFG_GIF"
6842 if [ "$CFG_TIFF" = "no" ]; then
6843 echo "TIFF support ........ $CFG_TIFF"
6845 echo "TIFF support ........ $CFG_TIFF ($CFG_LIBTIFF)"
6847 if [ "$CFG_JPEG" = "no" ]; then
6848 echo "JPEG support ........ $CFG_JPEG"
6850 echo "JPEG support ........ $CFG_JPEG ($CFG_LIBJPEG)"
6852 if [ "$CFG_PNG" = "no" ]; then
6853 echo "PNG support ......... $CFG_PNG"
6855 echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
6857 if [ "$CFG_MNG" = "no" ]; then
6858 echo "MNG support ......... $CFG_MNG"
6860 echo "MNG support ......... $CFG_MNG ($CFG_LIBMNG)"
6862 echo "zlib support ........ $CFG_ZLIB"
6863 echo "Session management .. $CFG_SM"
6864 if [ "$PLATFORM_QWS" = "yes" ]; then
6865 echo "Embedded support .... $CFG_EMBEDDED"
6866 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
6867 echo "Freetype2 support ... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
6869 echo "Freetype2 support ... $CFG_QWS_FREETYPE"
6871 # Normalize the decoration output first
6872 CFG_GFX_ON
=`echo ${CFG_GFX_ON}`
6873 CFG_GFX_PLUGIN
=`echo ${CFG_GFX_PLUGIN}`
6874 echo "Graphics (qt) ....... ${CFG_GFX_ON}"
6875 echo "Graphics (plugin) ... ${CFG_GFX_PLUGIN}"
6876 CFG_DECORATION_ON
=`echo ${CFG_DECORATION_ON}`
6877 CFG_DECORATION_PLUGIN
=`echo ${CFG_DECORATION_PLUGIN}`
6878 echo "Decorations (qt) .... $CFG_DECORATION_ON"
6879 echo "Decorations (plugin) $CFG_DECORATION_PLUGIN"
6880 CFG_KBD_ON
=`echo ${CFG_KBD_ON}`
6881 CFG_KBD_PLUGIN
=`echo ${CFG_KBD_PLUGIN}`
6882 echo "Keyboard driver (qt). ${CFG_KBD_ON}"
6883 echo "Keyboard driver (plugin) ${CFG_KBD_PLUGIN}"
6884 CFG_MOUSE_ON
=`echo ${CFG_MOUSE_ON}`
6885 CFG_MOUSE_PLUGIN
=`echo ${CFG_MOUSE_PLUGIN}`
6886 echo "Mouse driver (qt) ... $CFG_MOUSE_ON"
6887 echo "Mouse driver (plugin) $CFG_MOUSE_PLUGIN"
6889 if [ "$CFG_OPENGL" = "desktop" ]; then
6890 echo "OpenGL support ...... yes (Desktop OpenGL)"
6891 elif [ "$CFG_OPENGL" = "es1" ]; then
6892 echo "OpenGL support ...... yes (OpenGL ES 1.x Common profile)"
6893 elif [ "$CFG_OPENGL" = "es1cl" ]; then
6894 echo "OpenGL support ...... yes (OpenGL ES 1.x Common Lite profile)"
6895 elif [ "$CFG_OPENGL" = "es2" ]; then
6896 echo "OpenGL support ...... yes (OpenGL ES 2.x)"
6898 echo "OpenGL support ...... no"
6900 if [ "$PLATFORM_X11" = "yes" ]; then
6901 echo "NAS sound support ... $CFG_NAS"
6902 echo "XShape support ...... $CFG_XSHAPE"
6903 echo "Xinerama support .... $CFG_XINERAMA"
6904 echo "Xcursor support ..... $CFG_XCURSOR"
6905 echo "Xfixes support ...... $CFG_XFIXES"
6906 echo "Xrandr support ...... $CFG_XRANDR"
6907 echo "Xrender support ..... $CFG_XRENDER"
6908 echo "Xi support .......... $CFG_XINPUT"
6909 echo "MIT-SHM support ..... $CFG_MITSHM"
6910 echo "FontConfig support .. $CFG_FONTCONFIG"
6911 echo "XKB Support ......... $CFG_XKB"
6912 echo "immodule support .... $CFG_IM"
6913 echo "GTK theme support ... $CFG_QGTKSTYLE"
6915 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support ....... $CFG_SQL_mysql"
6916 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support .. $CFG_SQL_psql"
6917 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........ $CFG_SQL_odbc"
6918 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ......... $CFG_SQL_oci"
6919 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ......... $CFG_SQL_tds"
6920 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ......... $CFG_SQL_db2"
6921 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ... $CFG_SQL_ibase"
6922 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support .... $CFG_SQL_sqlite2"
6923 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ...... $CFG_SQL_sqlite ($CFG_SQLITE)"
6926 if [ "$CFG_OPENSSL" = "yes" ]; then
6927 OPENSSL_LINKAGE
="(run-time)"
6928 elif [ "$CFG_OPENSSL" = "linked" ]; then
6929 OPENSSL_LINKAGE
="(linked)"
6931 echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
6933 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
6935 # complain about not being able to use dynamic plugins if we are using a static build
6936 if [ "$CFG_SHARED" = "no" ]; then
6938 echo "WARNING: Using static linking will disable the use of dynamically"
6939 echo "loaded plugins. Make sure to import all needed static plugins,"
6940 echo "or compile needed modules into the library."
6943 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6945 echo "NOTE: When linking against OpenSSL, you can override the default"
6946 echo "library names through OPENSSL_LIBS."
6948 echo " ./configure -openssl-linked OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto'"
6951 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6953 echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
6958 sepath
=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6963 #-------------------------------------------------------------------------------
6964 # build makefiles based on the configuration
6965 #-------------------------------------------------------------------------------
6967 echo "Finding project files. Please wait..."
6968 "$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
6969 if [ -f "${relpath}/projects.pro" ]; then
6970 mkfile
="${outpath}/Makefile"
6971 [ -f "$mkfile" ] && chmod +w
"$mkfile"
6972 QTDIR
="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro" -o "$mkfile"
6975 # .projects -> projects to process
6976 # .projects.1 -> qt and moc
6977 # .projects.2 -> subdirs and libs
6978 # .projects.3 -> the rest
6979 rm -f .projects .projects
.1 .projects
.2 .projects
.3
6981 QMAKE_PROJECTS
=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6982 if [ -z "$AWK" ]; then
6983 for p
in `echo $QMAKE_PROJECTS`; do
6984 echo "$p" >> .projects
6987 cat >projects.
awk <<EOF
6993 first = "./.projects.1.tmp"
6994 second = "./.projects.2.tmp"
6995 third = "./.projects.3.tmp"
7000 if ( ! target_file )
7002 print input_file >target_file
7007 input_file = FILENAME
7012 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7018 matched_target == 0 && /^(TEMPLATE.*=)/ {
7019 if ( \$3 == "subdirs" )
7020 target_file = second
7021 else if ( \$3 == "lib" )
7027 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7028 if ( \$0 ~ /plugin/ )
7031 target_file = second
7036 if ( ! target_file )
7038 print input_file >>target_file
7045 for p
in `echo $QMAKE_PROJECTS`; do
7046 echo "$p" >> .projects.all
7049 # if you get errors about the length of the command line to awk, change the -l arg
7051 split -l 100 .projects.all .projects.all.
7052 for p
in .projects.all.
*; do
7053 "$AWK" -f projects.
awk `cat $p`
7054 [ -f .projects
.1.tmp
] && cat .projects
.1.tmp
>> .projects
.1
7055 [ -f .projects
.2.tmp
] && cat .projects
.2.tmp
>> .projects
.2
7056 [ -f .projects
.3.tmp
] && cat .projects
.3.tmp
>> .projects
.3
7057 rm -f .projects
.1.tmp .projects
.2.tmp .projects
.3.tmp
$p
7059 rm -f .projects.all
* projects.
awk
7061 [ -f .projects
.1 ] && cat .projects
.1 >>.projects
7062 [ -f .projects
.2 ] && cat .projects
.2 >>.projects
7063 rm -f .projects
.1 .projects
.2
7064 if [ -f .projects
.3 ] && [ "$OPT_FAST" = "no" ]; then
7065 cat .projects
.3 >>.projects
7069 # don't sort Qt and MOC in with the other project files
7070 # also work around a segfaulting uniq(1)
7071 if [ -f .sorted.projects
.2 ]; then
7072 sort .sorted.projects
.2 > .sorted.projects
.2.new
7073 mv -f .sorted.projects
.2.new .sorted.projects
.2
7074 cat .sorted.projects
.2 >> .sorted.projects
.1
7076 [ -f .sorted.projects
.1 ] && sort .sorted.projects
.1 >> .sorted.projects
7077 rm -f .sorted.projects
.2 .sorted.projects
.1
7081 if [ -f .projects
]; then
7082 uniq .projects
>.tmp
7083 mv -f .tmp .projects
7084 NORM_PROJECTS
=`cat .projects | wc -l | sed -e "s, ,,g"`
7086 if [ -f .projects
.3 ]; then
7087 uniq .projects
.3 >.tmp
7088 mv -f .tmp .projects
.3
7089 FAST_PROJECTS
=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7091 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7095 for part
in $CFG_BUILD_PARTS; do
7097 tools
) PART_ROOTS
="$PART_ROOTS tools" ;;
7098 libs
) PART_ROOTS
="$PART_ROOTS src" ;;
7099 examples
) PART_ROOTS
="$PART_ROOTS examples demos" ;;
7104 if [ "$CFG_DEV" = "yes" ]; then
7105 PART_ROOTS
="$PART_ROOTS tests"
7108 echo "Creating makefiles. Please wait..."
7109 for file in .projects .projects
.3; do
7110 [ '!' -f "$file" ] && continue
7111 for a
in `cat $file`; do
7113 for r
in $PART_ROOTS; do
7114 if echo "$a" |
grep "^$r" >/dev
/null
2>&1 ||
echo "$a" |
grep "^$relpath/$r" >/dev
/null
2>&1; then
7119 [ "$IN_ROOT" = "no" ] && continue
7122 *winmain
/winmain.pro
) continue ;;
7123 */qmake
/qmake.pro
) continue ;;
7124 *tools
/bootstrap
*|
*tools
/moc
*|
*tools
/rcc
*|
*tools
/uic
*) SPEC
=$QMAKESPEC ;;
7125 *) SPEC
=$XQMAKESPEC ;;
7127 dir
=`dirname $a | sed -e "s;$sepath;.;g"`
7128 test -d "$dir" || mkdir
-p "$dir"
7129 OUTDIR
="$outpath/$dir"
7130 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7131 # fast configure - the makefile exists, skip it
7132 # since the makefile exists, it was generated by qmake, which means we
7133 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7135 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7138 QMAKE_SPEC_ARGS
="-spec $SPEC"
7139 if echo '\c' |
grep '\c' >/dev
/null
; then
7145 QMAKE
="$outpath/bin/qmake"
7146 QMAKE_ARGS
="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7147 if [ "$file" = ".projects.3" ]; then
7148 if echo '\c' |
grep '\c' >/dev
/null
; then
7155 cat >"${OUTDIR}/Makefile" <<EOF
7156 # ${OUTDIR}/Makefile: generated by configure
7158 # WARNING: This makefile will be replaced with a real makefile.
7159 # All changes made to this file will be lost.
7161 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7163 cat >>"${OUTDIR}/Makefile" <<EOF
7165 all clean install qmake first Makefile: FORCE
7166 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7174 if [ "$OPT_VERBOSE" = "yes" ]; then
7175 echo " (`basename $SPEC`)"
7176 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7181 [ -f "${OUTDIR}/Makefile" ] && chmod +w
"${OUTDIR}/Makefile"
7182 QTDIR
="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7186 rm -f .projects .projects
.3
7188 #-------------------------------------------------------------------------------
7189 # XShape is important, DnD in the Designer doens't work without it
7190 #-------------------------------------------------------------------------------
7191 if [ "$PLATFORM_X11" = "yes" ] && [ "$CFG_XSHAPE" = "no" ]; then
7194 NOTICE: Qt will not be built with XShape support.
7196 As a result, drag-and-drop in the Qt Designer will NOT
7197 work. We recommend that you enable XShape support by passing
7198 the -xshape switch to $0.
7202 #-------------------------------------------------------------------------------
7203 # check for platforms that we don't yet know about
7204 #-------------------------------------------------------------------------------
7205 if [ "$CFG_ARCH" = "generic" ]; then
7208 NOTICE: Atomic operations are not yet supported for this
7211 Qt will use the 'generic' architecture instead, which uses a
7212 single pthread_mutex_t to protect all atomic operations. This
7213 implementation is the slow (but safe) fallback implementation
7214 for architectures Qt does not yet support.
7218 #-------------------------------------------------------------------------------
7219 # check if the user passed the -no-zlib option, which is no longer supported
7220 #-------------------------------------------------------------------------------
7221 if [ -n "$ZLIB_FORCED" ]; then
7222 which_zlib
="supplied"
7223 if [ "$CFG_ZLIB" = "system" ]; then
7229 NOTICE: The -no-zlib option was supplied but is no longer
7232 Qt now requires zlib support in all builds, so the -no-zlib
7233 option was ignored. Qt will be built using the $which_zlib
7238 #-------------------------------------------------------------------------------
7239 # finally save the executed command to another script
7240 #-------------------------------------------------------------------------------
7241 if [ `basename $0` != "config.status" ]; then
7242 CONFIG_STATUS
="$relpath/$relconf $OPT_CMDLINE"
7244 # add the system variables
7245 for varname
in $SYSTEM_VARIABLES; do
7247 'if [ -n "\$'${varname}'" ]; then
7248 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7253 echo "$CONFIG_STATUS" |
grep '\-confirm\-license' >/dev
/null
2>&1 || CONFIG_STATUS
="$CONFIG_STATUS -confirm-license"
7255 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7256 echo "#!/bin/sh" > "$outpath/config.status"
7257 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7258 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7259 echo "else" >> "$outpath/config.status"
7260 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7261 echo "fi" >> "$outpath/config.status"
7262 chmod +x
"$outpath/config.status"
7265 if [ -n "$RPATH_MESSAGE" ]; then
7267 echo "$RPATH_MESSAGE"
7270 MAKE
=`basename $MAKE`
7272 echo Qt is now configured
for building. Just run
\'$MAKE\'.
7273 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7274 echo Once everything is built
, Qt is installed.
7275 echo You should not run
\'$MAKE install\'.
7277 echo Once everything is built
, you must run
\'$MAKE install\'.
7278 echo Qt will be installed into
$QT_INSTALL_PREFIX
7281 echo To reconfigure
, run
\'$MAKE confclean
\' and
\'configure
\'.