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 # Check we actually have X11 :-)
4731 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xlib
"XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4732 echo "Basic XLib functionality test failed!"
4733 echo " You might need to modify the include and library search paths by editing"
4734 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4738 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
4739 if [ "$CFG_OPENGL" = "auto" ] ||
[ "$CFG_OPENGL" = "yes" ]; then
4740 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
4742 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
4744 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
4746 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
4749 if [ "$CFG_OPENGL" = "yes" ]; then
4750 echo "All the OpenGL functionality tests failed!"
4751 echo " You might need to modify the include and library search paths by editing"
4752 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4753 echo " ${XQMAKESPEC}."
4760 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4761 if [ "$CFG_OPENGL" = "desktop" ]; then
4762 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
4763 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4770 elif [ "$CFG_OPENGL" = "es1cl" ]; then
4771 # OpenGL ES 1.x common lite
4772 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
4773 echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
4774 echo " You might need to modify the include and library search paths by editing"
4775 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4776 echo " ${XQMAKESPEC}."
4779 elif [ "$CFG_OPENGL" = "es1" ]; then
4781 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
4782 echo "The OpenGL ES 1.x functionality test failed!"
4783 echo " You might need to modify the include and library search paths by editing"
4784 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4785 echo " ${XQMAKESPEC}."
4788 elif [ "$CFG_OPENGL" = "es2" ]; then
4790 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
4791 echo "The OpenGL ES 2.0 functionality test failed!"
4792 echo " You might need to modify the include and library search paths by editing"
4793 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4794 echo " ${XQMAKESPEC}."
4797 elif [ "$CFG_OPENGL" = "desktop" ]; then
4798 # Desktop OpenGL support
4799 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
4800 echo "The OpenGL functionality test failed!"
4801 echo " You might need to modify the include and library search paths by editing"
4802 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4803 echo " ${XQMAKESPEC}."
4808 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4809 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
4810 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4818 # if opengl is disabled and the user specified graphicssystem gl, disable it...
4819 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
4820 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
4821 CFG_GRAPHICS_SYSTEM
=default
4824 # auto-detect Xcursor support
4825 if [ "$CFG_XCURSOR" != "no" ]; then
4826 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
4827 if [ "$CFG_XCURSOR" != "runtime" ]; then
4831 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4832 echo "Xcursor support cannot be enabled due to functionality tests!"
4833 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4834 echo " If you believe this message is in error you may use the continue"
4835 echo " switch (-continue) to $0 to continue."
4843 # auto-detect Xfixes support
4844 if [ "$CFG_XFIXES" != "no" ]; then
4845 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xfixes
"Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4846 if [ "$CFG_XFIXES" != "runtime" ]; then
4850 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4851 echo "Xfixes support cannot be enabled due to functionality tests!"
4852 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4853 echo " If you believe this message is in error you may use the continue"
4854 echo " switch (-continue) to $0 to continue."
4862 # auto-detect Xrandr support (resize and rotate extension)
4863 if [ "$CFG_XRANDR" != "no" ]; then
4864 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
4865 if [ "$CFG_XRANDR" != "runtime" ]; then
4869 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4870 echo "Xrandr support cannot be enabled due to functionality tests!"
4871 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4872 echo " If you believe this message is in error you may use the continue"
4873 echo " switch (-continue) to $0 to continue."
4881 # auto-detect Xrender support
4882 if [ "$CFG_XRENDER" != "no" ]; then
4883 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
4886 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4887 echo "Xrender support cannot be enabled due to functionality tests!"
4888 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4889 echo " If you believe this message is in error you may use the continue"
4890 echo " switch (-continue) to $0 to continue."
4898 # auto-detect MIT-SHM support
4899 if [ "$CFG_MITSHM" != "no" ]; then
4900 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
4903 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4904 echo "MITSHM support cannot be enabled due to functionality tests!"
4905 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4906 echo " If you believe this message is in error you may use the continue"
4907 echo " switch (-continue) to $0 to continue."
4915 # auto-detect FontConfig support
4916 if [ "$CFG_FONTCONFIG" != "no" ]; then
4917 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig
2>/dev
/null
; then
4918 QT_CFLAGS_FONTCONFIG
=`$PKG_CONFIG --cflags fontconfig 2>/dev/null`
4919 QT_LIBS_FONTCONFIG
=`$PKG_CONFIG --libs fontconfig 2>/dev/null`
4921 QT_CFLAGS_FONTCONFIG
=
4922 QT_LIBS_FONTCONFIG
="-lfreetype -lfontconfig"
4924 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
4926 QMakeVar
set QMAKE_CFLAGS_X11
"$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
4927 QMakeVar
set QMAKE_LIBS_X11
"$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
4928 CFG_LIBFREETYPE
=system
4930 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4931 echo "FontConfig support cannot be enabled due to functionality tests!"
4932 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4933 echo " If you believe this message is in error you may use the continue"
4934 echo " switch (-continue) to $0 to continue."
4942 # auto-detect Session Management support
4943 if [ "$CFG_SM" = "auto" ]; then
4944 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
4947 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4948 echo "Session Management support cannot be enabled due to functionality tests!"
4949 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4950 echo " If you believe this message is in error you may use the continue"
4951 echo " switch (-continue) to $0 to continue."
4959 # auto-detect SHAPE support
4960 if [ "$CFG_XSHAPE" != "no" ]; then
4961 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
4964 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4965 echo "XShape support cannot be enabled due to functionality tests!"
4966 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4967 echo " If you believe this message is in error you may use the continue"
4968 echo " switch (-continue) to $0 to continue."
4976 # auto-detect Xinerama support
4977 if [ "$CFG_XINERAMA" != "no" ]; then
4978 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
4979 if [ "$CFG_XINERAMA" != "runtime" ]; then
4983 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4984 echo "Xinerama support cannot be enabled due to functionality tests!"
4985 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4986 echo " If you believe this message is in error you may use the continue"
4987 echo " switch (-continue) to $0 to continue."
4995 # auto-detect Xinput support
4996 if [ "$CFG_XINPUT" != "no" ]; then
4997 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
4998 if [ "$CFG_XINPUT" != "runtime" ]; then
5002 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5003 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5004 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5005 echo " If you believe this message is in error you may use the continue"
5006 echo " switch (-continue) to $0 to continue."
5014 # auto-detect XKB support
5015 if [ "$CFG_XKB" != "no" ]; then
5016 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
5019 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5020 echo "XKB support cannot be enabled due to functionality tests!"
5021 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5022 echo " If you believe this message is in error you may use the continue"
5023 echo " switch (-continue) to $0 to continue."
5031 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5032 if [ -n "$PKG_CONFIG" ]; then
5033 QT_CFLAGS_QGTKSTYLE
=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5034 QT_LIBS_QGTKSTYLE
=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5036 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5038 QMakeVar
set QT_CFLAGS_QGTKSTYLE
"$QT_CFLAGS_QGTKSTYLE"
5039 QMakeVar
set QT_LIBS_QGTKSTYLE
"$QT_LIBS_QGTKSTYLE"
5041 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5042 echo "Gtk theme support cannot be enabled due to functionality tests!"
5043 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5044 echo " If you believe this message is in error you may use the continue"
5045 echo " switch (-continue) to $0 to continue."
5051 elif [ "$CFG_GLIB" = "no" ]; then
5057 if [ "$PLATFORM_MAC" = "yes" ]; then
5058 if [ "$CFG_PHONON" != "no" ]; then
5059 # Always enable Phonon (unless it was explicitly disabled)
5065 if [ "$PLATFORM_QWS" = "yes" ]; then
5067 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5068 if [ "$CFG_OPENGL" = "yes" ]; then
5069 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
5071 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
5073 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
5076 echo "All the OpenGL ES functionality tests failed!"
5077 echo " You might need to modify the include and library search paths by editing"
5078 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5079 echo " ${XQMAKESPEC}."
5082 elif [ "$CFG_OPENGL" = "es1" ]; then
5084 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
5085 echo "The OpenGL ES 1.x functionality test failed!"
5086 echo " You might need to modify the include and library search paths by editing"
5087 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5088 echo " ${XQMAKESPEC}."
5091 elif [ "$CFG_OPENGL" = "es2" ]; then
5093 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
5094 echo "The OpenGL ES 2.0 functionality test failed!"
5095 echo " You might need to modify the include and library search paths by editing"
5096 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5097 echo " ${XQMAKESPEC}."
5100 elif [ "$CFG_OPENGL" = "desktop" ]; then
5101 # Desktop OpenGL support
5102 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5107 for screen
in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5108 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5109 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/ahi
"Ahi" $L_FLAGS $I_FLAGS $l_FLAGS; then
5110 echo "The Ahi screen driver functionality test failed!"
5111 echo " You might need to modify the include and library search paths by editing"
5112 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5113 echo " ${XQMAKESPEC}."
5118 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5119 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/svgalib
"SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS; then
5120 echo "The SVGAlib screen driver functionality test failed!"
5121 echo " You might need to modify the include and library search paths by editing"
5122 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5123 echo " ${XQMAKESPEC}."
5128 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5129 if [ -n "$PKG_CONFIG" ]; then
5130 if $PKG_CONFIG --exists directfb
2>/dev
/null
; then
5131 QT_CFLAGS_DIRECTFB
=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5132 QT_LIBS_DIRECTFB
=`$PKG_CONFIG --libs directfb 2>/dev/null`
5133 elif directfb-config
--version >/dev
/null
2>&1; then
5134 QT_CFLAGS_DIRECTFB
=`directfb-config --cflags 2>/dev/null`
5135 QT_LIBS_DIRECTFB
=`directfb-config --libs 2>/dev/null`
5139 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5140 if [ -n "$QT_CFLAGS_DIRECTFB" ] ||
[ -n "$QT_LIBS_DIRECTFB" ]; then
5141 QMakeVar
set QT_CFLAGS_DIRECTFB
"$QT_CFLAGS_DIRECTFB"
5142 QMakeVar
set QT_LIBS_DIRECTFB
"$QT_LIBS_DIRECTFB"
5145 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
5146 echo "The DirectFB screen driver functionality test failed!"
5147 echo " You might need to modify the include and library search paths by editing"
5148 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5149 echo " ${XQMAKESPEC}."
5157 for mouse
in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5158 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5159 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/tslib
"tslib" $L_FLAGS $I_FLAGS $l_FLAGS; then
5160 echo "The tslib functionality test failed!"
5161 echo " You might need to modify the include and library search paths by editing"
5162 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5163 echo " ${XQMAKESPEC}."
5172 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/sound
"sound" $L_FLAGS $I_FLAGS $l_FLAGS; then
5173 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SOUND"
5179 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE
="$CFG_QWS_FREETYPE"
5180 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE
=no
5181 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5182 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/freetype
"FreeType" $L_FLAGS $I_FLAGS $l_FLAGS ; then
5183 CFG_LIBFREETYPE
=system
5189 if [ "$CFG_ENDIAN" = "auto" ]; then
5190 if [ "$PLATFORM_MAC" = "yes" ]; then
5193 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5195 if [ "$F" -eq 0 ]; then
5196 CFG_ENDIAN
="Q_LITTLE_ENDIAN"
5197 elif [ "$F" -eq 1 ]; then
5198 CFG_ENDIAN
="Q_BIG_ENDIAN"
5201 echo "The target system byte order could not be detected!"
5202 echo "Turn on verbose messaging (-v) to see the final report."
5203 echo "You can use the -little-endian or -big-endian switch to"
5204 echo "$0 to continue."
5210 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5211 if [ "$PLATFORM_MAC" = "yes" ]; then
5214 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5216 if [ "$F" -eq 0 ]; then
5217 CFG_HOST_ENDIAN
="Q_LITTLE_ENDIAN"
5218 elif [ "$F" -eq 1 ]; then
5219 CFG_HOST_ENDIAN
="Q_BIG_ENDIAN"
5222 echo "The host system byte order could not be detected!"
5223 echo "Turn on verbose messaging (-v) to see the final report."
5224 echo "You can use the -host-little-endian or -host-big-endian switch to"
5225 echo "$0 to continue."
5231 if [ "$CFG_ARMFPA" != "auto" ]; then
5232 if [ "$CFG_ARMFPA" = "yes" ]; then
5233 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5234 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5236 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5239 CFG_DOUBLEFORMAT
="normal"
5244 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5245 if [ "$PLATFORM_QWS" != "yes" ]; then
5246 CFG_DOUBLEFORMAT
=normal
5248 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5250 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5251 CFG_DOUBLEFORMAT
=normal
5252 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
5253 CFG_DOUBLEFORMAT
=normal
5254 elif [ "$F" -eq 10 ]; then
5255 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE"
5256 elif [ "$F" -eq 11 ]; then
5257 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG"
5258 elif [ "$F" -eq 12 ]; then
5259 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5261 elif [ "$F" -eq 13 ]; then
5262 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5266 echo "The system floating point format could not be detected."
5267 echo "This may cause data to be generated in a wrong format"
5268 echo "Turn on verbose messaging (-v) to see the final report."
5269 # we do not fail on this since this is a new test, and if it fails,
5270 # the old behavior should be correct in most cases
5271 CFG_DOUBLEFORMAT
=normal
5277 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stl
"STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5281 if [ "$CFG_STL" != "no" ]; then
5282 if [ "$HAVE_STL" = "yes" ]; then
5285 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5286 echo "STL support cannot be enabled due to functionality tests!"
5287 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5288 echo " If you believe this message is in error you may use the continue"
5289 echo " switch (-continue) to $0 to continue."
5297 # find if the platform supports IPv6
5298 if [ "$CFG_IPV6" != "no" ]; then
5299 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/ipv6
"IPv6" $L_FLAGS $I_FLAGS $l_FLAGS; then
5302 if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5303 echo "IPv6 support cannot be enabled due to functionality tests!"
5304 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5305 echo " If you believe this message is in error you may use the continue"
5306 echo " switch (-continue) to $0 to continue."
5314 # detect POSIX clock_gettime()
5315 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5316 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
5317 CFG_CLOCK_GETTIME
=yes
5319 CFG_CLOCK_GETTIME
=no
5323 # detect POSIX monotonic clocks
5324 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5325 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
5326 CFG_CLOCK_MONOTONIC
=yes
5328 CFG_CLOCK_MONOTONIC
=no
5330 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5331 CFG_CLOCK_MONOTONIC
=no
5335 if [ "$CFG_MREMAP" = "auto" ]; then
5336 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mremap
"mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5343 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5344 if [ "$CFG_GETADDRINFO" != "no" ]; then
5345 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getaddrinfo
"getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5348 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5349 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5350 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5351 echo " If you believe this message is in error you may use the continue"
5352 echo " switch (-continue) to $0 to continue."
5360 # find if the platform provides inotify
5361 if [ "$CFG_INOTIFY" != "no" ]; then
5362 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/inotify
"inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5365 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5366 echo "inotify support cannot be enabled due to functionality tests!"
5367 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5368 echo " If you believe this message is in error you may use the continue"
5369 echo " switch (-continue) to $0 to continue."
5377 # find if the platform provides if_nametoindex (ipv6 interface name support)
5378 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5379 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
5382 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5383 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5384 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5385 echo " If you believe this message is in error you may use the continue"
5386 echo " switch (-continue) to $0 to continue."
5394 # find if the platform provides getifaddrs (network interface enumeration)
5395 if [ "$CFG_GETIFADDRS" != "no" ]; then
5396 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getifaddrs
"getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5399 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5400 echo "getifaddrs support cannot be enabled due to functionality tests!"
5401 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5402 echo " If you believe this message is in error you may use the continue"
5403 echo " switch (-continue) to $0 to continue."
5411 # find if the platform supports X/Open Large File compilation environment
5412 if [ "$CFG_LARGEFILE" != "no" ]; then
5413 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
5416 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5417 echo "X/Open Large File support cannot be enabled due to functionality tests!"
5418 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5419 echo " If you believe this message is in error you may use the continue"
5420 echo " switch (-continue) to $0 to continue."
5429 if [ "$CFG_OPENSSL" != "no" ]; then
5430 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/openssl
"OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5431 if [ "$CFG_OPENSSL" = "auto" ]; then
5435 if ( [ "$CFG_OPENSSL" = "yes" ] ||
[ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5436 echo "OpenSSL support cannot be enabled due to functionality tests!"
5437 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5438 echo " If you believe this message is in error you may use the continue"
5439 echo " switch (-continue) to $0 to continue."
5447 if [ "$CFG_PTMALLOC" != "no" ]; then
5448 # build ptmalloc, copy .a file to lib/
5449 echo "Building ptmalloc. Please wait..."
5450 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
5451 mkdir
"$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
5453 QMakeVar add QMAKE_LFLAGS
"$outpath/lib/libptmalloc3.a"
5456 #-------------------------------------------------------------------------------
5457 # ask for all that hasn't been auto-detected or specified in the arguments
5458 #-------------------------------------------------------------------------------
5460 ### fix this: user input should be validated in a loop
5461 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PLATFORM_QWS" = "yes" ]; then
5463 echo "Choose pixel-depths to support:"
5465 echo " 1. 1bpp, black/white"
5466 echo " 4. 4bpp, grayscale"
5467 echo " 8. 8bpp, paletted"
5468 echo " 12. 12bpp, rgb 4-4-4"
5469 echo " 15. 15bpp, rgb 5-5-5"
5470 echo " 16. 16bpp, rgb 5-6-5"
5471 echo " 18. 18bpp, rgb 6-6-6"
5472 echo " 24. 24bpp, rgb 8-8-8"
5473 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
5474 echo " all. All supported depths"
5476 echo "Your choices (default 8,16,32):"
5478 if [ -z "$CFG_QWS_DEPTHS" ] ||
[ "$CFG_QWS_DEPTHS" = "yes" ]; then
5479 CFG_QWS_DEPTHS
=8,16,32
5482 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
5483 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
5484 CFG_QWS_DEPTHS
="1 4 8 12 15 16 18 24 32 generic"
5486 for D
in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
5488 1|
4|
8|
12|
15|
16|
18|
24|
32) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
5489 generic
) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
5494 # enable dwarf2 support on Mac
5495 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5496 QT_CONFIG
="$QT_CONFIG dwarf2"
5499 # Set the default arch. Select 32-bit/carbon if nothing else has
5500 # been specified on the configure line.
5501 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" == "" ]; then
5502 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
5504 if [ "$QT_MAC_DEFUALT_ARCH" == "x86_64" ]; then
5505 CFG_MAC_ARCHS
=" x86"
5506 elif [ "$QT_MAC_DEFUALT_ARCH" == "ppc64" ]; then
5507 CFG_MAC_ARCHS
=" ppc"
5509 CFG_MAC_ARCHS
=" $QT_MAC_DEFUALT_ARCH"
5512 [ "$OPT_VERBOSE" == "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
5515 # enable cocoa and/or carbon on Mac
5516 if [ "$CFG_MAC_COCOA" = "yes" ]; then
5517 # -cocoa on the command line disables carbon completely (i.e. use cocoa for 32-bit as well)
5520 # check which archs are in use, enable cocoa if we find a 64-bit one
5521 if echo "$CFG_MAC_ARCHS" |
grep 64 > /dev
/null
2>&1; then
5522 CFG_MAC_COCOA
="yes";
5523 CFG_MAC_CARBON
="no";
5524 if echo "$CFG_MAC_ARCHS" |
grep -w ppc
> /dev
/null
2>&1; then
5525 CFG_MAC_CARBON
="yes";
5527 if echo "$CFG_MAC_ARCHS" |
grep -w x86
> /dev
/null
2>&1; then
5528 CFG_MAC_CARBON
="yes";
5531 # no 64-bit archs found.
5536 # set the global Mac deployment target. This is overridden on an arch-by-arch basis
5537 # in some cases, see code further down
5538 case "$PLATFORM,$CFG_MAC_COCOA" in
5541 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.5
5546 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.4
5550 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.3
5554 # enable Qt 3 support functionality
5555 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5556 QT_CONFIG
="$QT_CONFIG qt3support"
5560 if [ "$CFG_PHONON" = "yes" ]; then
5561 QT_CONFIG
="$QT_CONFIG phonon"
5562 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5563 QT_CONFIG
="$QT_CONFIG phonon-backend"
5566 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_PHONON"
5569 # disable accessibility
5570 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5571 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5573 QT_CONFIG
="$QT_CONFIG accessibility"
5577 if [ "$CFG_OPENGL" = "no" ]; then
5578 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENGL"
5580 QT_CONFIG
="$QT_CONFIG opengl"
5583 if [ "$CFG_OPENGL" = "es1" ] ||
[ "$CFG_OPENGL" = "es1cl" ] ||
[ "$CFG_OPENGL" = "es2" ]; then
5584 if [ "$PLATFORM_QWS" = "yes" ]; then
5585 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
5586 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_USE_EGLWINDOWSURFACE"
5588 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES"
5591 if [ "$CFG_OPENGL" = "es1" ]; then
5592 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1"
5593 QT_CONFIG
="$QT_CONFIG opengles1"
5596 if [ "$CFG_OPENGL" = "es1cl" ]; then
5597 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1_CL"
5598 QT_CONFIG
="$QT_CONFIG opengles1cl"
5601 if [ "$CFG_OPENGL" = "es2" ]; then
5602 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5603 QT_CONFIG
="$QT_CONFIG opengles2"
5606 # safe execution environment
5607 if [ "$CFG_SXE" != "no" ]; then
5608 QT_CONFIG
="$QT_CONFIG sxe"
5611 # build up the variables for output
5612 if [ "$CFG_DEBUG" = "yes" ]; then
5613 QMAKE_OUTDIR
="${QMAKE_OUTDIR}debug"
5614 QMAKE_CONFIG
="$QMAKE_CONFIG debug"
5615 elif [ "$CFG_DEBUG" = "no" ]; then
5616 QMAKE_OUTDIR
="${QMAKE_OUTDIR}release"
5617 QMAKE_CONFIG
="$QMAKE_CONFIG release"
5619 if [ "$CFG_SHARED" = "yes" ]; then
5620 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-shared"
5621 QMAKE_CONFIG
="$QMAKE_CONFIG shared dll"
5622 elif [ "$CFG_SHARED" = "no" ]; then
5623 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-static"
5624 QMAKE_CONFIG
="$QMAKE_CONFIG static"
5626 if [ "$PLATFORM_QWS" = "yes" ]; then
5627 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
5628 QMAKE_CONFIG
="$QMAKE_CONFIG embedded"
5629 QT_CONFIG
="$QT_CONFIG embedded"
5630 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5632 QMakeVar
set PRECOMPILED_DIR
".pch/$QMAKE_OUTDIR"
5633 QMakeVar
set OBJECTS_DIR
".obj/$QMAKE_OUTDIR"
5634 QMakeVar
set MOC_DIR
".moc/$QMAKE_OUTDIR"
5635 QMakeVar
set RCC_DIR
".rcc/$QMAKE_OUTDIR"
5636 QMakeVar
set UI_DIR
".uic/$QMAKE_OUTDIR"
5637 if [ "$CFG_LARGEFILE" = "yes" ]; then
5638 QMAKE_CONFIG
="$QMAKE_CONFIG largefile"
5640 if [ "$CFG_STL" = "no" ]; then
5641 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STL"
5643 QMAKE_CONFIG
="$QMAKE_CONFIG stl"
5645 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5646 QMAKE_CONFIG
="$QMAKE_CONFIG GNUmake"
5648 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_exports"
5649 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_relocations"
5650 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG precompile_header"
5651 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5652 QMakeVar add QMAKE_CFLAGS
-g
5653 QMakeVar add QMAKE_CXXFLAGS
-g
5654 QMAKE_CONFIG
="$QMAKE_CONFIG separate_debug_info"
5656 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG mmx"
5657 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG 3dnow"
5658 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse"
5659 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse2"
5660 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG iwmmxt"
5661 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG $CFG_MAC_ARCHS"
5662 if [ "$CFG_IPV6" = "yes" ]; then
5663 QT_CONFIG
="$QT_CONFIG ipv6"
5665 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5666 QT_CONFIG
="$QT_CONFIG clock-gettime"
5668 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5669 QT_CONFIG
="$QT_CONFIG clock-monotonic"
5671 if [ "$CFG_MREMAP" = "yes" ]; then
5672 QT_CONFIG
="$QT_CONFIG mremap"
5674 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5675 QT_CONFIG
="$QT_CONFIG getaddrinfo"
5677 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5678 QT_CONFIG
="$QT_CONFIG ipv6ifname"
5680 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5681 QT_CONFIG
="$QT_CONFIG getifaddrs"
5683 if [ "$CFG_INOTIFY" = "yes" ]; then
5684 QT_CONFIG
="$QT_CONFIG inotify"
5686 if [ "$CFG_LIBJPEG" = "system" ]; then
5687 QT_CONFIG
="$QT_CONFIG system-jpeg"
5689 if [ "$CFG_JPEG" = "no" ]; then
5690 QT_CONFIG
="$QT_CONFIG no-jpeg"
5691 elif [ "$CFG_JPEG" = "yes" ]; then
5692 QT_CONFIG
="$QT_CONFIG jpeg"
5694 if [ "$CFG_LIBMNG" = "system" ]; then
5695 QT_CONFIG
="$QT_CONFIG system-mng"
5697 if [ "$CFG_MNG" = "no" ]; then
5698 QT_CONFIG
="$QT_CONFIG no-mng"
5699 elif [ "$CFG_MNG" = "yes" ]; then
5700 QT_CONFIG
="$QT_CONFIG mng"
5702 if [ "$CFG_LIBPNG" = "no" ]; then
5705 if [ "$CFG_LIBPNG" = "system" ]; then
5706 QT_CONFIG
="$QT_CONFIG system-png"
5708 if [ "$CFG_PNG" = "no" ]; then
5709 QT_CONFIG
="$QT_CONFIG no-png"
5710 elif [ "$CFG_PNG" = "yes" ]; then
5711 QT_CONFIG
="$QT_CONFIG png"
5713 if [ "$CFG_GIF" = "no" ]; then
5714 QT_CONFIG
="$QT_CONFIG no-gif"
5715 elif [ "$CFG_GIF" = "yes" ]; then
5716 QT_CONFIG
="$QT_CONFIG gif"
5718 if [ "$CFG_LIBTIFF" = "system" ]; then
5719 QT_CONFIG
="$QT_CONFIG system-tiff"
5721 if [ "$CFG_TIFF" = "no" ]; then
5722 QT_CONFIG
="$QT_CONFIG no-tiff"
5723 elif [ "$CFG_TIFF" = "yes" ]; then
5724 QT_CONFIG
="$QT_CONFIG tiff"
5726 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5727 QT_CONFIG
="$QT_CONFIG no-freetype"
5728 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5729 QT_CONFIG
="$QT_CONFIG system-freetype"
5731 QT_CONFIG
="$QT_CONFIG freetype"
5734 if [ "x$PLATFORM_MAC" = "xyes" ]; then
5735 #On Mac we implicitly link against libz, so we
5736 #never use the 3rdparty stuff.
5737 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB
="system"
5739 if [ "$CFG_ZLIB" = "yes" ]; then
5740 QT_CONFIG
="$QT_CONFIG zlib"
5741 elif [ "$CFG_ZLIB" = "system" ]; then
5742 QT_CONFIG
="$QT_CONFIG system-zlib"
5745 [ "$CFG_NIS" = "yes" ] && QT_CONFIG
="$QT_CONFIG nis"
5746 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG
="$QT_CONFIG cups"
5747 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG
="$QT_CONFIG iconv"
5748 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG
="$QT_CONFIG gnu-libiconv"
5749 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG
="$QT_CONFIG glib"
5750 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG
="$QT_CONFIG gstreamer"
5751 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG
="$QT_CONFIG dbus"
5752 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG
="$QT_CONFIG dbus dbus-linked"
5753 [ "$CFG_NAS" = "system" ] && QT_CONFIG
="$QT_CONFIG nas"
5754 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG
="$QT_CONFIG openssl"
5755 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG
="$QT_CONFIG openssl-linked"
5757 if [ "$PLATFORM_X11" = "yes" ]; then
5758 [ "$CFG_SM" = "yes" ] && QT_CONFIG
="$QT_CONFIG x11sm"
5760 # for some reason, the following libraries are not always built shared,
5761 # so *every* program/lib (including Qt) has to link against them
5762 if [ "$CFG_XSHAPE" = "yes" ]; then
5763 QT_CONFIG
="$QT_CONFIG xshape"
5765 if [ "$CFG_XINERAMA" = "yes" ]; then
5766 QT_CONFIG
="$QT_CONFIG xinerama"
5767 QMakeVar
set QMAKE_LIBS_X11
'-lXinerama $$QMAKE_LIBS_X11'
5769 if [ "$CFG_XCURSOR" = "yes" ]; then
5770 QT_CONFIG
="$QT_CONFIG xcursor"
5771 QMakeVar
set QMAKE_LIBS_X11
'-lXcursor $$QMAKE_LIBS_X11'
5773 if [ "$CFG_XFIXES" = "yes" ]; then
5774 QT_CONFIG
="$QT_CONFIG xfixes"
5775 QMakeVar
set QMAKE_LIBS_X11
'-lXfixes $$QMAKE_LIBS_X11'
5777 if [ "$CFG_XRANDR" = "yes" ]; then
5778 QT_CONFIG
="$QT_CONFIG xrandr"
5779 if [ "$CFG_XRENDER" != "yes" ]; then
5780 # libXrandr uses 1 function from libXrender, so we always have to have it :/
5781 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr -lXrender $$QMAKE_LIBS_X11'
5783 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr $$QMAKE_LIBS_X11'
5786 if [ "$CFG_XRENDER" = "yes" ]; then
5787 QT_CONFIG
="$QT_CONFIG xrender"
5788 QMakeVar
set QMAKE_LIBS_X11
'-lXrender $$QMAKE_LIBS_X11'
5790 if [ "$CFG_MITSHM" = "yes" ]; then
5791 QT_CONFIG
="$QT_CONFIG mitshm"
5793 if [ "$CFG_FONTCONFIG" = "yes" ]; then
5794 QT_CONFIG
="$QT_CONFIG fontconfig"
5796 if [ "$CFG_XINPUT" = "yes" ]; then
5797 QMakeVar
set QMAKE_LIBS_X11
'-lXi $$QMAKE_LIBS_X11'
5799 if [ "$CFG_XINPUT" = "yes" ]; then
5800 QT_CONFIG
="$QT_CONFIG xinput tablet"
5802 if [ "$CFG_XKB" = "yes" ]; then
5803 QT_CONFIG
="$QT_CONFIG xkb"
5807 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES
"$D_FLAGS"
5808 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS
"$L_FLAGS"
5809 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS
"$l_FLAGS"
5811 if [ "$PLATFORM_MAC" = "yes" ]; then
5812 if [ "$CFG_RPATH" = "yes" ]; then
5813 QMAKE_CONFIG
="$QMAKE_CONFIG absolute_library_soname"
5815 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
5816 if [ -n "$RPATH_FLAGS" ]; then
5818 echo "ERROR: -R cannot be used on this platform as \$QMAKE_RPATH is"
5822 elif [ "$CFG_RPATH" = "yes" ]; then
5823 RPATH_MESSAGE
=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5827 if [ "$CFG_RPATH" = "yes" ]; then
5828 # set the default rpath to the library installation directory
5829 RPATH_FLAGS
="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5831 if [ -n "$RPATH_FLAGS" ]; then
5832 # add the user defined rpaths
5833 QMakeVar add QMAKE_RPATHDIR
"$RPATH_FLAGS"
5837 if [ '!' -z "$I_FLAGS" ]; then
5838 # add the user define include paths
5839 QMakeVar add QMAKE_CFLAGS
"$I_FLAGS"
5840 QMakeVar add QMAKE_CXXFLAGS
"$I_FLAGS"
5843 # turn off exceptions for the compilers that support it
5844 if [ "$PLATFORM_QWS" = "yes" ]; then
5845 COMPILER
=`echo $XPLATFORM | cut -f 3- -d-`
5847 COMPILER
=`echo $PLATFORM | cut -f 2- -d-`
5849 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
5853 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5854 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG exceptions"
5858 # Some Qt modules are too advanced in C++ for some old compilers
5859 # Detect here the platforms where they are known to work.
5861 # See Qt documentation for more information on which features are
5862 # supported and on which compilers.
5864 canBuildQtXmlPatterns
="yes"
5865 canBuildWebKit
="$HAVE_STL"
5867 # WebKit requires stdint.h
5868 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stdint
"Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
5869 if [ $?
!= "0" ]; then
5873 case "$XPLATFORM" in
5875 # PA-RISC's assembly is too limited
5876 # gcc 3.4 on that platform can't build QtXmlPatterns
5877 # the assembly it generates cannot be compiled
5879 # Check gcc's version
5880 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5884 canBuildQtXmlPatterns
="no"
5888 canBuildQtXmlPatterns
="no"
5893 # Check gcc's version
5894 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5902 canBuildQtXmlPatterns
="no"
5907 # Check the compiler version
5908 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5911 canBuildQtXmlPatterns
="no"
5917 canBuildQtXmlPatterns
="no"
5924 canBuildQtXmlPatterns
="no"
5931 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
5932 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
5935 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
5936 CFG_XMLPATTERNS
="$canBuildQtXmlPatterns"
5937 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
5938 CFG_XMLPATTERNS
="no"
5940 if [ "$CFG_XMLPATTERNS" = "yes" ]; then
5941 QT_CONFIG
="$QT_CONFIG xmlpatterns"
5943 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
5946 if [ "$CFG_SVG" = "yes" ]; then
5947 QT_CONFIG
="$QT_CONFIG svg"
5949 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SVG"
5952 if [ "$CFG_WEBKIT" = "auto" ]; then
5953 CFG_WEBKIT
="$canBuildWebKit"
5956 if [ "$CFG_WEBKIT" = "yes" ]; then
5957 QT_CONFIG
="$QT_CONFIG webkit"
5958 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
5962 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_WEBKIT"
5965 if [ "$CFG_SCRIPTTOOLS" = "auto" ]; then
5966 CFG_SCRIPTTOOLS
="yes"
5969 if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
5970 QT_CONFIG
="$QT_CONFIG scripttools"
5971 CFG_SCRIPTTOOLS
="yes"
5973 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
5976 if [ "$CFG_EXCEPTIONS" = "no" ]; then
5979 QMakeVar add QMAKE_CFLAGS
-fno-exceptions
5980 QMakeVar add QMAKE_CXXFLAGS
-fno-exceptions
5981 QMakeVar add QMAKE_LFLAGS
-fno-exceptions
5986 QMakeVar add QMAKE_CFLAGS
-LANG:exceptions
=off
5987 QMakeVar add QMAKE_CXXFLAGS
-LANG:exceptions
=off
5988 QMakeVar add QMAKE_LFLAGS
-LANG:exceptions
=off
5995 QMAKE_CONFIG
="$QMAKE_CONFIG exceptions_off"
5998 # On Mac, set the minimum deployment target using Xarch when that is supported (10.5 and up).
5999 # On 10.4 the deployment version is set to 10.3 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET env. variable
6000 # "-cocoa" on the command line means Cocoa is used in 32-bit mode also, in this case fall back on
6001 # QMAKE_MACOSX_DEPLOYMENT_TARGET which will be set to 10.5.
6002 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] && [ "$COMMANDLINE_MAC_COCOA" != "yes" ]; then
6003 if echo "$CFG_MAC_ARCHS" |
grep '\<x86\>' > /dev
/null
2>&1; then
6004 QMakeVar add QMAKE_CFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6005 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6006 QMakeVar add QMAKE_LFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6007 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86
"-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
6009 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc\>' > /dev
/null
2>&1; then
6010 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc -mmacosx-version-min=10.3"
6011 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc -mmacosx-version-min=10.3"
6012 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc -mmacosx-version-min=10.3"
6013 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC
"-arch ppc -Xarch_ppc -mmacosx-version-min=10.3"
6015 if echo "$CFG_MAC_ARCHS" |
grep '\<x86_64\>' > /dev
/null
2>&1; then
6016 QMakeVar add QMAKE_CFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6017 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6018 QMakeVar add QMAKE_LFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6019 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64
"-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
6021 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc64\>' > /dev
/null
2>&1; then
6022 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6023 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6024 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6025 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64
"-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
6029 #-------------------------------------------------------------------------------
6030 # generate QT_BUILD_KEY
6031 #-------------------------------------------------------------------------------
6033 # some compilers generate binary incompatible code between different versions,
6034 # so we need to generate a build key that is different between these compilers
6038 COMPILER_VERSION
=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6040 case "$COMPILER_VERSION" in
6042 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6043 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6044 QT_GCC_PATCH_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6047 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6048 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6049 QT_GCC_PATCH_VERSION
=0
6053 case "$COMPILER_VERSION" in
6055 COMPILER_VERSION
="2.95.*"
6058 COMPILER_VERSION
="3.*"
6061 COMPILER_VERSION
="4"
6066 [ '!' -z "$COMPILER_VERSION" ] && COMPILER
="g++-${COMPILER_VERSION}"
6073 # QT_CONFIG can contain the following:
6075 # Things that affect the Qt API/ABI:
6078 # minimal-config small-config medium-config large-config full-config
6080 # Different edition modules:
6081 # network canvas table xml opengl sql
6086 # Things that do not affect the Qt API/ABI:
6087 # system-jpeg no-jpeg jpeg
6088 # system-mng no-mng mng
6089 # system-png no-png png
6090 # system-zlib no-zlib zlib
6091 # system-libtiff no-libtiff
6105 # X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb
6106 # Embedded: embedded freetype
6112 # determine the build options
6113 for config_option
in $QMAKE_CONFIG $QT_CONFIG; do
6115 case "$config_option" in
6117 # take the last *-config setting. this is the highest config being used,
6118 # and is the one that we will use for tagging plugins
6119 BUILD_CONFIG
="$config_option"
6123 # these config options affect the Qt API/ABI. they should influence
6124 # the generation of the buildkey, so we don't skip them
6128 *) # skip all other options since they don't affect the Qt API/ABI.
6132 if [ "$SKIP" = "no" ]; then
6133 BUILD_OPTIONS
="$BUILD_OPTIONS $config_option"
6137 # put the options that we are missing into .options
6139 for opt
in `echo $ALL_OPTIONS`; do
6141 if echo $BUILD_OPTIONS |
grep $opt >/dev
/null
2>&1; then
6144 if [ "$SKIP" = "no" ]; then
6145 echo "$opt" >> .options
6149 # reconstruct BUILD_OPTIONS with a sorted negative feature list
6150 # (ie. only things that are missing are will be put into the build key)
6152 if [ -f .options
]; then
6153 for opt
in `sort -f .options | uniq`; do
6154 BUILD_OPTIONS
="$BUILD_OPTIONS no-$opt"
6159 # QT_NO* defines affect the Qt API (and binary compatibility). they need
6160 # to be included in the build key
6161 for build_option
in $D_FLAGS; do
6162 build_option
=`echo $build_option | cut -d \" -f 2 -`
6163 case "$build_option" in
6165 echo "$build_option" >> .options
6168 # skip all other compiler defines
6173 # sort the compile time defines (helps ensure that changes in this configure
6174 # script don't affect the QT_BUILD_KEY generation)
6175 if [ -f .options
]; then
6176 for opt
in `sort -f .options | uniq`; do
6177 BUILD_OPTIONS
="$BUILD_OPTIONS $opt"
6182 BUILD_OPTIONS
="$BUILD_CONFIG $BUILD_OPTIONS"
6183 # extract the operating system from the XPLATFORM
6184 TARGET_OPERATING_SYSTEM
=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
6186 # when cross-compiling, don't include build-host information (build key is target specific)
6187 QT_BUILD_KEY
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6188 if [ -n "$QT_NAMESPACE" ]; then
6189 QT_BUILD_KEY
="$QT_BUILD_KEY $QT_NAMESPACE"
6191 MAC_NEED_TWO_BUILD_KEYS
="no"
6192 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
6193 QT_BUILD_KEY_CARBON
=$QT_BUILD_KEY
6194 TARGET_OPERATING_SYSTEM
="$TARGET_OPERATING_SYSTEM-cocoa"
6195 QT_BUILD_KEY_COCOA
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6196 if [ "$CFG_MAC_CARBON" = "no" ]; then
6197 QT_BUILD_KEY
=$QT_BUILD_KEY_COCOA
6199 MAC_NEED_TWO_BUILD_KEYS
="yes"
6202 # don't break loading plugins build with an older version of Qt
6203 QT_BUILD_KEY_COMPAT
=
6204 if [ "$QT_CROSS_COMPILE" = "no" ]; then
6205 # previous versions of Qt used a build key built from the uname
6206 QT_BUILD_KEY_COMPAT
="$CFG_USER_BUILD_KEY $UNAME_MACHINE $UNAME_SYSTEM $COMPILER $BUILD_OPTIONS"
6208 # strip out leading/trailing/extra whitespace
6209 QT_BUILD_KEY
=`echo $QT_BUILD_KEY | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6210 QT_BUILD_KEY_COMPAT
=`echo $QT_BUILD_KEY_COMPAT | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6212 #-------------------------------------------------------------------------------
6213 # part of configuration information goes into qconfig.h
6214 #-------------------------------------------------------------------------------
6216 case "$CFG_QCONFIG" in
6218 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6221 tmpconfig
="$outpath/src/corelib/global/qconfig.h.new"
6222 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6223 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6224 echo "#endif" >>"$tmpconfig"
6228 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6232 # define QT_EDITION $QT_EDITION
6235 /* Machine byte-order */
6236 #define Q_BIG_ENDIAN 4321
6237 #define Q_LITTLE_ENDIAN 1234
6240 if [ "$MAC_NEED_TWO_BUILD_KEYS" = "no" ]; then
6241 echo "#define QT_BUILD_KEY \"$QT_BUILD_KEY\"" \
6242 >> "$outpath/src/corelib/global/qconfig.h.new"
6244 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6246 #define QT_BUILD_KEY_CARBON "$QT_BUILD_KEY_CARBON"
6247 #define QT_BUILD_KEY_COCOA "$QT_BUILD_KEY_COCOA"
6251 if [ -n "$QT_BUILD_KEY_COMPAT" ]; then
6252 echo "#define QT_BUILD_KEY_COMPAT \"$QT_BUILD_KEY_COMPAT\"" \
6253 >> "$outpath/src/corelib/global/qconfig.h.new"
6255 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6257 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6258 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6259 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6260 #if defined(__BIG_ENDIAN__)
6261 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6262 #elif defined(__LITTLE_ENDIAN__)
6263 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6265 # error "Unable to determine byte order!"
6269 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6271 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6272 if [ "$CFG_ENDIAN" = "auto" ]; then
6273 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6274 #if defined(__BIG_ENDIAN__)
6275 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6276 #elif defined(__LITTLE_ENDIAN__)
6277 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6279 # error "Unable to determine byte order!"
6283 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6285 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6287 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6288 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6289 /* Non-IEEE double format */
6290 #define Q_DOUBLE_LITTLE "01234567"
6291 #define Q_DOUBLE_BIG "76543210"
6292 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6293 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6294 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6297 if [ "$CFG_ARMFPA" = "yes" ]; then
6298 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6299 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6300 #ifndef QT_BOOTSTRAPPED
6305 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6309 CFG_ARCH_STR
=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6310 CFG_HOST_ARCH_STR
=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6311 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6312 /* Machine Architecture */
6313 #ifndef QT_BOOTSTRAPPED
6314 # define QT_ARCH_${CFG_ARCH_STR}
6316 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6320 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6321 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6323 if [ "$CFG_LARGEFILE" = "yes" ]; then
6324 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6327 # if both carbon and cocoa are specified, enable the autodetection code.
6328 if [ "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
6329 echo "#define AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6330 elif [ "$CFG_MAC_COCOA" = "yes" ]; then
6331 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6334 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6335 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6338 if [ "$PLATFORM_MAC" = "yes" ]; then
6339 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6340 #if defined(__LP64__)
6341 # define QT_POINTER_SIZE 8
6343 # define QT_POINTER_SIZE 4
6347 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6348 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6352 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6354 if [ "$CFG_DEV" = "yes" ]; then
6355 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6358 # Embedded compile time options
6359 if [ "$PLATFORM_QWS" = "yes" ]; then
6360 # Add QWS to config.h
6361 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_WS_QWS"
6363 # Add excluded decorations to $QCONFIG_FLAGS
6364 decors
=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
6365 for decor
in $decors; do
6366 NODECORATION
=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6367 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
6370 # Figure which embedded drivers which are turned off
6371 CFG_GFX_OFF
="$CFG_GFX_AVAILABLE"
6372 for ADRIVER
in $CFG_GFX_ON; do
6373 CFG_GFX_OFF
=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
6376 CFG_KBD_OFF
="$CFG_KBD_AVAILABLE"
6377 # the um driver is currently not in the available list for external builds
6378 if [ "$CFG_DEV" = "no" ]; then
6379 CFG_KBD_OFF
="$CFG_KBD_OFF um"
6381 for ADRIVER
in $CFG_KBD_ON; do
6382 CFG_KBD_OFF
=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
6385 CFG_MOUSE_OFF
="$CFG_MOUSE_AVAILABLE"
6386 for ADRIVER
in $CFG_MOUSE_ON; do
6387 CFG_MOUSE_OFF
=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
6390 for DRIVER
in $CFG_GFX_OFF; do
6391 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6392 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
6395 for DRIVER
in $CFG_KBD_OFF; do
6396 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6397 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
6400 for DRIVER
in $CFG_MOUSE_OFF; do
6401 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6402 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
6406 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6407 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6410 # Add turned on SQL drivers
6411 for DRIVER
in $CFG_SQL_AVAILABLE; do
6412 eval "VAL=\$CFG_SQL_$DRIVER"
6415 ONDRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6416 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6417 SQL_DRIVERS
="$SQL_DRIVERS $DRIVER"
6420 SQL_PLUGINS
="$SQL_PLUGINS $DRIVER"
6426 QMakeVar
set sql-drivers
"$SQL_DRIVERS"
6427 QMakeVar
set sql-plugins
"$SQL_PLUGINS"
6429 # Add other configuration options to the qconfig.h file
6430 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6431 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
6432 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6433 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6434 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
6435 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ZLIB"
6436 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6437 [ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6"
6438 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SXE"
6439 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_DBUS"
6441 if [ "$PLATFORM_QWS" != "yes" ]; then
6442 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
6443 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
6446 # X11/Unix/Mac only configs
6447 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CUPS"
6448 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ICONV"
6449 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GLIB"
6450 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6451 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6452 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6453 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MREMAP"
6454 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6455 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6456 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6457 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_INOTIFY"
6458 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NAS"
6459 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NIS"
6460 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENSSL"
6461 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6463 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6464 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XCURSOR"
6465 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XFIXES"
6466 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6467 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINERAMA"
6468 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XKB"
6469 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRANDR"
6470 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRENDER"
6471 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MITSHM"
6472 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SHAPE"
6473 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6475 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6476 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6477 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6478 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6479 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6481 # sort QCONFIG_FLAGS for neatness if we can
6482 [ '!' -z "$AWK" ] && QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6483 QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS`
6485 if [ -n "$QCONFIG_FLAGS" ]; then
6486 for cfg
in $QCONFIG_FLAGS; do
6487 cfgd
=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6488 cfg
=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6489 # figure out define logic, so we can output the correct
6490 # ifdefs to override the global defines in a project
6492 if [ true
] && echo "$cfgd" |
grep 'QT_NO_' >/dev
/null
2>&1; then
6493 # QT_NO_option can be forcefully turned on by QT_option
6494 cfgdNeg
=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6495 elif [ true
] && echo "$cfgd" |
grep 'QT_' >/dev
/null
2>&1; then
6496 # QT_option can be forcefully turned off by QT_NO_option
6497 cfgdNeg
=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6500 if [ -z $cfgdNeg ]; then
6501 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6508 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6509 #if defined($cfgd) && defined($cfgdNeg)
6511 #elif !defined($cfgd) && !defined($cfgdNeg)
6520 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6521 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6522 #define QT_VISIBILITY_AVAILABLE
6527 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6528 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6529 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6531 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w
"$outpath/src/corelib/global/qconfig.h"
6532 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6533 chmod -w "$outpath/src/corelib/global/qconfig.h"
6534 for conf
in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
6535 if [ '!' -f "$conf" ]; then
6536 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
6541 #-------------------------------------------------------------------------------
6542 # save configuration into qconfig.pri
6543 #-------------------------------------------------------------------------------
6545 QTCONFIG
="$outpath/mkspecs/qconfig.pri"
6546 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG no_mocdepend"
6547 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6548 if [ "$CFG_DEBUG" = "yes" ]; then
6549 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG debug"
6550 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6551 QT_CONFIG
="$QT_CONFIG release"
6553 QT_CONFIG
="$QT_CONFIG debug"
6554 elif [ "$CFG_DEBUG" = "no" ]; then
6555 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG release"
6556 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6557 QT_CONFIG
="$QT_CONFIG debug"
6559 QT_CONFIG
="$QT_CONFIG release"
6561 if [ "$CFG_STL" = "yes" ]; then
6562 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG stl"
6564 if [ "$CFG_FRAMEWORK" = "no" ]; then
6565 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_no_framework"
6567 QT_CONFIG
="$QT_CONFIG qt_framework"
6568 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_framework"
6570 if [ "$PLATFORM_MAC" = "yes" ]; then
6571 QT_CONFIG
="$QT_CONFIG $CFG_MAC_ARCHS"
6574 # Make the application arch follow the Qt arch for single arch builds.
6575 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
6576 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
6577 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
6580 cat >>"$QTCONFIG.tmp" <<EOF
6582 CONFIG += $QTCONFIG_CONFIG
6584 QT_EDITION = $Edition
6585 QT_CONFIG += $QT_CONFIG
6588 QT_VERSION = $QT_VERSION
6589 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6590 QT_MINOR_VERSION = $QT_MINOR_VERSION
6591 QT_PATCH_VERSION = $QT_PATCH_VERSION
6594 QT_LIBINFIX = $QT_LIBINFIX
6595 QT_NAMESPACE = $QT_NAMESPACE
6596 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
6599 if [ "$CFG_RPATH" = "yes" ]; then
6600 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
6602 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6603 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6604 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6605 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6607 # replace qconfig.pri if it differs from the newly created temp file
6608 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6609 rm -f "$QTCONFIG.tmp"
6611 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6614 #-------------------------------------------------------------------------------
6615 # save configuration into .qmake.cache
6616 #-------------------------------------------------------------------------------
6618 CACHEFILE
="$outpath/.qmake.cache"
6619 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6620 cat >>"$CACHEFILE.tmp" <<EOF
6621 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
6622 QT_SOURCE_TREE = \$\$quote($relpath)
6623 QT_BUILD_TREE = \$\$quote($outpath)
6624 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6625 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
6626 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
6628 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6629 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
6630 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
6631 QMAKE_UIC3 = \$\$QT_BUILD_TREE/bin/uic3
6632 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
6633 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
6634 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6635 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6639 if [ -n "$QT_CFLAGS_PSQL" ]; then
6640 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp"
6642 if [ -n "$QT_LFLAGS_PSQL" ]; then
6643 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$CACHEFILE.tmp"
6645 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6646 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$CACHEFILE.tmp"
6648 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6649 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$CACHEFILE.tmp"
6651 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6652 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$CACHEFILE.tmp"
6654 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6655 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$CACHEFILE.tmp"
6658 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6659 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
6662 #dump in the OPENSSL_LIBS info
6663 if [ '!' -z "$OPENSSL_LIBS" ]; then
6664 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp"
6665 elif [ "$CFG_OPENSSL" = "linked" ]; then
6666 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$CACHEFILE.tmp"
6669 #dump in the SDK info
6670 if [ '!' -z "$CFG_SDK" ]; then
6671 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$CACHEFILE.tmp"
6674 # mac gcc -Xarch support
6675 if [ "$CFG_MAC_XARCH" = "no" ]; then
6676 echo "QMAKE_MAC_XARCH = no" >> "$CACHEFILE.tmp"
6679 #dump the qmake spec
6680 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6681 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6683 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6687 cat "$QMAKE_VARS_FILE" >> "$CACHEFILE.tmp"
6688 rm -f "$QMAKE_VARS_FILE" 2>/dev
/null
6692 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4
>/dev
/null
2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL
="yes"
6693 if [ "$CFG_INCREMENTAL" = "yes" ]; then
6694 find "$relpath" -perm u
+w
-mtime -3 |
grep 'cpp$' |
while read f
; do
6695 # don't need to worry about generated files
6696 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
6697 basename "$f" |
grep '^moc_' >/dev
/null
2>&1 && continue
6699 INCREMENTAL
="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
6701 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
6702 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
6705 # replace .qmake.cache if it differs from the newly created temp file
6706 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6707 rm -f "$CACHEFILE.tmp"
6709 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6712 #-------------------------------------------------------------------------------
6713 # give feedback on configuration
6714 #-------------------------------------------------------------------------------
6718 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6721 This target is using the GNU C++ compiler ($PLATFORM).
6723 Recent versions of this compiler automatically include code for
6724 exceptions, which increase both the size of the Qt libraries and
6725 the amount of memory taken by your applications.
6727 You may choose to re-run `basename $0` with the -no-exceptions
6728 option to compile Qt without exceptions. This is completely binary
6729 compatible, and existing applications will continue to work.
6737 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6740 This target is using the MIPSpro C++ compiler ($PLATFORM).
6742 You may choose to re-run `basename $0` with the -no-exceptions
6743 option to compile Qt without exceptions. This will make the
6744 size of the Qt library smaller and reduce the amount of memory
6745 taken by your applications.
6756 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" == "yes" ]; then
6758 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
6759 in debug mode will run out of memory on systems with 2GB or less.
6760 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
6761 -no-webkit or -release to skip webkit debug.
6766 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6767 echo "Build type: $PLATFORM"
6769 echo "Building on: $PLATFORM"
6770 echo "Building for: $XPLATFORM"
6773 if [ "$PLATFORM_MAC" = "yes" ]; then
6774 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
6776 echo "Architecture: $CFG_ARCH"
6779 if [ "$PLATFORM_QWS" = "yes" ]; then
6780 echo "Host architecture: $CFG_HOST_ARCH"
6783 if [ "$PLATFORM_MAC" = "yes" ]; then
6784 if [ "$CFG_MAC_COCOA" = "yes" ]; then
6785 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6786 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
6788 echo "Using framework: Cocoa"
6791 echo "Using framework: Carbon"
6795 if [ -n "$PLATFORM_NOTES" ]; then
6796 echo "Platform notes:"
6797 echo "$PLATFORM_NOTES"
6802 if [ "$OPT_VERBOSE" = "yes" ]; then
6803 if echo '\c' |
grep '\c' >/dev
/null
; then
6804 echo -n "qmake vars .......... "
6806 echo "qmake vars .......... \c"
6808 cat "$QMAKE_VARS_FILE" |
tr '\n' ' '
6809 echo "qmake switches ...... $QMAKE_SWITCHES"
6812 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ......... $INCREMENTAL"
6813 echo "Build ............... $CFG_BUILD_PARTS"
6814 echo "Configuration ....... $QMAKE_CONFIG $QT_CONFIG"
6815 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6816 echo "Debug ............... yes (combined)"
6817 if [ "$CFG_DEBUG" = "yes" ]; then
6818 echo "Default Link ........ debug"
6820 echo "Default Link ........ release"
6823 echo "Debug ............... $CFG_DEBUG"
6825 echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
6826 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
6827 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
6828 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
6829 echo "QtScriptTools module $CFG_SCRIPTTOOLS"
6830 echo "QtXmlPatterns module $CFG_XMLPATTERNS"
6831 echo "Phonon module ....... $CFG_PHONON"
6832 echo "SVG module .......... $CFG_SVG"
6833 echo "WebKit module ....... $CFG_WEBKIT"
6834 echo "STL support ......... $CFG_STL"
6835 echo "PCH support ......... $CFG_PRECOMPILE"
6836 echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
6837 if [ "${CFG_ARCH}" = "arm" ]; then
6838 echo "iWMMXt support ...... ${CFG_IWMMXT}"
6840 [ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
6841 echo "IPv6 support ........ $CFG_IPV6"
6842 echo "IPv6 ifname support . $CFG_IPV6IFNAME"
6843 echo "getaddrinfo support . $CFG_GETADDRINFO"
6844 echo "getifaddrs support .. $CFG_GETIFADDRS"
6845 echo "Accessibility ....... $CFG_ACCESSIBILITY"
6846 echo "NIS support ......... $CFG_NIS"
6847 echo "CUPS support ........ $CFG_CUPS"
6848 echo "Iconv support ....... $CFG_ICONV"
6849 echo "Glib support ........ $CFG_GLIB"
6850 echo "GStreamer support ... $CFG_GSTREAMER"
6851 echo "Large File support .. $CFG_LARGEFILE"
6852 echo "GIF support ......... $CFG_GIF"
6853 if [ "$CFG_TIFF" = "no" ]; then
6854 echo "TIFF support ........ $CFG_TIFF"
6856 echo "TIFF support ........ $CFG_TIFF ($CFG_LIBTIFF)"
6858 if [ "$CFG_JPEG" = "no" ]; then
6859 echo "JPEG support ........ $CFG_JPEG"
6861 echo "JPEG support ........ $CFG_JPEG ($CFG_LIBJPEG)"
6863 if [ "$CFG_PNG" = "no" ]; then
6864 echo "PNG support ......... $CFG_PNG"
6866 echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
6868 if [ "$CFG_MNG" = "no" ]; then
6869 echo "MNG support ......... $CFG_MNG"
6871 echo "MNG support ......... $CFG_MNG ($CFG_LIBMNG)"
6873 echo "zlib support ........ $CFG_ZLIB"
6874 echo "Session management .. $CFG_SM"
6875 if [ "$PLATFORM_QWS" = "yes" ]; then
6876 echo "Embedded support .... $CFG_EMBEDDED"
6877 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
6878 echo "Freetype2 support ... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
6880 echo "Freetype2 support ... $CFG_QWS_FREETYPE"
6882 # Normalize the decoration output first
6883 CFG_GFX_ON
=`echo ${CFG_GFX_ON}`
6884 CFG_GFX_PLUGIN
=`echo ${CFG_GFX_PLUGIN}`
6885 echo "Graphics (qt) ....... ${CFG_GFX_ON}"
6886 echo "Graphics (plugin) ... ${CFG_GFX_PLUGIN}"
6887 CFG_DECORATION_ON
=`echo ${CFG_DECORATION_ON}`
6888 CFG_DECORATION_PLUGIN
=`echo ${CFG_DECORATION_PLUGIN}`
6889 echo "Decorations (qt) .... $CFG_DECORATION_ON"
6890 echo "Decorations (plugin) $CFG_DECORATION_PLUGIN"
6891 CFG_KBD_ON
=`echo ${CFG_KBD_ON}`
6892 CFG_KBD_PLUGIN
=`echo ${CFG_KBD_PLUGIN}`
6893 echo "Keyboard driver (qt). ${CFG_KBD_ON}"
6894 echo "Keyboard driver (plugin) ${CFG_KBD_PLUGIN}"
6895 CFG_MOUSE_ON
=`echo ${CFG_MOUSE_ON}`
6896 CFG_MOUSE_PLUGIN
=`echo ${CFG_MOUSE_PLUGIN}`
6897 echo "Mouse driver (qt) ... $CFG_MOUSE_ON"
6898 echo "Mouse driver (plugin) $CFG_MOUSE_PLUGIN"
6900 if [ "$CFG_OPENGL" = "desktop" ]; then
6901 echo "OpenGL support ...... yes (Desktop OpenGL)"
6902 elif [ "$CFG_OPENGL" = "es1" ]; then
6903 echo "OpenGL support ...... yes (OpenGL ES 1.x Common profile)"
6904 elif [ "$CFG_OPENGL" = "es1cl" ]; then
6905 echo "OpenGL support ...... yes (OpenGL ES 1.x Common Lite profile)"
6906 elif [ "$CFG_OPENGL" = "es2" ]; then
6907 echo "OpenGL support ...... yes (OpenGL ES 2.x)"
6909 echo "OpenGL support ...... no"
6911 if [ "$PLATFORM_X11" = "yes" ]; then
6912 echo "NAS sound support ... $CFG_NAS"
6913 echo "XShape support ...... $CFG_XSHAPE"
6914 echo "Xinerama support .... $CFG_XINERAMA"
6915 echo "Xcursor support ..... $CFG_XCURSOR"
6916 echo "Xfixes support ...... $CFG_XFIXES"
6917 echo "Xrandr support ...... $CFG_XRANDR"
6918 echo "Xrender support ..... $CFG_XRENDER"
6919 echo "Xi support .......... $CFG_XINPUT"
6920 echo "MIT-SHM support ..... $CFG_MITSHM"
6921 echo "FontConfig support .. $CFG_FONTCONFIG"
6922 echo "XKB Support ......... $CFG_XKB"
6923 echo "immodule support .... $CFG_IM"
6924 echo "GTK theme support ... $CFG_QGTKSTYLE"
6926 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support ....... $CFG_SQL_mysql"
6927 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support .. $CFG_SQL_psql"
6928 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........ $CFG_SQL_odbc"
6929 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ......... $CFG_SQL_oci"
6930 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ......... $CFG_SQL_tds"
6931 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ......... $CFG_SQL_db2"
6932 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ... $CFG_SQL_ibase"
6933 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support .... $CFG_SQL_sqlite2"
6934 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ...... $CFG_SQL_sqlite ($CFG_SQLITE)"
6937 if [ "$CFG_OPENSSL" = "yes" ]; then
6938 OPENSSL_LINKAGE
="(run-time)"
6939 elif [ "$CFG_OPENSSL" = "linked" ]; then
6940 OPENSSL_LINKAGE
="(linked)"
6942 echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
6944 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
6946 # complain about not being able to use dynamic plugins if we are using a static build
6947 if [ "$CFG_SHARED" = "no" ]; then
6949 echo "WARNING: Using static linking will disable the use of dynamically"
6950 echo "loaded plugins. Make sure to import all needed static plugins,"
6951 echo "or compile needed modules into the library."
6954 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6956 echo "NOTE: When linking against OpenSSL, you can override the default"
6957 echo "library names through OPENSSL_LIBS."
6959 echo " ./configure -openssl-linked OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto'"
6962 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6964 echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
6969 sepath
=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6974 #-------------------------------------------------------------------------------
6975 # build makefiles based on the configuration
6976 #-------------------------------------------------------------------------------
6978 echo "Finding project files. Please wait..."
6979 "$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
6980 if [ -f "${relpath}/projects.pro" ]; then
6981 mkfile
="${outpath}/Makefile"
6982 [ -f "$mkfile" ] && chmod +w
"$mkfile"
6983 QTDIR
="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro" -o "$mkfile"
6986 # .projects -> projects to process
6987 # .projects.1 -> qt and moc
6988 # .projects.2 -> subdirs and libs
6989 # .projects.3 -> the rest
6990 rm -f .projects .projects
.1 .projects
.2 .projects
.3
6992 QMAKE_PROJECTS
=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6993 if [ -z "$AWK" ]; then
6994 for p
in `echo $QMAKE_PROJECTS`; do
6995 echo "$p" >> .projects
6998 cat >projects.
awk <<EOF
7004 first = "./.projects.1.tmp"
7005 second = "./.projects.2.tmp"
7006 third = "./.projects.3.tmp"
7011 if ( ! target_file )
7013 print input_file >target_file
7018 input_file = FILENAME
7023 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7029 matched_target == 0 && /^(TEMPLATE.*=)/ {
7030 if ( \$3 == "subdirs" )
7031 target_file = second
7032 else if ( \$3 == "lib" )
7038 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7039 if ( \$0 ~ /plugin/ )
7042 target_file = second
7047 if ( ! target_file )
7049 print input_file >>target_file
7056 for p
in `echo $QMAKE_PROJECTS`; do
7057 echo "$p" >> .projects.all
7060 # if you get errors about the length of the command line to awk, change the -l arg
7062 split -l 100 .projects.all .projects.all.
7063 for p
in .projects.all.
*; do
7064 "$AWK" -f projects.
awk `cat $p`
7065 [ -f .projects
.1.tmp
] && cat .projects
.1.tmp
>> .projects
.1
7066 [ -f .projects
.2.tmp
] && cat .projects
.2.tmp
>> .projects
.2
7067 [ -f .projects
.3.tmp
] && cat .projects
.3.tmp
>> .projects
.3
7068 rm -f .projects
.1.tmp .projects
.2.tmp .projects
.3.tmp
$p
7070 rm -f .projects.all
* projects.
awk
7072 [ -f .projects
.1 ] && cat .projects
.1 >>.projects
7073 [ -f .projects
.2 ] && cat .projects
.2 >>.projects
7074 rm -f .projects
.1 .projects
.2
7075 if [ -f .projects
.3 ] && [ "$OPT_FAST" = "no" ]; then
7076 cat .projects
.3 >>.projects
7080 # don't sort Qt and MOC in with the other project files
7081 # also work around a segfaulting uniq(1)
7082 if [ -f .sorted.projects
.2 ]; then
7083 sort .sorted.projects
.2 > .sorted.projects
.2.new
7084 mv -f .sorted.projects
.2.new .sorted.projects
.2
7085 cat .sorted.projects
.2 >> .sorted.projects
.1
7087 [ -f .sorted.projects
.1 ] && sort .sorted.projects
.1 >> .sorted.projects
7088 rm -f .sorted.projects
.2 .sorted.projects
.1
7092 if [ -f .projects
]; then
7093 uniq .projects
>.tmp
7094 mv -f .tmp .projects
7095 NORM_PROJECTS
=`cat .projects | wc -l | sed -e "s, ,,g"`
7097 if [ -f .projects
.3 ]; then
7098 uniq .projects
.3 >.tmp
7099 mv -f .tmp .projects
.3
7100 FAST_PROJECTS
=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7102 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7106 for part
in $CFG_BUILD_PARTS; do
7108 tools
) PART_ROOTS
="$PART_ROOTS tools" ;;
7109 libs
) PART_ROOTS
="$PART_ROOTS src" ;;
7110 examples
) PART_ROOTS
="$PART_ROOTS examples demos" ;;
7115 if [ "$CFG_DEV" = "yes" ]; then
7116 PART_ROOTS
="$PART_ROOTS tests"
7119 echo "Creating makefiles. Please wait..."
7120 for file in .projects .projects
.3; do
7121 [ '!' -f "$file" ] && continue
7122 for a
in `cat $file`; do
7124 for r
in $PART_ROOTS; do
7125 if echo "$a" |
grep "^$r" >/dev
/null
2>&1 ||
echo "$a" |
grep "^$relpath/$r" >/dev
/null
2>&1; then
7130 [ "$IN_ROOT" = "no" ] && continue
7133 *winmain
/winmain.pro
) continue ;;
7134 */qmake
/qmake.pro
) continue ;;
7135 *tools
/bootstrap
*|
*tools
/moc
*|
*tools
/rcc
*|
*tools
/uic
*) SPEC
=$QMAKESPEC ;;
7136 *) SPEC
=$XQMAKESPEC ;;
7138 dir
=`dirname $a | sed -e "s;$sepath;.;g"`
7139 test -d "$dir" || mkdir
-p "$dir"
7140 OUTDIR
="$outpath/$dir"
7141 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7142 # fast configure - the makefile exists, skip it
7143 # since the makefile exists, it was generated by qmake, which means we
7144 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7146 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7149 QMAKE_SPEC_ARGS
="-spec $SPEC"
7150 if echo '\c' |
grep '\c' >/dev
/null
; then
7156 QMAKE
="$outpath/bin/qmake"
7157 QMAKE_ARGS
="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7158 if [ "$file" = ".projects.3" ]; then
7159 if echo '\c' |
grep '\c' >/dev
/null
; then
7166 cat >"${OUTDIR}/Makefile" <<EOF
7167 # ${OUTDIR}/Makefile: generated by configure
7169 # WARNING: This makefile will be replaced with a real makefile.
7170 # All changes made to this file will be lost.
7172 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7174 cat >>"${OUTDIR}/Makefile" <<EOF
7176 all clean install qmake first Makefile: FORCE
7177 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7185 if [ "$OPT_VERBOSE" = "yes" ]; then
7186 echo " (`basename $SPEC`)"
7187 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7192 [ -f "${OUTDIR}/Makefile" ] && chmod +w
"${OUTDIR}/Makefile"
7193 QTDIR
="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7197 rm -f .projects .projects
.3
7199 #-------------------------------------------------------------------------------
7200 # XShape is important, DnD in the Designer doens't work without it
7201 #-------------------------------------------------------------------------------
7202 if [ "$PLATFORM_X11" = "yes" ] && [ "$CFG_XSHAPE" = "no" ]; then
7205 NOTICE: Qt will not be built with XShape support.
7207 As a result, drag-and-drop in the Qt Designer will NOT
7208 work. We recommend that you enable XShape support by passing
7209 the -xshape switch to $0.
7213 #-------------------------------------------------------------------------------
7214 # check for platforms that we don't yet know about
7215 #-------------------------------------------------------------------------------
7216 if [ "$CFG_ARCH" = "generic" ]; then
7219 NOTICE: Atomic operations are not yet supported for this
7222 Qt will use the 'generic' architecture instead, which uses a
7223 single pthread_mutex_t to protect all atomic operations. This
7224 implementation is the slow (but safe) fallback implementation
7225 for architectures Qt does not yet support.
7229 #-------------------------------------------------------------------------------
7230 # check if the user passed the -no-zlib option, which is no longer supported
7231 #-------------------------------------------------------------------------------
7232 if [ -n "$ZLIB_FORCED" ]; then
7233 which_zlib
="supplied"
7234 if [ "$CFG_ZLIB" = "system" ]; then
7240 NOTICE: The -no-zlib option was supplied but is no longer
7243 Qt now requires zlib support in all builds, so the -no-zlib
7244 option was ignored. Qt will be built using the $which_zlib
7249 #-------------------------------------------------------------------------------
7250 # finally save the executed command to another script
7251 #-------------------------------------------------------------------------------
7252 if [ `basename $0` != "config.status" ]; then
7253 CONFIG_STATUS
="$relpath/$relconf $OPT_CMDLINE"
7255 # add the system variables
7256 for varname
in $SYSTEM_VARIABLES; do
7258 'if [ -n "\$'${varname}'" ]; then
7259 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7264 echo "$CONFIG_STATUS" |
grep '\-confirm\-license' >/dev
/null
2>&1 || CONFIG_STATUS
="$CONFIG_STATUS -confirm-license"
7266 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7267 echo "#!/bin/sh" > "$outpath/config.status"
7268 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7269 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7270 echo "else" >> "$outpath/config.status"
7271 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7272 echo "fi" >> "$outpath/config.status"
7273 chmod +x
"$outpath/config.status"
7276 if [ -n "$RPATH_MESSAGE" ]; then
7278 echo "$RPATH_MESSAGE"
7281 MAKE
=`basename $MAKE`
7283 echo Qt is now configured
for building. Just run
\'$MAKE\'.
7284 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7285 echo Once everything is built
, Qt is installed.
7286 echo You should not run
\'$MAKE install\'.
7288 echo Once everything is built
, you must run
\'$MAKE install\'.
7289 echo Qt will be installed into
$QT_INSTALL_PREFIX
7292 echo To reconfigure
, run
\'$MAKE confclean
\' and
\'configure
\'.