3 # Configures to build the Qt library
5 # Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
6 # Contact: Nokia Corporation (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 #-------------------------------------------------------------------------------
52 echo "$@" |
sed 's/ /\ /g'
55 # Adds a new qmake variable to the cache
56 # Usage: QMakeVar mode varname contents
57 # where mode is one of: set, add, del
71 echo >&2 "BUG: wrong command to QMakeVar: $1"
75 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
78 # relies on $QMAKESPEC being set correctly. parses include statements in
79 # qmake.conf and prints out the expanded file
86 $AWK -v "QMAKESPEC=$tmpSPEC" '
88 fname = QMAKESPEC "/" substr($0, 9, length($0) - 9)
89 while ((getline line < fname) > 0)
94 { print }' "$tmpSPEC/qmake.conf"
97 # relies on $TEST_COMPILER being set correctly
98 compilerSupportsFlag
()
100 cat >conftest.cpp
<<EOF
101 int main() { return 0; }
103 "$TEST_COMPILER" "$@" -o /dev
/null conftest.cpp
105 rm -f conftest.cpp conftest.o
109 # relies on $TEST_COMPILER being set correctly
115 safe_flag
=`shellEscape "$flag"`
116 lflags
=$lflags,$safe_flag
118 compilerSupportsFlag
"$lflags" >/dev
/null
2>&1
121 #-------------------------------------------------------------------------------
122 # operating system detection
123 #-------------------------------------------------------------------------------
125 # need that throughout the script
126 UNAME_MACHINE
=`(uname -m) 2>/dev/null` || UNAME_MACHINE
=unknown
127 UNAME_RELEASE
=`(uname -r) 2>/dev/null` || UNAME_RELEASE
=unknown
128 UNAME_SYSTEM
=`(uname -s) 2>/dev/null` || UNAME_SYSTEM
=unknown
129 UNAME_VERSION
=`(uname -v) 2>/dev/null` || UNAME_VERSION
=unknown
132 #-------------------------------------------------------------------------------
133 # window system detection
134 #-------------------------------------------------------------------------------
140 if [ -f "$relpath"/src
/gui
/kernel
/qapplication_mac.mm
] && [ -d /System
/Library
/Frameworks
/Carbon.framework
]; then
142 # ~ the Carbon SDK exists
143 # ~ src/gui/base/qapplication_mac.cpp is present
144 # ~ this is the internal edition and Qt/Mac sources exist
146 elif [ -f "$relpath"/src
/gui
/kernel
/qapplication_qws.cpp
]; then
148 # ~ src/gui/base/qapplication_qws.cpp is present
149 # ~ this is the free or commercial edition
150 # ~ this is the internal edition and Qt Embedded is explicitly enabled
151 if [ -f "$relpath"/src
/gui
/kernel
/qapplication_mac.mm
]; then
152 # This is a depot build, or an all-platforms package
155 # This must be the embedded package, since the Qt/Mac source files are not present
160 #-----------------------------------------------------------------------------
161 # Qt version detection
162 #-----------------------------------------------------------------------------
163 QT_VERSION
=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
167 if [ -n "$QT_VERSION" ]; then
168 QT_VERSION
=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
169 MAJOR
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
170 if [ -n "$MAJOR" ]; then
171 MINOR
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
172 PATCH
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
173 QT_MAJOR_VERSION
="$MAJOR"
174 [ -z "$MINOR" ] || QT_MINOR_VERSION
="$MINOR"
175 [ -z "$PATCH" ] || QT_PATCH_VERSION
="$PATCH"
178 if [ -z "$QT_MAJOR_VERSION" ]; then
179 echo "Cannot process version from qglobal.h: $QT_VERSION"
180 echo "Cannot proceed."
184 QT_PACKAGEDATE
=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
185 if [ -z "$QT_PACKAGEDATE" ]; then
186 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
187 echo "Cannot proceed"
191 #-------------------------------------------------------------------------------
193 #-------------------------------------------------------------------------------
198 EditionString
=Commercial
202 # parse the arguments, setting things to "yes" or "no"
203 while [ "$#" -gt 0 ]; do
207 #Autoconf style options
209 VAR
=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
213 VAR
=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
217 VAR
=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
218 VAL
=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
221 VAR
=`echo $1 | sed "s,^--no-\(.*\),\1,"`
226 # this option may or may not be followed by an argument
227 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
234 -h|
help|
--help|
-help)
235 if [ "$VAL" = "yes" ]; then
237 COMMERCIAL_USER
="no" #doesn't matter we will display the help
240 COMMERCIAL_USER
="no" #doesn't matter we will display the help
244 VAR
=`echo $1 | sed "s,^--\(.*\),\1,"`
248 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
255 if [ "$UNKNOWN_ARG" = "yes" ]; then
265 if [ "$PLATFORM_QWS" != "no" ]; then
266 if [ "$PLATFORM_QWS" = "maybe" ]; then
272 echo "No license exists to enable Qt for Embedded Linux. Disabling."
285 COMMERCIAL_USER
="yes"
299 if [ "$COMMERCIAL_USER" = "ask" ]; then
301 echo "Which edition of Qt do you want to use ?"
303 echo "Type 'c' if you want to use the Commercial Edition."
304 echo "Type 'o' if you want to use the Open Source Edition."
308 if [ "$commercial" = "c" ]; then
309 COMMERCIAL_USER
="yes"
311 elif [ "$commercial" = "o" ]; then
318 if [ "$CFG_NOKIA" = "yes" ]; then
320 Edition
="NokiaInternalBuild"
321 EditionString
="Nokia Internal Build"
322 QT_EDITION
="QT_EDITION_OPENSOURCE"
323 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
324 elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL
] && [ $COMMERCIAL_USER = "yes" ]; then
325 # Commercial preview release
326 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
329 QT_EDITION
="QT_EDITION_DESKTOP"
330 LicenseType
="Technology Preview"
331 elif [ $COMMERCIAL_USER = "yes" ]; then
332 # one of commercial editions
333 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
334 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS
=yes
336 # read in the license file
337 if [ -f "$LICENSE_FILE" ]; then
338 .
"$LICENSE_FILE" >/dev
/null
2>&1
339 if [ -z "$LicenseKeyExt" ]; then
341 echo "You are using an old license file."
343 echo "Please install the license file supplied by Nokia,"
344 echo "or install the Qt Open Source Edition if you intend to"
345 echo "develop free software."
348 if [ -z "$Licensee" ]; then
350 echo "Invalid license key. Please check the license key."
354 if [ -z "$LicenseKeyExt" ]; then
356 if echo '\c' |
grep '\c' >/dev
/null
; then
357 echo -n "Please enter your license key: "
359 echo "Please enter your license key: \c"
362 Licensee
="Unknown user"
367 echo "$LicenseKeyExt" |
grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev
/null
2>&1 \
368 && LicenseValid
="yes" \
370 if [ "$LicenseValid" != "yes" ]; then
372 echo "Invalid license key. Please check the license key."
375 ProductCode
=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
376 PlatformCode
=`echo $LicenseKeyExt | cut -f 2 -d - | cut -b 1`
377 LicenseTypeCode
=`echo $LicenseKeyExt | cut -f 3 -d -`
378 LicenseFeatureCode
=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
380 # determine which edition we are licensed to use
381 case "$LicenseTypeCode" in
383 LicenseType
="Commercial"
387 QT_EDITION
="QT_EDITION_UNIVERSAL"
390 Edition
="FullFramework"
391 EditionString
="Full Framework"
392 QT_EDITION
="QT_EDITION_DESKTOP"
395 Edition
="GUIFramework"
396 EditionString
="GUI Framework"
397 QT_EDITION
="QT_EDITION_DESKTOPLIGHT"
402 LicenseType
="Evaluation"
406 QT_EDITION
="QT_EDITION_EVALUATION"
411 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
413 echo "Invalid license key. Please check the license key."
417 # verify that we are licensed to use Qt on this platform
419 if [ "$PlatformCode" = "X" ]; then
421 LICENSE_EXTENSION
="-ALLOS"
422 elif [ "$PLATFORM_QWS" = "yes" ]; then
423 case $PlatformCode in
424 2|
4|
8|A|B|E|G|J|K|P|Q|S|U|V|W
)
425 # Qt for Embedded Linux
426 LICENSE_EXTENSION
="-EMBEDDED"
430 echo "You are not licensed for Qt for Embedded Linux."
432 echo "Please contact qt-info@nokia.com to upgrade your license"
433 echo "to include Qt for Embedded Linux, or install the"
434 echo "Qt Open Source Edition if you intend to develop free software."
438 elif [ "$PLATFORM_MAC" = "yes" ]; then
439 case $PlatformCode in
440 2|
4|
5|
7|
9|B|C|E|F|G|L|M|U|W|Y
)
442 LICENSE_EXTENSION
="-DESKTOP"
444 3|
6|
8|A|D|H|J|K|P|Q|S|V
)
446 LICENSE_EXTENSION
="-EMBEDDED"
450 echo "You are not licensed for the Qt/Mac platform."
452 echo "Please contact qt-info@nokia.com to upgrade your license"
453 echo "to include the Qt/Mac platform."
458 case $PlatformCode in
459 2|
3|
4|
5|
7|D|E|F|J|M|Q|S|T|V|Z
)
461 LICENSE_EXTENSION
="-DESKTOP"
463 6|
8|
9|A|B|C|G|H|K|P|U|W
)
465 LICENSE_EXTENSION
="-EMBEDDED"
469 echo "You are not licensed for the Qt/X11 platform."
471 echo "Please contact qt-info@nokia.com to upgrade your license to"
472 echo "include the Qt/X11 platform, or install the Qt Open Source Edition"
473 echo "if you intend to develop free software."
479 if test -r "$relpath/.LICENSE"; then
480 # Generic, non-final license
482 line
=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
487 *TECHNOLOGY?PREVIEW
*)
494 echo >&2 "Invalid license files; cannot continue"
499 EditionString
="$Edition"
500 QT_EDITION
="QT_EDITION_DESKTOP"
503 case "$LicenseFeatureCode" in
506 case "$LicenseType" in
508 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
511 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
517 case "$LicenseType" in
519 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
522 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
528 echo "Invalid license key. Please check the license key."
532 if [ '!' -f "$outpath/LICENSE" ]; then
533 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
534 echo "this software has disappeared."
536 echo "Sorry, you are not licensed to use this software."
537 echo "Try re-installing."
541 elif [ $COMMERCIAL_USER = "no" ]; then
542 # Open Source edition - may only be used under the terms of the GPL or LGPL.
543 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
544 Licensee
="Open Source"
546 EditionString
="Open Source"
547 QT_EDITION
="QT_EDITION_OPENSOURCE"
550 #-------------------------------------------------------------------------------
551 # initalize variables
552 #-------------------------------------------------------------------------------
554 SYSTEM_VARIABLES
="CC CXX CFLAGS CXXFLAGS LDFLAGS"
555 for varname
in $SYSTEM_VARIABLES; do
556 qmakevarname
="${varname}"
557 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
558 if [ "${varname}" = "LDFLAGS" ]; then
559 qmakevarname
="LFLAGS"
562 'if [ -n "\$'${varname}'" ]; then
563 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
567 # Use CC/CXX to run config.tests
568 mkdir
-p "$outpath/config.tests"
569 rm -f "$outpath/config.tests/.qmake.cache"
570 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
572 QMakeVar add styles
"cde mac motif plastique cleanlooks windows"
573 QMakeVar add decorations
"default windows styled"
574 QMakeVar add mouse-drivers
"pc"
575 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
576 QMakeVar add gfx-drivers
"linuxfb"
577 QMakeVar add mouse-drivers
"linuxtp"
579 QMakeVar add kbd-drivers
"tty"
581 if [ "$CFG_DEV" = "yes" ]; then
582 QMakeVar add kbd-drivers
"um"
585 # QTDIR may be set and point to an old or system-wide Qt installation
588 # the minimum version of libdbus-1 that we require:
589 MIN_DBUS_1_VERSION
=0.62
591 # initalize internal variables
592 CFG_CONFIGURE_EXIT_ON_ERROR
=yes
594 CFG_EXCEPTIONS
=unspecified
595 CFG_SCRIPT
=auto
# (yes|no|auto)
596 CFG_SCRIPTTOOLS
=auto
# (yes|no|auto)
597 CFG_XMLPATTERNS
=auto
# (yes|no|auto)
626 CFG_OPENVG_LC_INCLUDES
=no
628 CFG_OPENVG_ON_OPENGL
=no
630 CFG_EGL_GLES_INCLUDES
=no
633 CFG_QWS_FREETYPE
=auto
636 QT_DEFAULT_BUILD_PARTS
="libs tools examples demos docs translations"
641 CFG_PHONON_BACKEND
=yes
644 CFG_WEBKIT
=auto
# (yes|no|auto)
646 CFG_GFX_AVAILABLE
="linuxfb transformed qvfb vnc multiscreen"
647 CFG_GFX_ON
="linuxfb multiscreen"
648 CFG_GFX_PLUGIN_AVAILABLE
=
651 CFG_KBD_AVAILABLE
="tty linuxinput qvfb"
652 CFG_KBD_ON
="tty" #default, see QMakeVar above
653 CFG_MOUSE_AVAILABLE
="pc linuxtp linuxinput tslib qvfb"
654 CFG_MOUSE_ON
="pc linuxtp" #default, see QMakeVar above
656 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
657 CFG_KBD_AVAILABLE
="${CFG_KBD_AVAILABLE} qnx"
658 CFG_MOUSE_AVAILABLE
="${CFG_MOUSE_AVAILABLE} qnx"
659 CFG_GFX_AVAILABLE
="${CFG_GFX_AVAILABLE} qnx"
664 CFG_KBD_PLUGIN_AVAILABLE
=
667 CFG_MOUSE_PLUGIN_AVAILABLE
=
672 CFG_DECORATION_AVAILABLE
="styled windows default"
673 CFG_DECORATION_ON
="${CFG_DECORATION_AVAILABLE}" # all on by default
674 CFG_DECORATION_PLUGIN_AVAILABLE
=
675 CFG_DECORATION_PLUGIN
=
690 CFG_SEPARATE_DEBUG_INFO
=auto
691 CFG_REDUCE_EXPORTS
=auto
696 CFG_REDUCE_RELOCATIONS
=no
701 CFG_ACCESSIBILITY
=auto
705 CFG_DOUBLEFORMAT
=auto
708 CFG_CLOCK_GETTIME
=auto
709 CFG_CLOCK_MONOTONIC
=auto
718 MAC_CONFIG_TEST_COMMANDLINE
= # used to make the configure tests run with the correct arch's and SDK settings
723 COMMANDLINE_MAC_COCOA
=no
725 CFG_PREFIX_INSTALL
=yes
733 XPLATFORM
= # This seems to be the QMAKESPEC, like "linux-g++"
736 OPT_CONFIRM_LICENSE
=no
742 CFG_GRAPHICS_SYSTEM
=default
745 # initalize variables used for installation
753 QT_INSTALL_TRANSLATIONS
=
759 #flags for SQL drivers
767 QT_LFLAGS_ODBC
="-lodbc"
769 # flags for libdbus-1
773 # flags for Glib (X11 only)
777 # flags for GStreamer (X11 only)
781 #-------------------------------------------------------------------------------
782 # check SQL drivers, mouse drivers and decorations available in this package
783 #-------------------------------------------------------------------------------
785 # opensource version removes some drivers, so force them to be off
791 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
792 for a
in "$relpath/src/plugins/sqldrivers/"*; do
794 base_a
=`basename "$a"`
795 CFG_SQL_AVAILABLE
="${CFG_SQL_AVAILABLE} ${base_a}"
796 eval "CFG_SQL_${base_a}=auto"
801 CFG_DECORATION_PLUGIN_AVAILABLE
=
802 if [ -d "$relpath/src/plugins/decorations" ]; then
803 for a
in "$relpath/src/plugins/decorations/"*; do
805 base_a
=`basename "$a"`
806 CFG_DECORATION_PLUGIN_AVAILABLE
="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
811 CFG_KBD_PLUGIN_AVAILABLE
=
812 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
813 for a
in "$relpath/src/plugins/kbddrivers/"*; do
815 base_a
=`basename "$a"`
816 CFG_KBD_PLUGIN_AVAILABLE
="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
821 CFG_MOUSE_PLUGIN_AVAILABLE
=
822 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
823 for a
in "$relpath/src/plugins/mousedrivers/"*; do
825 base_a
=`basename "$a"`
826 CFG_MOUSE_PLUGIN_AVAILABLE
="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
831 CFG_GFX_PLUGIN_AVAILABLE
=
832 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
833 for a
in "$relpath/src/plugins/gfxdrivers/"*; do
835 base_a
=`basename "$a"`
836 CFG_GFX_PLUGIN_AVAILABLE
="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
839 CFG_GFX_OFF
="$CFG_GFX_AVAILABLE" # assume all off
842 #-------------------------------------------------------------------------------
843 # parse command line arguments
844 #-------------------------------------------------------------------------------
846 # parse the arguments, setting things to "yes" or "no"
847 while [ "$#" -gt 0 ]; do
851 #Autoconf style options
853 VAR
=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
857 VAR
=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
861 VAR
=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
862 VAL
=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
865 VAR
=`echo $1 | sed "s,^--no-\(.*\),\1,"`
869 VAR
=`echo $1 | sed "s,^--\(.*\),\1,"`
873 -no-*-*|
-plugin-*-*|
-qt-*-*)
874 VAR
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
875 VAL
=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
879 VAR
=`echo $1 | sed "s,^-no-\(.*\),\1,"`
882 #Qt style yes options
883 -incremental|
-qvfb|
-profile|
-shared|
-static|
-sm|
-xinerama|
-xshape|
-xinput|
-reduce-exports|
-pch|
-separate-debug-info|
-stl|
-freetype|
-xcursor|
-xfixes|
-xrandr|
-xrender|
-mitshm|
-fontconfig|
-xkb|
-nis|
-qdbus|
-dbus|
-dbus-linked|
-glib|
-gstreamer|
-gtkstyle|
-cups|
-iconv|
-largefile|
-h|
-help|
-v|
-verbose|
-debug|
-release|
-fast|
-accessibility|
-confirm-license|
-gnumake|
-framework|
-qt3support|
-debug-and-release|
-exceptions|
-cocoa|
-universal|
-prefix-install|
-silent|
-armfpa|
-optimized-qmake|
-dwarf2|
-reduce-relocations|
-sse|
-openssl|
-openssl-linked|
-ptmalloc|
-xmlpatterns|
-phonon|
-phonon-backend|
-multimedia|
-svg|
-webkit|
-script|
-scripttools|
-rpath|
-force-pkg-config)
884 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
887 #Qt style options that pass an argument
889 if [ "$PLATFORM_QWS" != "yes" ]; then
891 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
895 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
899 -prefix|
-docdir|
-headerdir|
-plugindir|
-datadir|
-libdir|
-bindir|
-translationdir|
-sysconfdir|
-examplesdir|
-demosdir|
-depths|
-make|
-nomake|
-platform|
-xplatform|
-buildkey|
-sdk|
-arch|
-host-arch|
-mysql_config)
900 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
904 #Qt style complex options in one command
905 -enable-*|
-disable-*)
906 VAR
=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
907 VAL
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
909 #Qt Builtin/System style options
910 -no-*|
-system-*|
-qt-*)
911 VAR
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
912 VAL
=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
914 #Options that cannot be generalized
921 # this option may or may not be followed by an argument
922 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
931 # this option may or may not be followed by an argument
932 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
941 # this option may or may not be followed by an argument
942 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
950 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
951 # this option may or may not be followed by an argument
952 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
961 VAL
=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
965 VAL
=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
984 if [ "$1" = "-D" ]; then
988 VAL
=`echo $1 | sed 's,-D,,'`
993 if [ "$1" = "-I" ]; then
997 VAL
=`echo $1 | sed 's,-I,,'`
1002 if [ "$1" = "-L" ]; then
1006 VAL
=`echo $1 | sed 's,-L,,'`
1011 if [ "$1" = "-R" ]; then
1015 VAL
=`echo $1 | sed 's,-R,,'`
1020 VAL
=`echo $1 | sed 's,-l,,'`
1024 if [ "$1" = "-F" ]; then
1028 VAL
=`echo $1 | sed 's,-F,,'`
1033 if [ "$1" = "-fw" ]; then
1037 VAL
=`echo $1 | sed 's,-fw,,'`
1041 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
1048 if [ "$UNKNOWN_ARG" = "yes" ]; then
1049 echo "$1: unknown argument"
1060 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1061 CFG_QT3SUPPORT
="$VAL"
1067 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1068 CFG_ACCESSIBILITY
="$VAL"
1077 CFG_USE_GNUMAKE
="$VAL"
1080 CFG_MYSQL_CONFIG
="$VAL"
1083 QT_INSTALL_PREFIX
="$VAL"
1086 QT_HOST_PREFIX
="$VAL"
1089 QT_FORCE_PKGCONFIG
=yes
1092 QT_INSTALL_DOCS
="$VAL"
1095 QT_INSTALL_HEADERS
="$VAL"
1098 QT_INSTALL_PLUGINS
="$VAL"
1101 QT_INSTALL_DATA
="$VAL"
1104 QT_INSTALL_LIBS
="$VAL"
1113 QT_INSTALL_TRANSLATIONS
="$VAL"
1115 sysconfdir|settingsdir
)
1116 QT_INSTALL_SETTINGS
="$VAL"
1119 QT_INSTALL_EXAMPLES
="$VAL"
1122 QT_INSTALL_DEMOS
="$VAL"
1128 QT_INSTALL_BINS
="$VAL"
1131 CFG_USER_BUILD_KEY
="$VAL"
1138 if [ "$PLATFORM_QWS" != "no" ]; then
1139 if [ "$PLATFORM_QWS" = "maybe" ]; then
1145 echo "No license exists to enable Qt for Embedded Linux. Disabling."
1150 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1157 if [ "$VAL" = "little" ]; then
1158 CFG_ENDIAN
="Q_LITTLE_ENDIAN"
1159 elif [ "$VAL" = "big" ]; then
1160 CFG_ENDIAN
="Q_BIG_ENDIAN"
1166 if [ "$VAL" = "little" ]; then
1167 CFG_HOST_ENDIAN
="Q_LITTLE_ENDIAN"
1168 elif [ "$VAL" = "big" ]; then
1169 CFG_HOST_ENDIAN
="Q_BIG_ENDIAN"
1175 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1182 CFG_QWS_DEPTHS
="$VAL"
1185 if [ "$VAL" = "auto" ] ||
[ "$VAL" = "desktop" ] ||
1186 [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
1187 [ "$VAL" = "es1cl" ] ||
[ "$VAL" = "es1" ] ||
[ "$VAL" = "es2" ]; then
1194 if [ "$VAL" = "auto" ] ||
[ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1201 if [ "$PLATFORM_QWS" = "yes" ]; then
1202 echo "Error: Graphics System plugins are not supported on QWS."
1203 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1204 echo " rather than existing as a separate plugin."
1208 if [ "$VAL" = "opengl" ]; then
1209 CFG_GRAPHICS_SYSTEM
="opengl"
1210 elif [ "$VAL" = "openvg" ]; then
1211 CFG_GRAPHICS_SYSTEM
="openvg"
1212 elif [ "$VAL" = "raster" ]; then
1213 CFG_GRAPHICS_SYSTEM
="raster"
1220 qvfb
) # left for commandline compatibility, not documented
1221 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1222 if [ "$VAL" = "yes" ]; then
1223 QMakeVar add gfx-drivers qvfb
1224 QMakeVar add kbd-drivers qvfb
1225 QMakeVar add mouse-drivers qvfb
1226 CFG_GFX_ON
="$CFG_GFX_ON qvfb"
1227 CFG_KBD_ON
="$CFG_KBD_ON qvfb"
1228 CFG_MOUSE_ON
="$CFG_MOUSE_ON qvfb"
1235 CFG_NOBUILD_PARTS
="$CFG_NOBUILD_PARTS $VAL"
1238 CFG_BUILD_PARTS
="$CFG_BUILD_PARTS $VAL"
1241 if [ "$PLATFORM_MAC" = "yes" ]; then
1243 elif [ "$PLATFORM_QWS" = "yes" ]; then
1246 if [ "$CFG_FRAMEWORK" = "auto" ]; then
1252 if [ "$PLATFORM_MAC" = "yes" ]; then
1259 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1260 CFG_MAC_DWARF2
="$VAL"
1266 if [ "$PLATFORM_MAC" = "yes" ]; then
1267 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $VAL"
1276 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1277 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS x86 ppc"
1283 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1284 CFG_MAC_COCOA
="$VAL"
1285 COMMANDLINE_MAC_COCOA
="$VAL"
1291 if [ "$PLATFORM_MAC" = "yes" ]; then
1292 CFG_FRAMEWORK
="$VAL"
1298 if [ "$VAL" = "yes" ]; then
1300 QMakeVar add QMAKE_CFLAGS
-pg
1301 QMakeVar add QMAKE_CXXFLAGS
-pg
1302 QMakeVar add QMAKE_LFLAGS
-pg
1303 QMAKE_VARS
="$QMAKE_VARS CONFIG+=nostrip"
1308 exceptions|g
++-exceptions)
1309 if [ "$VAL" = "no" ]; then
1311 elif [ "$VAL" = "yes" ]; then
1319 # keep compatibility with old platform names
1325 PLATFORM
=hpux-acc-o64
1328 PLATFORM
=hpux-acc-64
1331 PLATFORM
=hpux-acc-64
1343 PLATFORM
=reliant-cds-64
1346 PLATFORM
=solaris-cc-64
1349 PLATFORM
=solaris-cc-64
1352 PLATFORM
=unixware-cc
1355 PLATFORM
=unixware-g
++
1358 PLATFORM
=unixware-cc
1361 PLATFORM
=unixware-g
++
1367 i386
) NATIVE_64_ARCH
="x86_64" ;;
1368 powerpc
) NATIVE_64_ARCH
="ppc64" ;;
1369 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1371 if [ ! -z "$NATIVE_64_ARCH" ]; then
1372 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1373 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1382 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1383 CFG_DEBUG_RELEASE
="$VAL"
1389 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1390 CFG_RELEASE_QMAKE
="$VAL"
1396 if [ "$VAL" = "yes" ]; then
1398 elif [ "$VAL" = "no" ]; then
1405 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1406 CFG_PREFIX_INSTALL
="$VAL"
1414 developer-build|commercial|opensource|nokia-developer
)
1415 # These switches have been dealt with already
1418 if [ "$VAL" = "yes" ]; then
1420 elif [ "$VAL" = "no" ]; then
1427 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1428 CFG_INCREMENTAL
="$VAL"
1434 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1435 CFG_CONFIGURE_EXIT_ON_ERROR
="$VAL"
1441 if [ "$PLATFORM_QWS" = "yes" ]; then
1442 FEATURE
=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1443 if [ "$VAL" = "no" ]; then
1444 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_$FEATURE"
1445 elif [ "$VAL" = "yes" ] ||
[ "$VAL" = "unknown" ]; then
1446 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_$FEATURE"
1455 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1462 [ "$VAL" = "qt" ] && VAL
=yes
1463 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1470 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1478 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1485 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1492 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1499 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1506 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1513 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1514 CFG_PRECOMPILE
="$VAL"
1519 separate-debug-info
)
1520 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1521 CFG_SEPARATE_DEBUG_INFO
="$VAL"
1527 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1528 CFG_REDUCE_EXPORTS
="$VAL"
1534 if [ "$VAL" = "no" ]; then
1541 if [ "$VAL" = "no" ]; then
1548 if [ "$VAL" = "no" ]; then
1555 if [ "$VAL" = "no" ]; then
1565 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1566 CFG_REDUCE_RELOCATIONS
="$VAL"
1572 [ "$VAL" = "qt" ] && VAL
=yes
1573 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1574 CFG_QWS_FREETYPE
="$VAL"
1580 [ "$VAL" = "qt" ] && VAL
=yes
1581 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1586 # No longer supported:
1587 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1590 if [ "$VAL" = "system" ]; then
1597 [ "$VAL" = "yes" ] && VAL
=qt
1598 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1605 [ "$VAL" = "yes" ] && VAL
=qt
1606 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1613 [ "$VAL" = "yes" ] && VAL
=qt
1614 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1621 [ "$VAL" = "yes" ] && VAL
=qt
1622 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1629 if [ "$VAL" = "system" ] ||
[ "$VAL" = "no" ]; then
1636 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1643 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1650 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1657 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1664 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1671 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1672 CFG_FONTCONFIG
="$VAL"
1678 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1685 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1692 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1699 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1706 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1707 CFG_GSTREAMER
="$VAL"
1713 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1714 CFG_QGTKSTYLE
="$VAL"
1720 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "linked" ]; then
1722 elif [ "$VAL" = "runtime" ]; then
1729 if [ "$VAL" = "yes" ]; then
1736 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1743 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1744 CFG_LARGEFILE
="$VAL"
1750 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1757 if [ "$VAL" = "yes" ]; then
1758 CFG_OPENSSL
="linked"
1764 if [ "$VAL" = "yes" ]; then
1772 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1773 CFG_XMLPATTERNS
="yes"
1775 if [ "$VAL" = "no" ]; then
1776 CFG_XMLPATTERNS
="no"
1783 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1786 if [ "$VAL" = "no" ]; then
1794 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1795 CFG_SCRIPTTOOLS
="yes"
1797 if [ "$VAL" = "no" ]; then
1798 CFG_SCRIPTTOOLS
="no"
1805 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1808 if [ "$VAL" = "no" ]; then
1816 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1819 if [ "$VAL" = "no" ]; then
1827 if [ "$VAL" = "yes" ]; then
1828 OPT_CONFIRM_LICENSE
="$VAL"
1834 if [ "$VAL" = "yes" ]; then
1840 sql-
*|gfx-
*|decoration-
*|kbd-
*|mouse-
*)
1841 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1842 # if autoconf style options were used, $VAL can be "yes" or "no"
1843 [ "$VAL" = "yes" ] && VAL
=qt
1844 # now $VAL should be "no", "qt", or "plugin"... double-check
1845 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1848 # now $VAL is "no", "qt", or "plugin"
1850 VAL
=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1851 VAR
=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1853 # Grab the available values
1856 avail
="$CFG_SQL_AVAILABLE"
1859 avail
="$CFG_GFX_AVAILABLE"
1860 if [ "$OPT" = "plugin" ]; then
1861 avail
="$CFG_GFX_PLUGIN_AVAILABLE"
1865 avail
="$CFG_DECORATION_AVAILABLE"
1866 if [ "$OPT" = "plugin" ]; then
1867 avail
="$CFG_DECORATION_PLUGIN_AVAILABLE"
1871 avail
="$CFG_KBD_AVAILABLE"
1872 if [ "$OPT" = "plugin" ]; then
1873 avail
="$CFG_KBD_PLUGIN_AVAILABLE"
1877 avail
="$CFG_MOUSE_AVAILABLE"
1878 if [ "$OPT" = "plugin" ]; then
1879 avail
="$CFG_MOUSE_PLUGIN_AVAILABLE"
1884 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1888 # Check that that user's value is available.
1891 if [ "$VAL" = "$d" ]; then
1896 [ "$found" = yes ] || ERROR
=yes
1898 if [ "$VAR" = "sql" ]; then
1899 # set the CFG_SQL_driver
1900 eval "CFG_SQL_$VAL=\$OPT"
1904 if [ "$OPT" = "plugin" ] ||
[ "$OPT" = "qt" ]; then
1905 if [ "$OPT" = "plugin" ]; then
1906 [ "$VAR" = "decoration" ] && QMakeVar del
"${VAR}s" "$VAL"
1907 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
1908 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
1909 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
1910 [ "$VAR" = "mouse" ] && QMakeVar del
"${VAR}s" "$VAL"
1911 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
1912 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
1913 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
1916 if [ "$VAR" = "gfx" ] ||
[ "$VAR" = "kbd" ] ||
[ "$VAR" = "decoration" ] ||
[ "$VAR" = "mouse" ]; then
1917 [ "$VAR" = "gfx" ] && CFG_GFX_ON
="$CFG_GFX_ON $VAL"
1918 [ "$VAR" = "kbd" ] && CFG_KBD_ON
="$CFG_KBD_ON $VAL"
1919 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
="$CFG_DECORATION_ON $VAL"
1920 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
="$CFG_MOUSE_ON $VAL"
1924 QMakeVar add
"${VAR}s" "${VAL}"
1925 elif [ "$OPT" = "no" ]; then
1926 PLUG_VAR
="${VAR}-plugin"
1927 if [ "$VAR" = "gfx" ] ||
[ "$VAR" = "kbd" ] ||
[ "$VAR" = "mouse" ]; then
1928 IN_VAR
="${VAR}-driver"
1932 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
1933 [ "$VAR" = "gfx" ] && CFG_GFX_ON
=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
1934 [ "$VAR" = "kbd" ] && CFG_KBD_ON
=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
1935 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
1936 QMakeVar del
"${IN_VAR}s" "$VAL"
1937 QMakeVar del
"${PLUG_VAR}s" "$VAL"
1939 if [ "$ERROR" = "yes" ]; then
1940 echo "$CURRENT_OPT: unknown argument"
1945 if [ "$VAL" = "yes" ]; then
1946 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1947 QMAKE_SWITCHES
="$QMAKE_SWITCHES -d"
1951 elif [ "$VAL" = "no" ]; then
1952 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" |
grep ' -d' >/dev
/null
2>&1; then
1953 QMAKE_SWITCHES
=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1962 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1969 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1976 D_FLAGS
="$D_FLAGS \"$VAL\""
1979 I_FLAGS
="$I_FLAGS -I\"${VAL}\""
1982 L_FLAGS
="$L_FLAGS -L\"${VAL}\""
1985 RPATH_FLAGS
="$RPATH_FLAGS \"${VAL}\""
1988 l_FLAGS
="$l_FLAGS -l\"${VAL}\""
1991 if [ "$PLATFORM_MAC" = "yes" ]; then
1992 L_FLAGS
="$L_FLAGS -F\"${VAL}\""
1993 I_FLAGS
="$I_FLAGS -F\"${VAL}\""
1999 if [ "$PLATFORM_MAC" = "yes" ]; then
2000 l_FLAGS
="$l_FLAGS -framework \"${VAL}\""
2009 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2016 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2017 CFG_PHONON_BACKEND
="$VAL"
2023 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2024 CFG_MULTIMEDIA
="$VAL"
2033 if [ "$UNKNOWN_OPT" = "yes" ]; then
2034 echo "${CURRENT_OPT}: invalid command-line switch"
2040 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2041 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2045 # update QT_CONFIG to show our current predefined configuration
2046 case "$CFG_QCONFIG" in
2047 minimal|small|medium|large|full
)
2048 # these are a sequence of increasing functionality
2049 for c
in minimal small medium large full
; do
2050 QT_CONFIG
="$QT_CONFIG $c-config"
2051 [ "$CFG_QCONFIG" = $c ] && break
2055 # not known to be sufficient for anything
2056 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ]; then
2057 echo >&2 "Error: configuration file not found:"
2058 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2063 #-------------------------------------------------------------------------------
2064 # build tree initialization
2065 #-------------------------------------------------------------------------------
2067 # where to find which..
2068 unixtests
="$relpath/config.tests/unix"
2069 mactests
="$relpath/config.tests/mac"
2070 WHICH
="$unixtests/which.test"
2072 PERL
=`$WHICH perl 2>/dev/null`
2074 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2076 for e
in gawk nawk
awk; do
2077 if "$WHICH" $e >/dev
/null
2>&1 && ( $e -f /dev
/null
/dev
/null
) >/dev
/null
2>&1; then
2084 PERL
="/usr/bin/perl"
2085 if "$WHICH" perl
>/dev
/null
2>&1 && ( perl
/dev
/null
) >/dev
/null
2>&1; then
2089 ### skip this if the user just needs help...
2090 if [ "$OPT_HELP" != "yes" ]; then
2092 # is this a shadow build?
2093 if [ "$OPT_SHADOW" = "maybe" ]; then
2095 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2096 if [ -h "$outpath" ]; then
2097 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW
=yes
2103 if [ "$OPT_SHADOW" = "yes" ]; then
2104 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" ]; then
2105 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2106 echo >&2 "Cannot proceed."
2109 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2112 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2114 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2115 echo "By default, Qt is built in release mode with separate debug information, so"
2116 echo "-debug-and-release is not necessary anymore"
2120 # detect build style
2121 if [ "$CFG_DEBUG" = "auto" ]; then
2122 if [ "$PLATFORM_MAC" = "yes" ]; then
2123 CFG_DEBUG_RELEASE
=yes
2125 elif [ "$CFG_DEV" = "yes" ]; then
2126 CFG_DEBUG_RELEASE
=no
2129 CFG_DEBUG_RELEASE
=no
2133 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2134 QMAKE_CONFIG
="$QMAKE_CONFIG build_all"
2137 if [ "$CFG_SILENT" = "yes" ]; then
2138 QMAKE_CONFIG
="$QMAKE_CONFIG silent"
2141 # if the source tree is different from the build tree,
2142 # symlink or copy part of the sources
2143 if [ "$OPT_SHADOW" = "yes" ]; then
2144 echo "Preparing build tree..."
2146 if [ -z "$PERL" ]; then
2148 echo "You need perl in your PATH to make a shadow build."
2149 echo "Cannot proceed."
2153 [ -d "$outpath/bin" ] || mkdir
-p "$outpath/bin"
2155 # symlink the qmake directory
2156 find "$relpath/qmake" |
while read a
; do
2157 my_a
=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2158 if [ '!' -f "$my_a" ]; then
2159 if [ -d "$a" ]; then
2160 # directories are created...
2163 a_dir
=`dirname "$my_a"`
2164 [ -d "$a_dir" ] || mkdir
-p "$a_dir"
2165 # ... and files are symlinked
2166 case `basename "$a"` in
2167 *.o|
*.d|GNUmakefile
*|qmake
)
2178 # make a syncqt script that can be used in the shadow
2179 rm -f "$outpath/bin/syncqt"
2180 if [ -x "$relpath/bin/syncqt" ]; then
2181 mkdir
-p "$outpath/bin"
2182 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2183 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
2184 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" $*" >>"$outpath/bin/syncqt"
2185 chmod 755 "$outpath/bin/syncqt"
2188 # symlink the mkspecs directory
2189 mkdir
-p "$outpath/mkspecs"
2190 rm -f "$outpath"/mkspecs
/*
2191 ln -s "$relpath"/mkspecs
/* "$outpath/mkspecs"
2192 rm -f "$outpath/mkspecs/default"
2194 # symlink the doc directory
2195 rm -rf "$outpath/doc"
2196 ln -s "$relpath/doc" "$outpath/doc"
2198 # make sure q3porting.xml can be found
2199 mkdir
-p "$outpath/tools/porting/src"
2200 rm -f "$outpath/tools/porting/src/q3porting.xml"
2201 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2204 # symlink files from src/gui/embedded neccessary to build qvfb
2205 if [ "$CFG_DEV" = "yes" ]; then
2206 mkdir
-p "$outpath/tools/qvfb"
2207 for f
in qvfbhdr.h qlock_p.h qlock.cpp qwssignalhandler_p.h qwssignalhandler.cpp
; do
2208 dest
="${outpath}/tools/qvfb/${f}"
2210 ln -s "${relpath}/src/gui/embedded/${f}" "${dest}"
2214 # symlink fonts to be able to run application from build directory
2215 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then
2216 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2217 mkdir
-p "${outpath}/lib"
2218 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2222 if [ "$OPT_FAST" = "auto" ]; then
2223 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2230 # find a make command
2231 if [ -z "$MAKE" ]; then
2233 for mk
in gmake
make; do
2234 if "$WHICH" $mk >/dev
/null
2>&1; then
2239 if [ -z "$MAKE" ]; then
2240 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2241 echo >&2 "Cannot proceed."
2244 # export MAKE, we need it later in the config.tests
2250 #-------------------------------------------------------------------------------
2251 # auto-detect all that hasn't been specified in the arguments
2252 #-------------------------------------------------------------------------------
2254 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED
=auto
2255 if [ "$CFG_EMBEDDED" != "no" ]; then
2256 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2258 [ -z "$PLATFORM" ] && PLATFORM
=qws
/macx-generic-g
++
2259 if [ -z "$XPLATFORM" ]; then
2260 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2261 XPLATFORM
="qws/macx-$CFG_EMBEDDED-g++"
2265 [ -z "$PLATFORM" ] && PLATFORM
=qws
/freebsd-generic-g
++
2266 if [ -z "$XPLATFORM" ]; then
2267 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2268 XPLATFORM
="qws/freebsd-$CFG_EMBEDDED-g++"
2272 [ -z "$PLATFORM" ] && PLATFORM
=qws
/solaris-generic-g
++
2273 if [ -z "$XPLATFORM" ]; then
2274 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2275 XPLATFORM
="qws/solaris-$CFG_EMBEDDED-g++"
2279 if [ -z "$PLATFORM" ]; then
2280 case "$UNAME_MACHINE" in
2282 PLATFORM
=qws
/linux-x86-g
++
2285 PLATFORM
=qws
/linux-x86_64-g
++
2288 PLATFORM
=qws
/linux-ppc-g
++
2291 PLATFORM
=qws
/linux-generic-g
++
2295 if [ -z "$XPLATFORM" ]; then
2296 if [ "$CFG_EMBEDDED" = "auto" ]; then
2297 if [ -n "$CFG_ARCH" ]; then
2298 CFG_EMBEDDED
=$CFG_ARCH
2300 case "$UNAME_MACHINE" in
2311 CFG_EMBEDDED
=generic
2316 XPLATFORM
="qws/linux-$CFG_EMBEDDED-g++"
2320 [ -z "$PLATFORM" ] && PLATFORM
=unsupported
/qws
/qnx-generic-g
++
2321 if [ -z "$XPLATFORM" ]; then
2322 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2323 XPLATFORM
="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2330 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2336 if [ -z "$PLATFORM" ]; then
2338 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2340 if [ "$PLATFORM_MAC" = "yes" ]; then
2342 # PLATFORM=macx-xcode
2349 #PLATFORM=aix-g++-64
2351 #PLATFORM=aix-xlc-64
2353 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2363 # PLATFORM=dynix-g++
2369 PLATFORM
=freebsd-g
++
2371 - Also available for FreeBSD: freebsd-icc
2375 PLATFORM
=openbsd-g
++
2386 #PLATFORM=irix-cc-64
2388 - Also available for IRIX: irix-g++ irix-cc-64
2392 case "$UNAME_MACHINE" in
2394 #PLATFORM=hpuxi-acc-32
2395 PLATFORM
=hpuxi-acc-64
2397 - Also available for HP-UXi: hpuxi-acc-32
2403 #PLATFORM=hpux-acc-64
2405 #PLATFORM=hpux-acc-o64
2407 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2416 - Also available for Tru64: tru64-g++
2420 case "$UNAME_MACHINE" in
2422 PLATFORM
=linux-g
++-64
2429 - Also available for Linux: linux-kcc linux-icc linux-cxx
2433 #PLATFORM=solaris-g++
2435 #PLATFORM=solaris-cc64
2437 - Also available for Solaris: solaris-g++ solaris-cc-64
2440 ReliantUNIX-
*:*|SINIX-
*:*)
2441 PLATFORM
=reliant-cds
2442 #PLATFORM=reliant-cds-64
2444 - Also available for Reliant UNIX: reliant-cds-64
2454 #PLATFORM=unixware-g++
2455 PLATFORM
=unixware-cc
2457 - Also available for OpenUNIX: unixware-g++
2461 #PLATFORM=unixware-g++
2462 PLATFORM
=unixware-cc
2464 - Also available for UnixWare: unixware-g++
2471 - Also available for SCO OpenServer: sco-g++
2475 PLATFORM
=unixware-g
++
2478 PLATFORM
=unsupported
/qnx-g
++
2481 if [ "$OPT_HELP" != "yes" ]; then
2483 for p
in $PLATFORMS; do
2484 echo " $relconf $* -platform $p"
2487 echo " The build script does not currently recognize all" >&2
2488 echo " platforms supported by Qt." >&2
2489 echo " Rerun this script with a -platform option listed to" >&2
2490 echo " set the system/compiler combination you use." >&2
2497 if [ "$PLATFORM_QWS" = "yes" ]; then
2499 PLATFORMS
=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2501 PLATFORMS
=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2504 [ -z "$XPLATFORM" ] && XPLATFORM
="$PLATFORM"
2505 if [ -d "$PLATFORM" ]; then
2506 QMAKESPEC
="$PLATFORM"
2508 QMAKESPEC
="$relpath/mkspecs/${PLATFORM}"
2510 if [ -d "$XPLATFORM" ]; then
2511 XQMAKESPEC
="$XPLATFORM"
2513 XQMAKESPEC
="$relpath/mkspecs/${XPLATFORM}"
2515 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2516 QT_CROSS_COMPILE
=yes
2517 QMAKE_CONFIG
="$QMAKE_CONFIG cross_compile"
2520 if [ "$PLATFORM_MAC" = "yes" ]; then
2521 if [ `basename $QMAKESPEC` = "macx-xcode" ] ||
[ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2523 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2524 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2525 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2526 echo " built with 'macx-g++'" >&2
2532 # check specified platforms are supported
2533 if [ '!' -d "$QMAKESPEC" ]; then
2535 echo " The specified system/compiler is not supported:"
2539 echo " Please see the README file for a complete list."
2543 if [ '!' -d "$XQMAKESPEC" ]; then
2545 echo " The specified system/compiler is not supported:"
2549 echo " Please see the README file for a complete list."
2553 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2555 echo " The specified system/compiler port is not complete:"
2557 echo " $XQMAKESPEC/qplatformdefs.h"
2559 echo " Please contact qt-bugs@trolltech.com."
2564 # now look at the configs and figure out what platform we are config'd for
2565 [ "$CFG_EMBEDDED" = "no" ] \
2566 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2568 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2570 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2571 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2572 if echo $UNAME_RELEASE |
grep "^5\.[5|6]" >/dev
/null
2>&1; then
2573 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2574 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2578 #-------------------------------------------------------------------------------
2579 # determine the system architecture
2580 #-------------------------------------------------------------------------------
2581 if [ "$OPT_VERBOSE" = "yes" ]; then
2582 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2585 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2586 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2588 echo "You have specified a target architecture with -embedded and -arch."
2589 echo "The two architectures you have specified are different, so we can"
2590 echo "not proceed. Either set both to be the same, or only use -embedded."
2596 if [ -z "${CFG_HOST_ARCH}" ]; then
2597 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2599 CFG_HOST_ARCH
=`uname -p`
2600 if [ "$OPT_VERBOSE" = "yes" ]; then
2601 echo " SGI ($CFG_HOST_ARCH)"
2605 case "$UNAME_MACHINE" in
2607 if [ "$OPT_VERBOSE" = "yes" ]; then
2608 echo " Sun SPARC (sparc)"
2615 if [ "$OPT_VERBOSE" = "yes" ]; then
2616 echo " 64-bit AMD 80x86 (x86_64)"
2618 CFG_HOST_ARCH
=x86_64
2621 if [ "$OPT_VERBOSE" = "yes" ]; then
2622 echo " 32-bit Intel 80x86 (i386)"
2630 case "$UNAME_MACHINE" in
2632 if [ "$OPT_VERBOSE" = "yes" ]; then
2633 echo " 32-bit Apple PowerPC (powerpc)"
2637 if [ "$OPT_VERBOSE" = "yes" ]; then
2638 echo " 32-bit Intel 80x86 (i386)"
2642 CFG_HOST_ARCH
=macosx
2645 if [ "$OPT_VERBOSE" = "yes" ]; then
2646 echo " 64-bit IBM PowerPC (powerpc)"
2648 CFG_HOST_ARCH
=powerpc
2651 if [ "$OPT_VERBOSE" = "yes" ]; then
2652 echo " HP PA-RISC (parisc)"
2654 CFG_HOST_ARCH
=parisc
2657 if [ "$OPT_VERBOSE" = "yes" ]; then
2658 echo " 32-bit Intel 80x86 (i386)"
2662 *:*:x86_64|
*:*:amd64
)
2663 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2664 if [ "$OPT_VERBOSE" = "yes" ]; then
2665 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2669 if [ "$OPT_VERBOSE" = "yes" ]; then
2670 echo " 64-bit AMD 80x86 (x86_64)"
2672 CFG_HOST_ARCH
=x86_64
2676 if [ "$OPT_VERBOSE" = "yes" ]; then
2677 echo " 32-bit PowerPC (powerpc)"
2679 CFG_HOST_ARCH
=powerpc
2682 if [ "$OPT_VERBOSE" = "yes" ]; then
2683 echo " 64-bit PowerPC (powerpc)"
2685 CFG_HOST_ARCH
=powerpc
2688 if [ "$OPT_VERBOSE" = "yes" ]; then
2689 echo " IBM S/390 (s390)"
2694 if [ "$OPT_VERBOSE" = "yes" ]; then
2700 if [ "$OPT_VERBOSE" = "yes" ]; then
2701 echo " Linux on SPARC"
2706 case "$UNAME_MACHINE" in
2708 if [ "$OPT_VERBOSE" = "yes" ]; then
2709 echo " QNX on Intel 80x86 (i386)"
2716 if [ "$OPT_VERBOSE" = "yes" ]; then
2717 echo " Trying '$UNAME_MACHINE'..."
2719 CFG_HOST_ARCH
="$UNAME_MACHINE"
2724 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2725 if [ -n "$CFG_ARCH" ]; then
2726 CFG_EMBEDDED
=$CFG_ARCH
2729 case "$CFG_EMBEDDED" in
2749 CFG_ARCH
="$CFG_EMBEDDED"
2752 elif [ "$PLATFORM_MAC" = "yes" ] ||
[ -z "$CFG_ARCH" ]; then
2753 CFG_ARCH
=$CFG_HOST_ARCH
2756 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
2757 if [ "$OPT_VERBOSE" = "yes" ]; then
2758 echo " '$CFG_ARCH' is supported"
2761 if [ "$OPT_VERBOSE" = "yes" ]; then
2762 echo " '$CFG_ARCH' is unsupported, using 'generic'"
2766 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
2767 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
2768 if [ "$OPT_VERBOSE" = "yes" ]; then
2769 echo " '$CFG_HOST_ARCH' is supported"
2772 if [ "$OPT_VERBOSE" = "yes" ]; then
2773 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
2775 CFG_HOST_ARCH
=generic
2779 if [ "$OPT_VERBOSE" = "yes" ]; then
2780 echo "System architecture: '$CFG_ARCH'"
2781 if [ "$PLATFORM_QWS" = "yes" ]; then
2782 echo "Host architecture: '$CFG_HOST_ARCH'"
2786 #-------------------------------------------------------------------------------
2787 # tests that don't need qmake (must be run before displaying help)
2788 #-------------------------------------------------------------------------------
2790 if [ -z "$PKG_CONFIG" ]; then
2791 # See if PKG_CONFIG is set in the mkspec:
2792 PKG_CONFIG
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
2794 if [ -z "$PKG_CONFIG" ]; then
2795 PKG_CONFIG
=`"$WHICH" pkg-config 2>/dev/null`
2798 # Work out if we can use pkg-config
2799 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2800 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2802 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2803 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2804 echo >&2 "environment!"
2806 if [ -z "$PKG_CONFIG_PATH" ]; then
2808 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2809 echo >&2 "the host compiler's .pc files will be used. This is probably"
2810 echo >&2 "not what you want."
2812 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2814 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2815 echo >&2 "been set. This means your toolchain's .pc files must contain"
2816 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2817 echo >&2 "tests are failing, please check these files."
2825 # process CFG_MAC_ARCHS
2826 if [ "$PLATFORM_MAC" = "yes" ]; then
2827 # check -arch arguments for validity.
2828 ALLOWED
="x86 ppc x86_64 ppc64 i386"
2829 # Save the list so we can re-write it using only valid values
2830 CFG_MAC_ARCHS_IN
="$CFG_MAC_ARCHS"
2832 for i
in $CFG_MAC_ARCHS_IN
2834 if echo "$ALLOWED" |
grep -w -v "$i" > /dev
/null
2>&1; then
2835 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
2838 if [ "$i" = "i386" -o "$i" = "x86" ]; then
2839 # These are synonymous values
2840 # CFG_MAC_ARCHS requires x86 while GCC requires i386
2841 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS x86"
2842 MAC_CONFIG_TEST_COMMANDLINE
="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
2844 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $i"
2845 MAC_CONFIG_TEST_COMMANDLINE
="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
2850 # pass on $CFG_SDK to the configure tests.
2851 if [ '!' -z "$CFG_SDK" ]; then
2852 MAC_CONFIG_TEST_COMMANDLINE
="-sdk $CFG_SDK"
2853 echo "tests command line: $MAC_CONFIG_TEST_COMMANDLINE"
2856 # find the default framework value
2857 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2858 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2859 CFG_FRAMEWORK
="$CFG_SHARED"
2860 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2862 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2870 QMAKE_CONF_COMPILER
=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
2872 [ -z "$TEST_COMPILER" ] && TEST_COMPILER
=$QMAKE_CONF_COMPILER
2874 # auto-detect precompiled header support
2875 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2876 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2878 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2883 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2885 echo "WARNING: Using universal binaries disables precompiled headers."
2890 #auto-detect DWARF2 on the mac
2891 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "auto" ]; then
2892 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2899 # auto-detect support for -Xarch on the mac
2900 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" == "auto" ]; then
2901 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2908 # don't autodetect support for separate debug info on objcopy when
2909 # cross-compiling as lots of toolchains seems to have problems with this
2910 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2911 CFG_SEPARATE_DEBUG_INFO
="no"
2914 # auto-detect support for separate debug info in objcopy
2915 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2916 TEST_COMPILER_CFLAGS
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_].*=%%p' | tr '\n' ' '`
2917 TEST_COMPILER_CXXFLAGS
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_].*=%%p' | tr '\n' ' '`
2918 TEST_OBJCOPY
=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
2919 COMPILER_WITH_FLAGS
="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2920 COMPILER_WITH_FLAGS
=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2921 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2922 CFG_SEPARATE_DEBUG_INFO
=no
2926 # binutils on HP-UX is buggy; default to no.
2927 CFG_SEPARATE_DEBUG_INFO
=no
2930 CFG_SEPARATE_DEBUG_INFO
=yes
2936 # auto-detect -fvisibility support
2937 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2938 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2939 CFG_REDUCE_EXPORTS
=no
2941 CFG_REDUCE_EXPORTS
=yes
2945 # detect the availability of the -Bsymbolic-functions linker optimization
2946 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2947 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2948 CFG_REDUCE_RELOCATIONS
=no
2950 CFG_REDUCE_RELOCATIONS
=yes
2954 # auto-detect GNU make support
2955 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v |
grep "GNU Make" >/dev
/null
2>&1; then
2959 # If -opengl wasn't specified, don't try to auto-detect
2960 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
2965 if [ "$PLATFORM_MAC" = "yes" ]; then
2966 if [ "$CFG_OPENGL" = "auto" ] ||
[ "$CFG_OPENGL" = "yes" ]; then
2971 # find the default framework value
2972 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2973 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2974 CFG_FRAMEWORK
="$CFG_SHARED"
2975 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2977 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2985 # x11 tests are done after qmake is built
2988 #setup the build parts
2989 if [ -z "$CFG_BUILD_PARTS" ]; then
2990 CFG_BUILD_PARTS
="$QT_DEFAULT_BUILD_PARTS"
2992 # don't build tools by default when cross-compiling
2993 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2994 CFG_BUILD_PARTS
=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2997 for nobuild
in $CFG_NOBUILD_PARTS; do
2998 CFG_BUILD_PARTS
=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3000 if echo $CFG_BUILD_PARTS |
grep -v libs
>/dev
/null
2>&1; then
3002 # echo "WARNING: libs is a required part of the build."
3004 CFG_BUILD_PARTS
="$CFG_BUILD_PARTS libs"
3007 #-------------------------------------------------------------------------------
3008 # post process QT_INSTALL_* variables
3009 #-------------------------------------------------------------------------------
3012 if [ -z "$QT_INSTALL_PREFIX" ]; then
3013 if [ "$CFG_DEV" = "yes" ]; then
3014 QT_INSTALL_PREFIX
="$outpath" # In Development, we use sandboxed builds by default
3015 elif [ "$PLATFORM_QWS" = "yes" ]; then
3016 QT_INSTALL_PREFIX
="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
3017 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3018 QT_INSTALL_PREFIX
="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
3021 QT_INSTALL_PREFIX
="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
3024 QT_INSTALL_PREFIX
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3027 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3028 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3029 if [ "$PLATFORM_MAC" = "yes" ]; then
3030 QT_INSTALL_DOCS
="/Developer/Documentation/Qt"
3033 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS
="$QT_INSTALL_PREFIX/doc" #fallback
3036 QT_INSTALL_DOCS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3039 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3040 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3041 if [ "$PLATFORM_MAC" = "yes" ]; then
3042 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3047 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS
="$QT_INSTALL_PREFIX/include"
3050 QT_INSTALL_HEADERS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3053 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3054 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3055 if [ "$PLATFORM_MAC" = "yes" ]; then
3056 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3057 QT_INSTALL_LIBS
="/Libraries/Frameworks"
3061 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS
="$QT_INSTALL_PREFIX/lib" #fallback
3063 QT_INSTALL_LIBS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3066 if [ -z "$QT_INSTALL_BINS" ]; then #default
3067 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3068 if [ "$PLATFORM_MAC" = "yes" ]; then
3069 QT_INSTALL_BINS
="/Developer/Applications/Qt"
3072 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS
="$QT_INSTALL_PREFIX/bin" #fallback
3075 QT_INSTALL_BINS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3078 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3079 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3080 if [ "$PLATFORM_MAC" = "yes" ]; then
3081 QT_INSTALL_PLUGINS
="/Developer/Applications/Qt/plugins"
3084 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS
="$QT_INSTALL_PREFIX/plugins" #fallback
3086 QT_INSTALL_PLUGINS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3089 if [ -z "$QT_INSTALL_DATA" ]; then #default
3090 QT_INSTALL_DATA
="$QT_INSTALL_PREFIX"
3092 QT_INSTALL_DATA
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3095 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3096 QT_INSTALL_TRANSLATIONS
="$QT_INSTALL_PREFIX/translations"
3098 QT_INSTALL_TRANSLATIONS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3101 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3102 if [ "$PLATFORM_MAC" = "yes" ]; then
3103 QT_INSTALL_SETTINGS
=/Library
/Preferences
/Qt
3105 QT_INSTALL_SETTINGS
=/etc
/xdg
3108 QT_INSTALL_SETTINGS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3111 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3112 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3113 if [ "$PLATFORM_MAC" = "yes" ]; then
3114 QT_INSTALL_EXAMPLES
="/Developer/Examples/Qt"
3117 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES
="$QT_INSTALL_PREFIX/examples" #fallback
3119 QT_INSTALL_EXAMPLES
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3122 if [ -z "$QT_INSTALL_DEMOS" ]; then #default
3123 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3124 if [ "$PLATFORM_MAC" = "yes" ]; then
3125 QT_INSTALL_DEMOS
="/Developer/Examples/Qt/Demos"
3128 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS
="$QT_INSTALL_PREFIX/demos"
3130 QT_INSTALL_DEMOS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
3132 #-------------------------------------------------------------------------------
3133 # help - interactive parts of the script _after_ this section please
3134 #-------------------------------------------------------------------------------
3136 # next, emit a usage message if something failed.
3137 if [ "$OPT_HELP" = "yes" ]; then
3138 [ "x$ERROR" = "xyes" ] && echo
3139 if [ "$CFG_NIS" = "no" ]; then
3146 if [ "$CFG_CUPS" = "no" ]; then
3153 if [ "$CFG_ICONV" = "no" ]; then
3160 if [ "$CFG_LARGEFILE" = "no" ]; then
3167 if [ "$CFG_STL" = "auto" ] ||
[ "$CFG_STL" = "yes" ]; then
3174 if [ "$CFG_IPV6" = "auto" ]; then
3178 if [ "$CFG_PRECOMPILE" = "auto" ] ||
[ "$CFG_PRECOMPILE" = "no" ]; then
3187 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3188 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
3189 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3190 [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
3191 [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3192 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3193 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3194 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3195 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3196 [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3197 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3198 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3199 [-no-make <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3200 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3201 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
3202 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3203 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3204 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3205 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3206 [-no-openssl] [-openssl] [-openssl-linked]
3207 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit]
3208 [-no-script] [-script] [-no-scripttools] [-scripttools]
3210 [additional platform specific options (see below)]
3213 Installation options:
3215 These are optional, but you may specify install directories.
3217 -prefix <dir> ...... This will install everything relative to <dir>
3218 (default $QT_INSTALL_PREFIX)
3220 if [ "$PLATFORM_QWS" = "yes" ]; then
3223 -hostprefix [dir] .. Tools and libraries needed when developing
3224 applications are installed in [dir]. If [dir] is
3225 not given, the current build directory will be used.
3230 * -prefix-install .... Force a sandboxed "local" installation of
3231 Qt. This will install into
3232 $QT_INSTALL_PREFIX, if this option is
3233 disabled then some platforms will attempt a
3234 "system" install by placing default values to
3235 be placed in a system location other than
3238 You may use these to separate different parts of the install:
3240 -bindir <dir> ......... Executables will be installed to <dir>
3241 (default PREFIX/bin)
3242 -libdir <dir> ......... Libraries will be installed to <dir>
3243 (default PREFIX/lib)
3244 -docdir <dir> ......... Documentation will be installed to <dir>
3245 (default PREFIX/doc)
3246 -headerdir <dir> ...... Headers will be installed to <dir>
3247 (default PREFIX/include)
3248 -plugindir <dir> ...... Plugins will be installed to <dir>
3249 (default PREFIX/plugins)
3250 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3252 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3253 (default PREFIX/translations)
3254 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3255 (default PREFIX/etc/settings)
3256 -examplesdir <dir> .... Examples will be installed to <dir>
3257 (default PREFIX/examples)
3258 -demosdir <dir> ....... Demos will be installed to <dir>
3259 (default PREFIX/demos)
3261 You may use these options to turn on strict plugin loading.
3263 -buildkey <key> .... Build the Qt library and plugins using the specified
3264 <key>. When the library loads plugins, it will only
3265 load those that have a matching key.
3269 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3270 that needs to be evaluated. If the evaluation succeeds, the feature is
3271 included. Here is a short explanation of each option:
3273 * -release ........... Compile and link Qt with debugging turned off.
3274 -debug ............. Compile and link Qt with debugging turned on.
3275 -debug-and-release . Compile and link two versions of Qt, with and without
3276 debugging turned on (Mac only).
3278 -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting)
3280 -opensource......... Compile and link the Open-Source Edition of Qt.
3281 -commercial......... Compile and link the Commercial Edition of Qt.
3284 * -shared ............ Create and use shared Qt libraries.
3285 -static ............ Create and use static Qt libraries.
3287 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3289 -fast .............. Configure Qt quickly by generating Makefiles only for
3290 library and subdirectory targets. All other Makefiles
3291 are created as wrappers, which will in turn run qmake.
3293 -no-largefile ...... Disables large file support.
3294 + -largefile ......... Enables Qt to access files larger than 4 GB.
3297 if [ "$PLATFORM_QWS" = "yes" ]; then
3304 if [ "$CFG_DBUS" = "no" ]; then
3313 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3314 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3316 -no-accessibility .. Do not compile Accessibility support.
3317 * -accessibility ..... Compile Accessibility support.
3319 $SHN -no-stl ............ Do not compile STL support.
3320 $SHY -stl ............... Compile STL support.
3322 -no-sql-<driver> ... Disable SQL <driver> entirely.
3323 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3325 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3328 Possible values for <driver>:
3329 [ $CFG_SQL_AVAILABLE ]
3331 -system-sqlite ..... Use sqlite from the operating system.
3333 -no-qt3support ..... Disables the Qt 3 support functionality.
3334 * -qt3support ........ Enables the Qt 3 support functionality.
3336 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3337 + -xmlpatterns ....... Build the QtXmlPatterns module.
3338 QtXmlPatterns is built if a decent C++ compiler
3339 is used and exceptions are enabled.
3341 -no-multimedia ..... Do not build the QtMultimedia module.
3342 + -multimedia ........ Build the QtMultimedia module.
3344 -no-phonon ......... Do not build the Phonon module.
3345 + -phonon ............ Build the Phonon module.
3346 Phonon is built if a decent C++ compiler is used.
3347 -no-phonon-backend.. Do not build the platform phonon plugin.
3348 + -phonon-backend..... Build the platform phonon plugin.
3350 -no-svg ............ Do not build the SVG module.
3351 + -svg ............... Build the SVG module.
3353 -no-webkit ......... Do not build the WebKit module.
3354 + -webkit ............ Build the WebKit module.
3355 WebKit is built if a decent C++ compiler is used.
3357 -no-script ......... Do not build the QtScript module.
3358 + -script ............ Build the QtScript module.
3360 -no-scripttools .... Do not build the QtScriptTools module.
3361 + -scripttools ....... Build the QtScriptTools module.
3363 -platform target ... The operating system and compiler you are building
3366 See the README file for a list of supported
3367 operating systems and compilers.
3369 if [ "${PLATFORM_QWS}" != "yes" ]; then
3371 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3372 raster - Software rasterizer
3373 opengl - Rendering via OpenGL, Experimental!
3378 -no-mmx ............ Do not compile with use of MMX instructions.
3379 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3380 -no-sse ............ Do not compile with use of SSE instructions.
3381 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3383 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3384 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3386 -D <string> ........ Add an explicit define to the preprocessor.
3387 -I <string> ........ Add an explicit include path.
3388 -L <string> ........ Add an explicit library path.
3390 -help, -h .......... Display this information.
3392 Third Party Libraries:
3394 -qt-zlib ........... Use the zlib bundled with Qt.
3395 + -system-zlib ....... Use zlib from the operating system.
3396 See http://www.gzip.org/zlib
3398 -no-gif ............ Do not compile the plugin for GIF reading support.
3399 * -qt-gif ............ Compile the plugin for GIF reading support.
3400 See also src/plugins/imageformats/gif/qgifhandler.h
3402 -no-libtiff ........ Do not compile the plugin for TIFF support.
3403 -qt-libtiff ........ Use the libtiff bundled with Qt.
3404 + -system-libtiff .... Use libtiff from the operating system.
3405 See http://www.libtiff.org
3407 -no-libpng ......... Do not compile in PNG support.
3408 -qt-libpng ......... Use the libpng bundled with Qt.
3409 + -system-libpng ..... Use libpng from the operating system.
3410 See http://www.libpng.org/pub/png
3412 -no-libmng ......... Do not compile the plugin for MNG support.
3413 -qt-libmng ......... Use the libmng bundled with Qt.
3414 + -system-libmng ..... Use libmng from the operating system.
3415 See http://www.libmng.com
3417 -no-libjpeg ........ Do not compile the plugin for JPEG support.
3418 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3419 + -system-libjpeg .... Use libjpeg from the operating system.
3420 See http://www.ijg.org
3422 -no-openssl ........ Do not compile support for OpenSSL.
3423 + -openssl ........... Enable run-time OpenSSL support.
3424 -openssl-linked .... Enabled linked OpenSSL support.
3426 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3431 -make <part> ....... Add part to the list of parts to be built at make time.
3432 ($QT_DEFAULT_BUILD_PARTS)
3433 -nomake <part> ..... Exclude part from the list of parts to be built.
3435 -R <string> ........ Add an explicit runtime library path to the Qt
3437 -l <string> ........ Add an explicit library.
3439 -no-rpath .......... Do not use the library install path as a runtime
3441 + -rpath ............. Link Qt libraries and executables using the library
3442 install path as a runtime library path. Equivalent
3443 to -R install_libpath
3445 -continue .......... Continue as far as possible if an error occurs.
3447 -verbose, -v ....... Print verbose information about each step of the
3450 -silent ............ Reduce the build output so that warnings and errors
3451 can be seen more easily.
3453 * -no-optimized-qmake ... Do not build qmake optimized.
3454 -optimized-qmake ...... Build qmake optimized.
3456 $NSN -no-nis ............ Do not compile NIS support.
3457 $NSY -nis ............... Compile NIS support.
3459 $CUN -no-cups ........... Do not compile CUPS support.
3460 $CUY -cups .............. Compile CUPS support.
3461 Requires cups/cups.h and libcups.so.2.
3463 $CIN -no-iconv .......... Do not compile support for iconv(3).
3464 $CIY -iconv ............. Compile support for iconv(3).
3466 $PHN -no-pch ............ Do not use precompiled header support.
3467 $PHY -pch ............... Use precompiled header support.
3469 $DBN -no-dbus ........... Do not compile the QtDBus module.
3470 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3471 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3473 -reduce-relocations ..... Reduce relocations in the libraries through extra
3474 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3475 experimental; needs GNU ld >= 2.18).
3478 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3479 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3486 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3494 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
3498 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3499 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3505 if [ "$PLATFORM_X11" = "yes" ]; then
3506 if [ "$CFG_SM" = "no" ]; then
3513 if [ "$CFG_XSHAPE" = "no" ]; then
3520 if [ "$CFG_XINERAMA" = "no" ]; then
3527 if [ "$CFG_FONTCONFIG" = "no" ]; then
3534 if [ "$CFG_XCURSOR" = "no" ]; then
3541 if [ "$CFG_XFIXES" = "no" ]; then
3548 if [ "$CFG_XRANDR" = "no" ]; then
3555 if [ "$CFG_XRENDER" = "no" ]; then
3562 if [ "$CFG_MITSHM" = "no" ]; then
3569 if [ "$CFG_XINPUT" = "no" ]; then
3576 if [ "$CFG_XKB" = "no" ]; then
3583 if [ "$CFG_IM" = "no" ]; then
3594 -no-gtkstyle ....... Do not build the GTK theme integration.
3595 + -gtkstyle .......... Build the GTK theme integration.
3597 * -no-nas-sound ...... Do not compile in NAS sound support.
3598 -system-nas-sound .. Use NAS libaudio from the operating system.
3599 See http://radscan.com/nas.html
3601 -no-opengl ......... Do not support OpenGL.
3602 + -opengl <api> ...... Enable OpenGL support.
3603 With no parameter, this will auto-detect the "best"
3604 OpenGL API to use. If desktop OpenGL is avaliable, it
3605 will be used. Use desktop, es1, es1cl or es2 for <api>
3606 to force the use of the Desktop (OpenGL 1.x or 2.x),
3607 OpenGL ES 1.x Common profile, 1.x Common Lite profile
3608 or 2.x APIs instead. On X11, the EGL API will be used
3609 to manage GL contexts in the case of OpenGL ES
3611 -no-openvg ........ Do not support OpenVG.
3612 + -openvg ........... Enable OpenVG support.
3613 Requires EGL support, typically supplied by an OpenGL
3614 or other graphics implementation.
3616 $SMN -no-sm ............. Do not support X Session Management.
3617 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3619 $SHN -no-xshape ......... Do not compile XShape support.
3620 $SHY -xshape ............ Compile XShape support.
3621 Requires X11/extensions/shape.h.
3623 $SHN -no-xsync .......... Do not compile XSync support.
3624 $SHY -xsync ............. Compile XSync support.
3625 Requires X11/extensions/sync.h.
3627 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3628 $XAY -xinerama .......... Compile Xinerama support.
3629 Requires X11/extensions/Xinerama.h and libXinerama.
3630 By default, Xinerama support will be compiled if
3631 available and the shared libraries are dynamically
3634 $XCN -no-xcursor ........ Do not compile Xcursor support.
3635 $XCY -xcursor ........... Compile Xcursor support.
3636 Requires X11/Xcursor/Xcursor.h and libXcursor.
3637 By default, Xcursor support will be compiled if
3638 available and the shared libraries are dynamically
3641 $XFN -no-xfixes ......... Do not compile Xfixes support.
3642 $XFY -xfixes ............ Compile Xfixes support.
3643 Requires X11/extensions/Xfixes.h and libXfixes.
3644 By default, Xfixes support will be compiled if
3645 available and the shared libraries are dynamically
3648 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3649 $XZY -xrandr ............ Compile Xrandr support.
3650 Requires X11/extensions/Xrandr.h and libXrandr.
3652 $XRN -no-xrender ........ Do not compile Xrender support.
3653 $XRY -xrender ........... Compile Xrender support.
3654 Requires X11/extensions/Xrender.h and libXrender.
3656 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3657 $XMY -mitshm ............ Compile MIT-SHM support.
3658 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3660 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3661 $FCGY -fontconfig ........ Compile FontConfig support.
3662 Requires fontconfig/fontconfig.h, libfontconfig,
3663 freetype.h and libfreetype.
3665 $XIN -no-xinput.......... Do not compile Xinput support.
3666 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3667 which requires IRIX with wacom.h and libXi or
3668 XFree86 with X11/extensions/XInput.h and libXi.
3670 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3671 $XKY -xkb ............... Compile XKB support.
3676 if [ "$PLATFORM_MAC" = "yes" ]; then
3681 -Fstring ........... Add an explicit framework path.
3682 -fw string ......... Add an explicit framework.
3684 -cocoa ............. Build the Cocoa version of Qt. Note that -no-framework
3685 and -static is not supported with -cocoa. Specifying
3686 this option creates Qt binaries that requires Mac OS X
3689 * -framework ......... Build Qt as a series of frameworks and
3690 link tools against those frameworks.
3691 -no-framework ...... Do not build Qt as a series of frameworks.
3693 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3694 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3696 -universal ......... Equivalent to -arch "ppc x86"
3698 -arch <arch> ....... Build Qt for <arch>
3699 Example values for <arch>: x86 ppc x86_64 ppc64
3700 Multiple -arch arguments can be specified, 64-bit archs
3701 will be built with the Cocoa framework.
3703 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3704 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3709 if [ "$PLATFORM_QWS" = "yes" ]; then
3712 Qt for Embedded Linux only:
3714 -xplatform target ... The target platform when cross-compiling.
3716 -no-feature-<feature> Do not compile in <feature>.
3717 -feature-<feature> .. Compile in <feature>. The available features
3718 are described in src/corelib/global/qfeatures.txt
3720 -embedded <arch> .... This will enable the embedded build, you must have a
3721 proper license for this switch to work.
3722 Example values for <arch>: arm mips x86 generic
3724 -armfpa ............. Target platform is uses the ARM-FPA floating point format.
3725 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3727 The floating point format is usually autodetected by configure. Use this
3728 to override the detected value.
3730 -little-endian ...... Target platform is little endian (LSB first).
3731 -big-endian ......... Target platform is big endian (MSB first).
3733 -host-little-endian . Host platform is little endian (LSB first).
3734 -host-big-endian .... Host platform is big endian (MSB first).
3736 You only need to specify the endianness when
3737 cross-compiling, otherwise the host
3738 endianness will be used.
3740 -no-freetype ........ Do not compile in Freetype2 support.
3741 -qt-freetype ........ Use the libfreetype bundled with Qt.
3742 * -system-freetype .... Use libfreetype from the operating system.
3743 See http://www.freetype.org/
3745 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3746 default ($CFG_QCONFIG).
3748 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3749 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3751 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3752 by default all available decorations are on.
3753 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3754 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3755 linked to at run time.
3756 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3757 -no-decoration-<style> ....Disable decoration <style> entirely.
3758 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3760 -no-opengl .......... Do not support OpenGL.
3761 -opengl <api> ....... Enable OpenGL ES support
3762 With no parameter, this will attempt to auto-detect OpenGL ES 1.x
3763 or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection.
3765 NOTE: A QGLScreen driver for the hardware is required to support
3766 OpenGL ES on Qt for Embedded Linux.
3768 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3769 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3770 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3771 linked to at run time.
3772 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3773 -no-gfx-<driver> ... Disable graphics <driver> entirely.
3774 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3776 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
3777 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3779 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
3781 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
3783 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
3784 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3786 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
3787 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3788 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
3790 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
3791 -no-mouse-<driver> ... Disable mouse <driver> entirely.
3792 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3794 -iwmmxt ............ Compile using the iWMMXt instruction set
3795 (available on some XScale CPUs).
3801 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3802 if [ "$CFG_GLIB" = "no" ]; then
3810 $GBN -no-glib ........... Do not compile Glib support.
3811 $GBY -glib .............. Compile Glib support.
3816 [ "x$ERROR" = "xyes" ] && exit 1
3821 # -----------------------------------------------------------------------------
3822 # LICENSING, INTERACTIVE PART
3823 # -----------------------------------------------------------------------------
3825 if [ "$PLATFORM_QWS" = "yes" ]; then
3826 Platform
="Qt for Embedded Linux"
3827 elif [ "$PLATFORM_MAC" = "yes" ]; then
3835 echo "This is the $Platform ${EditionString} Edition."
3838 if [ "$Edition" = "NokiaInternalBuild" ]; then
3839 echo "Detected -nokia-developer option"
3840 echo "Nokia employees and agents are allowed to use this software under"
3841 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
3842 elif [ "$Edition" = "OpenSource" ]; then
3844 echo "You are licensed to use this software under the terms of"
3845 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3846 if [ -e "$relpath/LICENSE.GPL3" ]; then
3847 echo "You are also licensed to use this software under the terms of"
3848 echo "the GNU General Public License (GPL) versions 3."
3854 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3855 echo "You have already accepted the terms of the $LicenseType license."
3858 if [ -e "$relpath/LICENSE.GPL3" ]; then
3859 echo "Type '3' to view the GNU General Public License version 3."
3861 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3862 echo "Type 'yes' to accept this license offer."
3863 echo "Type 'no' to decline this license offer."
3865 if echo '\c' |
grep '\c' >/dev
/null
; then
3866 echo -n "Do you accept the terms of $affix license? "
3868 echo "Do you accept the terms of $affix license? \c"
3873 if [ "$acceptance" = "yes" ] ||
[ "$acceptance" = "y" ]; then
3875 elif [ "$acceptance" = "no" ]; then
3876 echo "You are not licensed to use this software."
3879 elif [ "$acceptance" = "3" ]; then
3880 more "$relpath/LICENSE.GPL3"
3881 elif [ "$acceptance" = "L" ]; then
3882 more "$relpath/LICENSE.LGPL"
3885 elif [ "$Edition" = "Preview" ]; then
3886 TheLicense
=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3889 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3890 echo "You have already accepted the terms of the $LicenseType license."
3893 echo "You are licensed to use this software under the terms of"
3894 echo "the $TheLicense"
3896 echo "Type '?' to read the Preview License."
3897 echo "Type 'yes' to accept this license offer."
3898 echo "Type 'no' to decline this license offer."
3900 if echo '\c' |
grep '\c' >/dev
/null
; then
3901 echo -n "Do you accept the terms of the license? "
3903 echo "Do you accept the terms of the license? \c"
3908 if [ "$acceptance" = "yes" ]; then
3910 elif [ "$acceptance" = "no" ] ;then
3911 echo "You are not licensed to use this software."
3914 elif [ "$acceptance" = "?" ]; then
3915 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3918 elif [ "$Edition" != "OpenSource" ]; then
3919 if [ -n "$ExpiryDate" ]; then
3920 ExpiryDate
=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3921 [ -z "$ExpiryDate" ] && ExpiryDate
="0"
3922 Today
=`date +%Y%m%d`
3923 if [ "$Today" -gt "$ExpiryDate" ]; then
3924 case "$LicenseType" in
3925 Commercial|Academic|Educational
)
3926 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3928 echo "NOTICE NOTICE NOTICE NOTICE"
3930 echo " Your support and upgrade period has expired."
3932 echo " You are no longer licensed to use this version of Qt."
3933 echo " Please contact qt-info@nokia.com to renew your support"
3934 echo " and upgrades for this license."
3936 echo "NOTICE NOTICE NOTICE NOTICE"
3941 echo "WARNING WARNING WARNING WARNING"
3943 echo " Your support and upgrade period has expired."
3945 echo " You may continue to use your last licensed release"
3946 echo " of Qt under the terms of your existing license"
3947 echo " agreement. But you are not entitled to technical"
3948 echo " support, nor are you entitled to use any more recent"
3949 echo " Qt releases."
3951 echo " Please contact qt-info@nokia.com to renew your"
3952 echo " support and upgrades for this license."
3954 echo "WARNING WARNING WARNING WARNING"
3961 echo "NOTICE NOTICE NOTICE NOTICE"
3963 echo " Your Evaluation license has expired."
3965 echo " You are no longer licensed to use this software. Please"
3966 echo " contact qt-info@nokia.com to purchase license, or install"
3967 echo " the Qt Open Source Edition if you intend to develop free"
3970 echo "NOTICE NOTICE NOTICE NOTICE"
3977 TheLicense
=`head -n 1 "$outpath/LICENSE"`
3979 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3980 echo "You have already accepted the terms of the $TheLicense."
3983 echo "You are licensed to use this software under the terms of"
3984 echo "the $TheLicense."
3986 echo "Type '?' to view the $TheLicense."
3987 echo "Type 'yes' to accept this license offer."
3988 echo "Type 'no' to decline this license offer."
3990 if echo '\c' |
grep '\c' >/dev
/null
; then
3991 echo -n "Do you accept the terms of the $TheLicense? "
3993 echo "Do you accept the terms of the $TheLicense? \c"
3998 if [ "$acceptance" = "yes" ]; then
4000 elif [ "$acceptance" = "no" ]; then
4001 echo "You are not licensed to use this software."
4004 else [ "$acceptance" = "?" ]
4005 more "$outpath/LICENSE"
4010 # this should be moved somewhere else
4013 AIX_VERSION
=`uname -v`
4014 if [ "$AIX_VERSION" -lt "5" ]; then
4015 QMakeVar add QMAKE_LIBS_X11
-lbind
4022 #-------------------------------------------------------------------------------
4023 # generate qconfig.cpp
4024 #-------------------------------------------------------------------------------
4025 [ -d "$outpath/src/corelib/global" ] || mkdir
-p "$outpath/src/corelib/global"
4027 LICENSE_USER_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4028 LICENSE_PRODUCTS_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4029 PREFIX_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4030 DOCUMENTATION_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4031 HEADERS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4032 LIBRARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4033 BINARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4034 PLUGINS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4035 DATA_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4036 TRANSLATIONS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4037 SETTINGS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4038 EXAMPLES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4039 DEMOS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4041 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4043 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4044 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4047 if [ ! -z "$QT_HOST_PREFIX" ]; then
4048 HOSTPREFIX_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4049 HOSTDOCUMENTATION_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4050 HOSTHEADERS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4051 HOSTLIBRARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4052 HOSTBINARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4053 HOSTPLUGINS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4054 HOSTDATA_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4055 HOSTTRANSLATIONS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4056 HOSTSETTINGS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4057 HOSTEXAMPLES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4058 HOSTDEMOS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4060 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4062 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4063 /* Installation Info */
4064 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4065 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4066 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4067 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4068 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4069 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4070 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4071 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4072 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4073 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4074 static const char qt_configure_demos_path_str [256 + 12] = "$HOSTDEMOS_PATH_STR";
4075 #else // QT_BOOTSTRAPPED
4079 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4080 /* Installation Info */
4081 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4082 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4083 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4084 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4085 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4086 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4087 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4088 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4089 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4090 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4091 static const char qt_configure_demos_path_str [256 + 12] = "$DEMOS_PATH_STR";
4094 if [ ! -z "$QT_HOST_PREFIX" ]; then
4095 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4096 #endif // QT_BOOTSTRAPPED
4101 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4102 /* strlen( "qt_lcnsxxxx" ) == 12 */
4103 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4104 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4105 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4106 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4107 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4108 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4109 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4110 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4111 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4112 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4113 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4114 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4115 #define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;
4118 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4119 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4120 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4122 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w
"$outpath/src/corelib/global/qconfig.cpp"
4123 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4124 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4127 # -----------------------------------------------------------------------------
4129 # -----------------------------------------------------------------------------
4132 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4134 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS
="$SYNCQT_OPTS -check-includes"
4135 if [ "$OPT_SHADOW" = "yes" ]; then
4136 "$outpath/bin/syncqt" $SYNCQT_OPTS
4137 elif [ "$CFG_DEV" = "yes" ] ||
[ ! -d $relpath/include
]; then
4138 QTDIR
="$relpath" perl
"$outpath/bin/syncqt" $SYNCQT_OPTS
4143 # $2: optional transformation
4144 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4145 # is where the resulting variable is written to
4146 setBootstrapVariable
()
4148 variableRegExp
="^$1[^_A-Z0-9]"
4149 getQMakeConf |
grep "$variableRegExp" |
( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) |
$AWK '
4151 varLength = index($0, "=") - 1
4152 valStart = varLength + 2
4153 if (substr($0, varLength, 1) == "+") {
4154 varLength = varLength - 1
4155 valStart = valStart + 1
4157 var = substr($0, 0, varLength)
4158 gsub("[ \t]+", "", var)
4159 val = substr($0, valStart)
4160 printf "%s_%s = %s\n", var, NR, val
4163 if (length(var) > 0) {
4165 for (i = 1; i <= NR; ++i)
4166 printf " $(%s_%s)", var, i
4173 if true
; then ###[ '!' -f "$outpath/bin/qmake" ];
4174 echo "Creating qmake. Please wait..."
4177 QCONFIG_H
="$outpath/src/corelib/global/qconfig.h"
4178 QMAKE_QCONFIG_H
="${QCONFIG_H}.qmake"
4179 if [ -f "$QCONFIG_H" ]; then
4180 OLD_QCONFIG_H
=$QCONFIG_H
4181 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4184 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4185 # when building qmake, we use #defines for the install paths,
4186 # however they are real functions in the library
4187 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4188 mkdir
-p "$outpath/src/corelib/global"
4189 [ -f "$QCONFIG_H" ] && chmod +w
"$QCONFIG_H"
4190 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4193 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4194 for conf
in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
4195 if [ '!' -f "$conf" ]; then
4196 ln -s "$QCONFIG_H" "$conf"
4200 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4201 rm -f mkspecs
/default
4202 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs
/default
4204 for mkfile
in GNUmakefile Makefile
; do
4207 in_mkfile
="${mkfile}.in"
4208 if [ "$mkfile" = "Makefile" ]; then
4209 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4210 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4212 in_mkfile
="${mkfile}.unix"
4214 in_mkfile
="$relpath/qmake/$in_mkfile"
4215 mkfile
="$outpath/qmake/$mkfile"
4216 if [ -f "$mkfile" ]; then
4217 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags
>/dev
/null
2>&1 && chflags nouchg
"$mkfile"
4220 [ -f "$in_mkfile" ] ||
continue
4222 echo "########################################################################" > "$mkfile"
4223 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4224 echo "########################################################################" >> "$mkfile"
4227 EXTRA_CFLAGS
="\$(QMAKE_CFLAGS)"
4228 EXTRA_CXXFLAGS
="\$(QMAKE_CXXFLAGS)"
4229 EXTRA_LFLAGS
="\$(QMAKE_LFLAGS)"
4231 if [ "$PLATFORM" = "irix-cc" ] ||
[ "$PLATFORM" = "irix-cc-64" ]; then
4232 EXTRA_LFLAGS
="$EXTRA_LFLAGS -lm"
4235 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4236 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4237 if [ "$CFG_SILENT" = "yes" ]; then
4238 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC
's,QMAKE_CC.*=,CC=\@,'
4239 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX
's,QMAKE_CXX.*=,CXX=\@,'
4241 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC
's,QMAKE_CC,CC,'
4242 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX
's,QMAKE_CXX,CXX,'
4244 setBootstrapVariable QMAKE_CFLAGS
4245 setBootstrapVariable QMAKE_CXXFLAGS
's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4246 setBootstrapVariable QMAKE_LFLAGS
4248 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4249 EXTRA_CFLAGS
="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4250 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4252 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4253 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4254 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4255 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4256 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4257 elif [ "$CFG_DEBUG" = "yes" ]; then
4258 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4259 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4260 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4261 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4264 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
4265 setBootstrapVariable QMAKE_RPATH
's,\$\$LITERAL_WHITESPACE, ,'
4266 for rpath
in $RPATH_FLAGS; do
4267 EXTRA_LFLAGS
="\$(QMAKE_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4270 if [ "$PLATFORM_MAC" = "yes" ]; then
4271 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4272 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4273 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4274 EXTRA_LFLAGS
="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4275 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4276 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4277 EXTRA_OBJS
="qsettings_mac.o qcore_mac.o"
4278 EXTRA_SRCS
="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4279 if echo "$CFG_MAC_ARCHS" |
grep x86
> /dev
/null
2>&1; then # matches both x86 and x86_64
4280 X86_CFLAGS
="-arch i386"
4281 X86_LFLAGS
="-arch i386"
4282 EXTRA_CFLAGS
="$X86_CFLAGS $EXTRA_CFLAGS"
4283 EXTRA_CXXFLAGS
="$X86_CFLAGS $EXTRA_CXXFLAGS"
4284 EXTRA_LFLAGS
="$EXTRA_LFLAGS $X86_LFLAGS"
4286 if echo "$CFG_MAC_ARCHS" |
grep ppc
> /dev
/null
2>&1; then # matches both ppc and ppc64
4287 PPC_CFLAGS
="-arch ppc"
4288 PPC_LFLAGS
="-arch ppc"
4289 EXTRA_CFLAGS
="$PPC_CFLAGS $EXTRA_CFLAGS"
4290 EXTRA_CXXFLAGS
="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4291 EXTRA_LFLAGS
="$EXTRA_LFLAGS $PPC_LFLAGS"
4293 if [ '!' -z "$CFG_SDK" ]; then
4294 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4295 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4296 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4297 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4298 EXTRA_LFLAGS
="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4301 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS
="$EXTRA_CFLAGS -DQWS"
4302 if [ '!' -z "$D_FLAGS" ]; then
4303 for DEF
in $D_FLAGS; do
4304 EXTRA_CFLAGS
="$EXTRA_CFLAGS \"-D${DEF}\""
4307 QMAKE_BIN_DIR
="$QT_INSTALL_BINS"
4308 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR
="${QT_INSTALL_PREFIX}/bin"
4309 QMAKE_DATA_DIR
="$QT_INSTALL_DATA"
4310 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR
="${QT_INSTALL_PREFIX}"
4312 adjrelpath
=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4313 adjoutpath
=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4314 adjqmakespec
=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4315 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4316 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4317 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4318 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4319 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4320 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4321 -e "s,@QMAKESPEC@,$adjqmakespec,g" "$in_mkfile" >>"$mkfile"
4323 if "$WHICH" makedepend
>/dev
/null
2>&1 && grep 'depend:' "$mkfile" >/dev
/null
2>&1; then
4324 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend
) >/dev
/null
2>&1
4325 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4326 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4331 QMAKE_BUILD_ERROR
=no
4332 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR
=yes
4333 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4334 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4335 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4338 #-------------------------------------------------------------------------------
4339 # tests that need qmake
4340 #-------------------------------------------------------------------------------
4342 # detect availability of float math.h functions
4343 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/floatmath
"floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4344 CFG_USE_FLOATMATH
=yes
4346 CFG_USE_FLOATMATH
=no
4349 # detect mmx support
4350 if [ "${CFG_MMX}" = "auto" ]; then
4351 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mmx
"mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4358 # detect 3dnow support
4359 if [ "${CFG_3DNOW}" = "auto" ]; then
4360 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/3dnow
"3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4367 # detect sse support
4368 if [ "${CFG_SSE}" = "auto" ]; then
4369 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sse
"sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4376 # detect sse2 support
4377 if [ "${CFG_SSE2}" = "auto" ]; then
4378 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sse2
"sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4385 # check iWMMXt support
4386 if [ "$CFG_IWMMXT" = "yes" ]; then
4387 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/iwmmxt
"iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4388 if [ $?
!= "0" ]; then
4389 echo "The iWMMXt functionality test failed!"
4390 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4396 if [ "$CFG_ZLIB" = "no" ]; then
4397 # Note: Qt no longer support builds without zlib
4398 # So we force a "no" to be "auto" here.
4399 # If you REALLY really need no zlib support, you can still disable
4400 # it by doing the following:
4401 # add "no-zlib" to mkspecs/qconfig.pri
4402 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4404 # There's no guarantee that Qt will build under those conditions
4409 if [ "$CFG_ZLIB" = "auto" ]; then
4410 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/zlib
"zlib" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4417 # detect how jpeg should be built
4418 if [ "$CFG_JPEG" = "auto" ]; then
4419 if [ "$CFG_SHARED" = "yes" ]; then
4426 if [ "$CFG_LIBJPEG" = "auto" ]; then
4427 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/libjpeg
"libjpeg" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4434 # detect how gif should be built
4435 if [ "$CFG_GIF" = "auto" ]; then
4436 if [ "$CFG_SHARED" = "yes" ]; then
4443 # detect how tiff should be built
4444 if [ "$CFG_TIFF" = "auto" ]; then
4445 if [ "$CFG_SHARED" = "yes" ]; then
4453 if [ "$CFG_LIBTIFF" = "auto" ]; then
4454 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/libtiff
"libtiff" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4461 # detect how mng should be built
4462 if [ "$CFG_MNG" = "auto" ]; then
4463 if [ "$CFG_SHARED" = "yes" ]; then
4470 if [ "$CFG_LIBMNG" = "auto" ]; then
4471 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/libmng
"libmng" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4479 if [ "$CFG_LIBPNG" = "auto" ]; then
4480 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/libpng
"libpng" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4487 # detect accessibility
4488 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4489 CFG_ACCESSIBILITY
=yes
4492 # auto-detect SQL-modules support
4493 for _SQLDR
in $CFG_SQL_AVAILABLE; do
4496 if [ "$CFG_SQL_mysql" != "no" ]; then
4497 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG
=`"$WHICH" mysql_config`
4498 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4499 QT_CFLAGS_MYSQL
=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4500 QT_LFLAGS_MYSQL_R
=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4501 QT_LFLAGS_MYSQL
=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4502 QT_MYSQL_VERSION
=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4503 QT_MYSQL_VERSION_MAJOR
=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4505 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4506 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4507 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4508 echo " You need MySql 4 or higher."
4509 echo " If you believe this message is in error you may use the continue"
4510 echo " switch (-continue) to $0 to continue."
4515 QT_LFLAGS_MYSQL_R
=""
4519 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mysql_r
"MySQL (thread-safe)" $QT_LFLAGS_MYSQL_R $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4520 QMakeVar add CONFIG use_libmysqlclient_r
4521 if [ "$CFG_SQL_mysql" = "auto" ]; then
4522 CFG_SQL_mysql
=plugin
4524 QT_LFLAGS_MYSQL
="$QT_LFLAGS_MYSQL_R"
4525 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mysql
"MySQL (thread-unsafe)" $QT_LFLAGS_MYSQL $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4526 if [ "$CFG_SQL_mysql" = "auto" ]; then
4527 CFG_SQL_mysql
=plugin
4530 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4531 echo "MySQL support cannot be enabled due to functionality tests!"
4532 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4533 echo " If you believe this message is in error you may use the continue"
4534 echo " switch (-continue) to $0 to continue."
4539 QT_LFLAGS_MYSQL_R
=""
4547 if [ "$CFG_SQL_psql" != "no" ]; then
4548 if "$WHICH" pg_config
>/dev
/null
2>&1; then
4549 QT_CFLAGS_PSQL
=`pg_config --includedir 2>/dev/null`
4550 QT_LFLAGS_PSQL
=`pg_config --libdir 2>/dev/null`
4552 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL
="-I$QT_CFLAGS_PSQL"
4553 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL
="-L$QT_LFLAGS_PSQL"
4554 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/psql
"PostgreSQL" $QT_LFLAGS_PSQL $L_FLAGS $QT_CFLAGS_PSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4555 if [ "$CFG_SQL_psql" = "auto" ]; then
4559 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4560 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4561 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4562 echo " If you believe this message is in error you may use the continue"
4563 echo " switch (-continue) to $0 to continue."
4574 if [ "$CFG_SQL_odbc" != "no" ]; then
4575 if [ "$PLATFORM_MAC" != "yes" ] && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/odbc
"ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4576 if [ "$CFG_SQL_odbc" = "auto" ]; then
4580 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/iodbc
"iODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4581 QT_LFLAGS_ODBC
="-liodbc"
4582 if [ "$CFG_SQL_odbc" = "auto" ]; then
4586 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4587 echo "ODBC support cannot be enabled due to functionality tests!"
4588 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4589 echo " If you believe this message is in error you may use the continue"
4590 echo " switch (-continue) to $0 to continue."
4600 if [ "$CFG_SQL_oci" != "no" ]; then
4601 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/oci
"OCI" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4602 if [ "$CFG_SQL_oci" = "auto" ]; then
4606 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4607 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4608 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4609 echo " If you believe this message is in error you may use the continue"
4610 echo " switch (-continue) to $0 to continue."
4619 if [ "$CFG_SQL_tds" != "no" ]; then
4620 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/tds
"TDS" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4621 if [ "$CFG_SQL_tds" = "auto" ]; then
4625 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4626 echo "TDS support cannot be enabled due to functionality tests!"
4627 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4628 echo " If you believe this message is in error you may use the continue"
4629 echo " switch (-continue) to $0 to continue."
4638 if [ "$CFG_SQL_db2" != "no" ]; then
4639 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/db2
"DB2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4640 if [ "$CFG_SQL_db2" = "auto" ]; then
4644 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4645 echo "ODBC support cannot be enabled due to functionality tests!"
4646 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4647 echo " If you believe this message is in error you may use the continue"
4648 echo " switch (-continue) to $0 to continue."
4657 if [ "$CFG_SQL_ibase" != "no" ]; then
4658 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/ibase
"InterBase" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4659 if [ "$CFG_SQL_ibase" = "auto" ]; then
4660 CFG_SQL_ibase
=plugin
4663 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4664 echo "InterBase support cannot be enabled due to functionality tests!"
4665 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4666 echo " If you believe this message is in error you may use the continue"
4667 echo " switch (-continue) to $0 to continue."
4676 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4677 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sqlite2
"SQLite2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4678 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4679 CFG_SQL_sqlite2
=plugin
4682 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4683 echo "SQLite2 support cannot be enabled due to functionality tests!"
4684 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4685 echo " If you believe this message is in error you may use the continue"
4686 echo " switch (-continue) to $0 to continue."
4695 if [ "$CFG_SQL_sqlite" != "no" ]; then
4696 SQLITE_AUTODETECT_FAILED
="no"
4697 if [ "$CFG_SQLITE" = "system" ]; then
4698 if [ -n "$PKG_CONFIG" ]; then
4699 QT_CFLAGS_SQLITE
=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4700 QT_LFLAGS_SQLITE
=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4702 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sqlite
"SQLite" $QT_LFLAGS_SQLITE $L_FLAGS $QT_CFLAGS_SQLITE $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4703 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4704 CFG_SQL_sqlite
=plugin
4706 QMAKE_CONFIG
="$QMAKE_CONFIG system-sqlite"
4708 SQLITE_AUTODETECT_FAILED
="yes"
4711 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4712 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4713 CFG_SQL_sqlite
=plugin
4716 SQLITE_AUTODETECT_FAILED
="yes"
4720 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4721 echo "SQLite support cannot be enabled due to functionality tests!"
4722 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4723 echo " If you believe this message is in error you may use the continue"
4724 echo " switch (-continue) to $0 to continue."
4730 if [ "$OPT_VERBOSE" = "yes" ]; then
4731 echo "unknown SQL driver: $_SQLDR"
4737 # auto-detect NIS support
4738 if [ "$CFG_NIS" != "no" ]; then
4739 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/nis
"NIS" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4742 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4743 echo "NIS support cannot be enabled due to functionality tests!"
4744 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4745 echo " If you believe this message is in error you may use the continue"
4746 echo " switch (-continue) to $0 to continue."
4754 # auto-detect CUPS support
4755 if [ "$CFG_CUPS" != "no" ]; then
4756 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/cups
"Cups" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4759 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4760 echo "Cups support cannot be enabled due to functionality tests!"
4761 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4762 echo " If you believe this message is in error you may use the continue"
4763 echo " switch (-continue) to $0 to continue."
4771 # auto-detect iconv(3) support
4772 if [ "$CFG_ICONV" != "no" ]; then
4773 if [ "$PLATFORM_QWS" = "yes" ]; then
4775 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/iconv" "POSIX iconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4777 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/gnu-libiconv" "GNU libiconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4780 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4781 echo "Iconv support cannot be enabled due to functionality tests!"
4782 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4783 echo " If you believe this message is in error you may use the continue"
4784 echo " switch (-continue) to $0 to continue."
4792 # auto-detect libdbus-1 support
4793 if [ "$CFG_DBUS" != "no" ]; then
4794 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1
2>/dev
/null
; then
4795 QT_CFLAGS_DBUS
=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4796 QT_LIBS_DBUS
=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4798 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/dbus
"D-Bus" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_DBUS $QT_LIBS_DBUS $MAC_CONFIG_TEST_COMMANDLINE; then
4799 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS
=yes
4800 QMakeVar
set QT_CFLAGS_DBUS
"$QT_CFLAGS_DBUS"
4801 QMakeVar
set QT_LIBS_DBUS
"$QT_LIBS_DBUS"
4803 if [ "$CFG_DBUS" = "auto" ]; then
4805 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4806 # CFG_DBUS is "yes" or "linked" here
4808 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4809 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4810 echo " If you believe this message is in error you may use the continue"
4811 echo " switch (-continue) to $0 to continue."
4817 # Generate a CRC of the namespace for using in constants for the Carbon port.
4818 # This should mean that you really *can* load two Qt's and have our custom
4819 # Carbon events work.
4820 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
4821 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`
4824 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
4826 # detect EGL support
4827 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl" "EGL (EGL/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then
4828 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
4830 CFG_EGL_GLES_INCLUDES
=no
4831 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl4gles1" "EGL (GLES/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then
4832 # EGL specified by QMAKE_*_EGL, included with <GLES/egl.h>
4834 CFG_EGL_GLES_INCLUDES
=yes
4836 if ( [ "$CFG_OPENGL" = "es1" ] ||
[ "$CFG_OPENGL" = "es1cl" ] ||
[ "$CFG_OPENGL" = "es2" ] ) && [ "$CFG_EGL" != "yes" ] && [ "$PLATFORM_X11" = "yes" ]; then
4837 echo "The EGL functionality test failed!"
4838 echo " EGL is required for OpenGL ES on X11 to manage contexts & surfaces."
4839 echo " You might need to modify the include and library search paths by editing"
4840 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
4841 echo " ${XQMAKESPEC}."
4846 # auto-detect Glib support
4847 if [ "$CFG_GLIB" != "no" ]; then
4848 if [ -n "$PKG_CONFIG" ]; then
4849 QT_CFLAGS_GLIB
=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4850 QT_LIBS_GLIB
=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4852 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
4854 QMakeVar
set QT_CFLAGS_GLIB
"$QT_CFLAGS_GLIB"
4855 QMakeVar
set QT_LIBS_GLIB
"$QT_LIBS_GLIB"
4857 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4858 echo "Glib support cannot be enabled due to functionality tests!"
4859 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4860 echo " If you believe this message is in error you may use the continue"
4861 echo " switch (-continue) to $0 to continue."
4869 if [ "$CFG_PHONON" != "no" ]; then
4870 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
4871 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4872 if [ -n "$PKG_CONFIG" ]; then
4873 QT_CFLAGS_GSTREAMER
=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4874 QT_LIBS_GSTREAMER
=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4876 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
4878 QMakeVar
set QT_CFLAGS_GSTREAMER
"$QT_CFLAGS_GSTREAMER"
4879 QMakeVar
set QT_LIBS_GSTREAMER
"$QT_LIBS_GSTREAMER"
4881 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4882 echo "Gstreamer support cannot be enabled due to functionality tests!"
4883 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4884 echo " If you believe this message is in error you may use the continue"
4885 echo " switch (-continue) to $0 to continue."
4891 elif [ "$CFG_GLIB" = "no" ]; then
4895 if [ "$CFG_GSTREAMER" = "yes" ]; then
4898 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4899 echo "Phonon support cannot be enabled due to functionality tests!"
4900 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4901 echo " If you believe this message is in error you may use the continue"
4902 echo " switch (-continue) to $0 to continue."
4915 if [ "$PLATFORM_X11" = "yes" ]; then
4916 x11tests
="$relpath/config.tests/x11"
4919 # work around broken X11 headers when using GCC 2.95 or later
4921 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE
=yes
4922 if [ $NOTYPE = "yes" ]; then
4923 QMakeVar add QMAKE_CXXFLAGS
-fpermissive
4924 X11TESTS_FLAGS
="$X11TESTS_FLAGS -fpermissive"
4927 # Check we actually have X11 :-)
4928 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xlib
"XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4929 if [ $?
!= "0" ]; then
4930 echo "Basic XLib functionality test failed!"
4931 echo " You might need to modify the include and library search paths by editing"
4932 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4936 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
4937 if [ "$CFG_OPENGL" = "auto" ] ||
[ "$CFG_OPENGL" = "yes" ]; then
4938 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
4940 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
4942 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
4944 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
4947 if [ "$CFG_OPENGL" = "yes" ]; then
4948 echo "All the OpenGL functionality tests failed!"
4949 echo " You might need to modify the include and library search paths by editing"
4950 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4951 echo " ${XQMAKESPEC}."
4958 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4959 if [ "$CFG_OPENGL" = "desktop" ]; then
4960 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/glxfbconfig
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4961 if [ $?
!= "0" ]; then
4962 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4969 elif [ "$CFG_OPENGL" = "es1cl" ]; then
4970 # OpenGL ES 1.x common lite
4971 "$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
4972 if [ $?
!= "0" ]; then
4973 echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
4974 echo " You might need to modify the include and library search paths by editing"
4975 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4976 echo " ${XQMAKESPEC}."
4979 elif [ "$CFG_OPENGL" = "es1" ]; then
4981 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1
"OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
4982 if [ $?
!= "0" ]; then
4983 echo "The OpenGL ES 1.x functionality test failed!"
4984 echo " You might need to modify the include and library search paths by editing"
4985 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4986 echo " ${XQMAKESPEC}."
4989 elif [ "$CFG_OPENGL" = "es2" ]; then
4991 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles2
"OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4992 if [ $?
!= "0" ]; then
4993 echo "The OpenGL ES 2.0 functionality test failed!"
4994 echo " You might need to modify the include and library search paths by editing"
4995 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4996 echo " ${XQMAKESPEC}."
4999 elif [ "$CFG_OPENGL" = "desktop" ]; then
5000 # Desktop OpenGL support
5001 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/opengl
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5002 if [ $?
!= "0" ]; then
5003 echo "The OpenGL functionality test failed!"
5004 echo " You might need to modify the include and library search paths by editing"
5005 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5006 echo " ${XQMAKESPEC}."
5011 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5012 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/glxfbconfig
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5013 if [ $?
!= "0" ]; then
5014 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5022 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5023 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5024 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5025 CFG_GRAPHICS_SYSTEM
=default
5028 # auto-detect Xcursor support
5029 if [ "$CFG_XCURSOR" != "no" ]; then
5030 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
5031 if [ "$CFG_XCURSOR" != "runtime" ]; then
5035 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5036 echo "Xcursor support cannot be enabled due to functionality tests!"
5037 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5038 echo " If you believe this message is in error you may use the continue"
5039 echo " switch (-continue) to $0 to continue."
5047 # auto-detect Xfixes support
5048 if [ "$CFG_XFIXES" != "no" ]; then
5049 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xfixes
"Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5050 if [ "$CFG_XFIXES" != "runtime" ]; then
5054 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5055 echo "Xfixes support cannot be enabled due to functionality tests!"
5056 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5057 echo " If you believe this message is in error you may use the continue"
5058 echo " switch (-continue) to $0 to continue."
5066 # auto-detect Xrandr support (resize and rotate extension)
5067 if [ "$CFG_XRANDR" != "no" ]; then
5068 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
5069 if [ "$CFG_XRANDR" != "runtime" ]; then
5073 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5074 echo "Xrandr support cannot be enabled due to functionality tests!"
5075 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5076 echo " If you believe this message is in error you may use the continue"
5077 echo " switch (-continue) to $0 to continue."
5085 # auto-detect Xrender support
5086 if [ "$CFG_XRENDER" != "no" ]; then
5087 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
5090 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5091 echo "Xrender support cannot be enabled due to functionality tests!"
5092 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5093 echo " If you believe this message is in error you may use the continue"
5094 echo " switch (-continue) to $0 to continue."
5102 # auto-detect MIT-SHM support
5103 if [ "$CFG_MITSHM" != "no" ]; then
5104 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
5107 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5108 echo "MITSHM support cannot be enabled due to functionality tests!"
5109 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5110 echo " If you believe this message is in error you may use the continue"
5111 echo " switch (-continue) to $0 to continue."
5119 # auto-detect FontConfig support
5120 if [ "$CFG_FONTCONFIG" != "no" ]; then
5121 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig
2>/dev
/null
; then
5122 QT_CFLAGS_FONTCONFIG
=`$PKG_CONFIG --cflags fontconfig 2>/dev/null`
5123 QT_LIBS_FONTCONFIG
=`$PKG_CONFIG --libs fontconfig 2>/dev/null`
5125 QT_CFLAGS_FONTCONFIG
=
5126 QT_LIBS_FONTCONFIG
="-lfreetype -lfontconfig"
5128 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
5130 QMakeVar
set QMAKE_CFLAGS_X11
"$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5131 QMakeVar
set QMAKE_LIBS_X11
"$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5132 CFG_LIBFREETYPE
=system
5134 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5135 echo "FontConfig support cannot be enabled due to functionality tests!"
5136 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5137 echo " If you believe this message is in error you may use the continue"
5138 echo " switch (-continue) to $0 to continue."
5146 # auto-detect Session Management support
5147 if [ "$CFG_SM" = "auto" ]; then
5148 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
5151 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5152 echo "Session Management support cannot be enabled due to functionality tests!"
5153 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5154 echo " If you believe this message is in error you may use the continue"
5155 echo " switch (-continue) to $0 to continue."
5163 # auto-detect SHAPE support
5164 if [ "$CFG_XSHAPE" != "no" ]; then
5165 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
5168 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5169 echo "XShape support cannot be enabled due to functionality tests!"
5170 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5171 echo " If you believe this message is in error you may use the continue"
5172 echo " switch (-continue) to $0 to continue."
5180 # auto-detect XSync support
5181 if [ "$CFG_XSYNC" != "no" ]; then
5182 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xsync
"XSync" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5185 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5186 echo "XSync support cannot be enabled due to functionality tests!"
5187 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5188 echo " If you believe this message is in error you may use the continue"
5189 echo " switch (-continue) to $0 to continue."
5197 # auto-detect Xinerama support
5198 if [ "$CFG_XINERAMA" != "no" ]; then
5199 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
5200 if [ "$CFG_XINERAMA" != "runtime" ]; then
5204 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5205 echo "Xinerama support cannot be enabled due to functionality tests!"
5206 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5207 echo " If you believe this message is in error you may use the continue"
5208 echo " switch (-continue) to $0 to continue."
5216 # auto-detect Xinput support
5217 if [ "$CFG_XINPUT" != "no" ]; then
5218 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
5219 if [ "$CFG_XINPUT" != "runtime" ]; then
5223 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5224 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5225 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5226 echo " If you believe this message is in error you may use the continue"
5227 echo " switch (-continue) to $0 to continue."
5235 # auto-detect XKB support
5236 if [ "$CFG_XKB" != "no" ]; then
5237 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
5240 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5241 echo "XKB support cannot be enabled due to functionality tests!"
5242 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5243 echo " If you believe this message is in error you may use the continue"
5244 echo " switch (-continue) to $0 to continue."
5252 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5253 if [ -n "$PKG_CONFIG" ]; then
5254 QT_CFLAGS_QGTKSTYLE
=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5255 QT_LIBS_QGTKSTYLE
=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5257 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5259 QMakeVar
set QT_CFLAGS_QGTKSTYLE
"$QT_CFLAGS_QGTKSTYLE"
5260 QMakeVar
set QT_LIBS_QGTKSTYLE
"$QT_LIBS_QGTKSTYLE"
5262 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5263 echo "Gtk theme support cannot be enabled due to functionality tests!"
5264 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5265 echo " If you believe this message is in error you may use the continue"
5266 echo " switch (-continue) to $0 to continue."
5272 elif [ "$CFG_GLIB" = "no" ]; then
5278 if [ "$PLATFORM_MAC" = "yes" ]; then
5279 if [ "$CFG_PHONON" != "no" ]; then
5280 # Always enable Phonon (unless it was explicitly disabled)
5286 if [ "$PLATFORM_QWS" = "yes" ]; then
5288 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5289 if [ "$CFG_OPENGL" = "yes" ]; then
5290 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
5292 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
5294 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
5297 echo "All the OpenGL ES functionality tests failed!"
5298 echo " You might need to modify the include and library search paths by editing"
5299 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5300 echo " ${XQMAKESPEC}."
5303 elif [ "$CFG_OPENGL" = "es1" ]; then
5305 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1
"OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5306 if [ $?
!= "0" ]; then
5307 echo "The OpenGL ES 1.x functionality test failed!"
5308 echo " You might need to modify the include and library search paths by editing"
5309 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5310 echo " ${XQMAKESPEC}."
5313 elif [ "$CFG_OPENGL" = "es2" ]; then
5315 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles2
"OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5316 if [ $?
!= "0" ]; then
5317 echo "The OpenGL ES 2.0 functionality test failed!"
5318 echo " You might need to modify the include and library search paths by editing"
5319 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5320 echo " ${XQMAKESPEC}."
5323 elif [ "$CFG_OPENGL" = "desktop" ]; then
5324 # Desktop OpenGL support
5325 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5330 for screen
in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5331 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5332 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/ahi
"Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
5333 if [ $?
!= "0" ]; then
5334 echo "The Ahi screen driver functionality test failed!"
5335 echo " You might need to modify the include and library search paths by editing"
5336 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5337 echo " ${XQMAKESPEC}."
5342 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5343 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/svgalib
"SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
5344 if [ $?
!= "0" ]; then
5345 echo "The SVGAlib screen driver functionality test failed!"
5346 echo " You might need to modify the include and library search paths by editing"
5347 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5348 echo " ${XQMAKESPEC}."
5353 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5354 if [ -n "$PKG_CONFIG" ]; then
5355 if $PKG_CONFIG --exists directfb
2>/dev
/null
; then
5356 QT_CFLAGS_DIRECTFB
=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5357 QT_LIBS_DIRECTFB
=`$PKG_CONFIG --libs directfb 2>/dev/null`
5358 elif directfb-config
--version >/dev
/null
2>&1; then
5359 QT_CFLAGS_DIRECTFB
=`directfb-config --cflags 2>/dev/null`
5360 QT_LIBS_DIRECTFB
=`directfb-config --libs 2>/dev/null`
5364 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5365 if [ -n "$QT_CFLAGS_DIRECTFB" ] ||
[ -n "$QT_LIBS_DIRECTFB" ]; then
5366 QMakeVar
set QT_CFLAGS_DIRECTFB
"$QT_CFLAGS_DIRECTFB"
5367 QMakeVar
set QT_LIBS_DIRECTFB
"$QT_LIBS_DIRECTFB"
5369 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5370 QMakeVar
set QT_DEFINES_DIRECTFB
"QT3_SUPPORT"
5373 "$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
5374 if [ $?
!= "0" ]; then
5375 echo "The DirectFB screen driver functionality test failed!"
5376 echo " You might need to modify the include and library search paths by editing"
5377 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5378 echo " ${XQMAKESPEC}."
5386 for mouse
in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5387 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5388 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/tslib
"tslib" $L_FLAGS $I_FLAGS $l_FLAGS
5389 if [ $?
!= "0" ]; then
5390 echo "The tslib functionality test failed!"
5391 echo " You might need to modify the include and library search paths by editing"
5392 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5393 echo " ${XQMAKESPEC}."
5402 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/sound
"sound" $L_FLAGS $I_FLAGS $l_FLAGS
5403 if [ $?
!= "0" ]; then
5404 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SOUND"
5410 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE
="$CFG_QWS_FREETYPE"
5411 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE
=no
5412 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5413 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/freetype
"FreeType" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
5414 CFG_LIBFREETYPE
=system
5420 if [ "$CFG_ENDIAN" = "auto" ]; then
5421 if [ "$PLATFORM_MAC" = "yes" ]; then
5424 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5426 if [ "$F" -eq 0 ]; then
5427 CFG_ENDIAN
="Q_LITTLE_ENDIAN"
5428 elif [ "$F" -eq 1 ]; then
5429 CFG_ENDIAN
="Q_BIG_ENDIAN"
5432 echo "The target system byte order could not be detected!"
5433 echo "Turn on verbose messaging (-v) to see the final report."
5434 echo "You can use the -little-endian or -big-endian switch to"
5435 echo "$0 to continue."
5441 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5442 if [ "$PLATFORM_MAC" = "yes" ]; then
5445 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5447 if [ "$F" -eq 0 ]; then
5448 CFG_HOST_ENDIAN
="Q_LITTLE_ENDIAN"
5449 elif [ "$F" -eq 1 ]; then
5450 CFG_HOST_ENDIAN
="Q_BIG_ENDIAN"
5453 echo "The host system byte order could not be detected!"
5454 echo "Turn on verbose messaging (-v) to see the final report."
5455 echo "You can use the -host-little-endian or -host-big-endian switch to"
5456 echo "$0 to continue."
5462 if [ "$CFG_ARMFPA" != "auto" ]; then
5463 if [ "$CFG_ARMFPA" = "yes" ]; then
5464 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5465 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5467 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5470 CFG_DOUBLEFORMAT
="normal"
5475 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5476 if [ "$PLATFORM_QWS" != "yes" ]; then
5477 CFG_DOUBLEFORMAT
=normal
5479 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5481 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5482 CFG_DOUBLEFORMAT
=normal
5483 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
5484 CFG_DOUBLEFORMAT
=normal
5485 elif [ "$F" -eq 10 ]; then
5486 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE"
5487 elif [ "$F" -eq 11 ]; then
5488 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG"
5489 elif [ "$F" -eq 12 ]; then
5490 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5492 elif [ "$F" -eq 13 ]; then
5493 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5497 echo "The system floating point format could not be detected."
5498 echo "This may cause data to be generated in a wrong format"
5499 echo "Turn on verbose messaging (-v) to see the final report."
5500 # we do not fail on this since this is a new test, and if it fails,
5501 # the old behavior should be correct in most cases
5502 CFG_DOUBLEFORMAT
=normal
5508 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stl
"STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5512 if [ "$CFG_STL" != "no" ]; then
5513 if [ "$HAVE_STL" = "yes" ]; then
5516 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5517 echo "STL support cannot be enabled due to functionality tests!"
5518 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5519 echo " If you believe this message is in error you may use the continue"
5520 echo " switch (-continue) to $0 to continue."
5528 # find if the platform supports IPv6
5529 if [ "$CFG_IPV6" != "no" ]; then
5530 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/ipv6
"IPv6" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
5533 if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5534 echo "IPv6 support cannot be enabled due to functionality tests!"
5535 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5536 echo " If you believe this message is in error you may use the continue"
5537 echo " switch (-continue) to $0 to continue."
5545 # detect POSIX clock_gettime()
5546 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5547 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
5548 CFG_CLOCK_GETTIME
=yes
5550 CFG_CLOCK_GETTIME
=no
5554 # detect POSIX monotonic clocks
5555 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5556 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
5557 CFG_CLOCK_MONOTONIC
=yes
5559 CFG_CLOCK_MONOTONIC
=no
5561 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5562 CFG_CLOCK_MONOTONIC
=no
5566 if [ "$CFG_MREMAP" = "auto" ]; then
5567 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mremap
"mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5574 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5575 if [ "$CFG_GETADDRINFO" != "no" ]; then
5576 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getaddrinfo
"getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5579 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5580 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5581 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5582 echo " If you believe this message is in error you may use the continue"
5583 echo " switch (-continue) to $0 to continue."
5591 # find if the platform provides inotify
5592 if [ "$CFG_INOTIFY" != "no" ]; then
5593 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/inotify
"inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5596 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5597 echo "inotify support cannot be enabled due to functionality tests!"
5598 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5599 echo " If you believe this message is in error you may use the continue"
5600 echo " switch (-continue) to $0 to continue."
5608 # find if the platform provides if_nametoindex (ipv6 interface name support)
5609 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5610 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
5613 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5614 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5615 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5616 echo " If you believe this message is in error you may use the continue"
5617 echo " switch (-continue) to $0 to continue."
5625 # find if the platform provides getifaddrs (network interface enumeration)
5626 if [ "$CFG_GETIFADDRS" != "no" ]; then
5627 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getifaddrs
"getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5630 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5631 echo "getifaddrs support cannot be enabled due to functionality tests!"
5632 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5633 echo " If you believe this message is in error you may use the continue"
5634 echo " switch (-continue) to $0 to continue."
5642 # find if the platform supports X/Open Large File compilation environment
5643 if [ "$CFG_LARGEFILE" != "no" ]; then
5644 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
5647 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5648 echo "X/Open Large File support cannot be enabled due to functionality tests!"
5649 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5650 echo " If you believe this message is in error you may use the continue"
5651 echo " switch (-continue) to $0 to continue."
5660 if [ "$CFG_OPENSSL" != "no" ]; then
5661 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/openssl
"OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
5662 if [ "$CFG_OPENSSL" = "auto" ]; then
5666 if ( [ "$CFG_OPENSSL" = "yes" ] ||
[ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5667 echo "OpenSSL support cannot be enabled due to functionality tests!"
5668 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5669 echo " If you believe this message is in error you may use the continue"
5670 echo " switch (-continue) to $0 to continue."
5678 # detect OpenVG support
5679 if [ "$CFG_OPENVG" != "no" ]; then
5680 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
5681 if [ "$CFG_OPENVG" = "auto" ]; then
5684 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
5685 if [ "$CFG_OPENVG" = "auto" ]; then
5688 CFG_OPENVG_ON_OPENGL
=yes
5689 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
5690 if [ "$CFG_OPENVG" = "auto" ]; then
5693 CFG_OPENVG_LC_INCLUDES
=yes
5694 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
5695 if [ "$CFG_OPENVG" = "auto" ]; then
5698 CFG_OPENVG_LC_INCLUDES
=yes
5699 CFG_OPENVG_ON_OPENGL
=yes
5701 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5702 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5703 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5704 echo " If you believe this message is in error you may use the continue"
5705 echo " switch (-continue) to $0 to continue."
5711 if [ "$CFG_OPENVG" == "yes" ] && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/shivavg" "ShivaVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
5712 CFG_OPENVG_SHIVA
=yes
5716 # if openvg is disabled and the user specified graphicssystem vg, disable it...
5717 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
5718 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
5719 CFG_GRAPHICS_SYSTEM
=default
5722 if [ "$CFG_PTMALLOC" != "no" ]; then
5723 # build ptmalloc, copy .a file to lib/
5724 echo "Building ptmalloc. Please wait..."
5725 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
5726 mkdir
"$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
5728 QMakeVar add QMAKE_LFLAGS
"$outpath/lib/libptmalloc3.a"
5731 if [ "$CFG_ALSA" = "auto" ]; then
5732 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/alsa
"alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5739 #-------------------------------------------------------------------------------
5740 # ask for all that hasn't been auto-detected or specified in the arguments
5741 #-------------------------------------------------------------------------------
5743 ### fix this: user input should be validated in a loop
5744 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PLATFORM_QWS" = "yes" ]; then
5746 echo "Choose pixel-depths to support:"
5748 echo " 1. 1bpp, black/white"
5749 echo " 4. 4bpp, grayscale"
5750 echo " 8. 8bpp, paletted"
5751 echo " 12. 12bpp, rgb 4-4-4"
5752 echo " 15. 15bpp, rgb 5-5-5"
5753 echo " 16. 16bpp, rgb 5-6-5"
5754 echo " 18. 18bpp, rgb 6-6-6"
5755 echo " 24. 24bpp, rgb 8-8-8"
5756 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
5757 echo " all. All supported depths"
5759 echo "Your choices (default 8,16,32):"
5761 if [ -z "$CFG_QWS_DEPTHS" ] ||
[ "$CFG_QWS_DEPTHS" = "yes" ]; then
5762 CFG_QWS_DEPTHS
=8,16,32
5765 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
5766 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
5767 CFG_QWS_DEPTHS
="1 4 8 12 15 16 18 24 32 generic"
5769 for D
in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
5771 1|
4|
8|
12|
15|
16|
18|
24|
32) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
5772 generic
) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
5777 # enable dwarf2 support on Mac
5778 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5779 QT_CONFIG
="$QT_CONFIG dwarf2"
5782 # Set the default arch.
5783 # Carbon builds: 32 bit x86/ppc.
5784 # For "-cocoa" builds on snow leopard : compiler default (64-bit).
5785 # For "-cocoa" builds on leopard : compiler default (32-bit).
5786 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" == "" ]; then
5787 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
5789 if [ "$CFG_MAC_COCOA" != "yes" ]; then
5790 if [ "$QT_MAC_DEFAULT_ARCH" == "x86_64" ]; then
5791 CFG_MAC_ARCHS
=" x86"
5792 elif [ "$QT_MAC_DEFAULT_ARCH" == "ppc64" ]; then
5793 CFG_MAC_ARCHS
=" ppc"
5795 CFG_MAC_ARCHS
=" $QT_MAC_DEFAULT_ARCH"
5798 CFG_MAC_ARCHS
=" $QT_MAC_DEFAULT_ARCH"
5801 [ "$OPT_VERBOSE" == "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
5804 # enable cocoa and/or carbon on Mac
5805 if [ "$CFG_MAC_COCOA" = "yes" ]; then
5806 # -cocoa on the command line disables carbon completely (i.e. use cocoa for 32-bit as well)
5809 # check which archs are in use, enable cocoa if we find a 64-bit one
5810 if echo "$CFG_MAC_ARCHS" |
grep 64 > /dev
/null
2>&1; then
5811 CFG_MAC_COCOA
="yes";
5812 CFG_MAC_CARBON
="no";
5813 if echo "$CFG_MAC_ARCHS" |
grep -w ppc
> /dev
/null
2>&1; then
5814 CFG_MAC_CARBON
="yes";
5816 if echo "$CFG_MAC_ARCHS" |
grep -w x86
> /dev
/null
2>&1; then
5817 CFG_MAC_CARBON
="yes";
5820 # no 64-bit archs found.
5825 # set the global Mac deployment target. This is overridden on an arch-by-arch basis
5826 # in some cases, see code further down
5827 case "$PLATFORM,$CFG_MAC_COCOA" in
5830 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.5
5835 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.4
5839 # disable Qt 3 support on VxWorks
5840 case "$XPLATFORM" in
5841 unsupported
/vxworks
*)
5846 # enable Qt 3 support functionality
5847 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5848 QT_CONFIG
="$QT_CONFIG qt3support"
5852 if [ "$CFG_PHONON" = "yes" ]; then
5853 QT_CONFIG
="$QT_CONFIG phonon"
5854 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5855 QT_CONFIG
="$QT_CONFIG phonon-backend"
5858 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_PHONON"
5861 # disable accessibility
5862 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5863 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5865 QT_CONFIG
="$QT_CONFIG accessibility"
5869 if [ "$CFG_EGL" = "no" ]; then
5870 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_EGL"
5872 QT_CONFIG
="$QT_CONFIG egl"
5873 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
5874 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GLES_EGL"
5879 if [ "$CFG_OPENVG" = "no" ]; then
5880 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENVG"
5882 QT_CONFIG
="$QT_CONFIG openvg"
5883 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5884 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5886 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5887 QT_CONFIG
="$QT_CONFIG openvg_on_opengl"
5889 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5890 QT_CONFIG
="$QT_CONFIG shivavg"
5891 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_SHIVAVG"
5896 if [ "$CFG_OPENGL" = "no" ]; then
5897 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENGL"
5899 QT_CONFIG
="$QT_CONFIG opengl"
5902 if [ "$CFG_OPENGL" = "es1" ] ||
[ "$CFG_OPENGL" = "es1cl" ] ||
[ "$CFG_OPENGL" = "es2" ]; then
5903 if [ "$PLATFORM_QWS" = "yes" ]; then
5904 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
5905 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_USE_EGLWINDOWSURFACE"
5907 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES"
5910 if [ "$CFG_OPENGL" = "es1" ]; then
5911 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1"
5912 QT_CONFIG
="$QT_CONFIG opengles1"
5915 if [ "$CFG_OPENGL" = "es1cl" ]; then
5916 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1_CL"
5917 QT_CONFIG
="$QT_CONFIG opengles1cl"
5920 if [ "$CFG_OPENGL" = "es2" ]; then
5921 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5922 QT_CONFIG
="$QT_CONFIG opengles2"
5925 # safe execution environment
5926 if [ "$CFG_SXE" != "no" ]; then
5927 QT_CONFIG
="$QT_CONFIG sxe"
5930 # build up the variables for output
5931 if [ "$CFG_DEBUG" = "yes" ]; then
5932 QMAKE_OUTDIR
="${QMAKE_OUTDIR}debug"
5933 QMAKE_CONFIG
="$QMAKE_CONFIG debug"
5934 elif [ "$CFG_DEBUG" = "no" ]; then
5935 QMAKE_OUTDIR
="${QMAKE_OUTDIR}release"
5936 QMAKE_CONFIG
="$QMAKE_CONFIG release"
5938 if [ "$CFG_SHARED" = "yes" ]; then
5939 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-shared"
5940 QMAKE_CONFIG
="$QMAKE_CONFIG shared dll"
5941 elif [ "$CFG_SHARED" = "no" ]; then
5942 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-static"
5943 QMAKE_CONFIG
="$QMAKE_CONFIG static"
5945 if [ "$PLATFORM_QWS" = "yes" ]; then
5946 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
5947 QMAKE_CONFIG
="$QMAKE_CONFIG embedded"
5948 QT_CONFIG
="$QT_CONFIG embedded"
5949 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5951 QMakeVar
set PRECOMPILED_DIR
".pch/$QMAKE_OUTDIR"
5952 QMakeVar
set OBJECTS_DIR
".obj/$QMAKE_OUTDIR"
5953 QMakeVar
set MOC_DIR
".moc/$QMAKE_OUTDIR"
5954 QMakeVar
set RCC_DIR
".rcc/$QMAKE_OUTDIR"
5955 QMakeVar
set UI_DIR
".uic/$QMAKE_OUTDIR"
5956 if [ "$CFG_LARGEFILE" = "yes" ]; then
5957 QMAKE_CONFIG
="$QMAKE_CONFIG largefile"
5959 if [ "$CFG_STL" = "no" ]; then
5960 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STL"
5962 QMAKE_CONFIG
="$QMAKE_CONFIG stl"
5964 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5965 QMAKE_CONFIG
="$QMAKE_CONFIG GNUmake"
5967 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_exports"
5968 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_relocations"
5969 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG precompile_header"
5970 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5971 QMakeVar add QMAKE_CFLAGS
-g
5972 QMakeVar add QMAKE_CXXFLAGS
-g
5973 QMAKE_CONFIG
="$QMAKE_CONFIG separate_debug_info"
5975 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG mmx"
5976 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG 3dnow"
5977 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse"
5978 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse2"
5979 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG iwmmxt"
5980 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG $CFG_MAC_ARCHS"
5981 if [ "$CFG_IPV6" = "yes" ]; then
5982 QT_CONFIG
="$QT_CONFIG ipv6"
5984 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5985 QT_CONFIG
="$QT_CONFIG clock-gettime"
5987 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5988 QT_CONFIG
="$QT_CONFIG clock-monotonic"
5990 if [ "$CFG_MREMAP" = "yes" ]; then
5991 QT_CONFIG
="$QT_CONFIG mremap"
5993 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5994 QT_CONFIG
="$QT_CONFIG getaddrinfo"
5996 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5997 QT_CONFIG
="$QT_CONFIG ipv6ifname"
5999 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6000 QT_CONFIG
="$QT_CONFIG getifaddrs"
6002 if [ "$CFG_INOTIFY" = "yes" ]; then
6003 QT_CONFIG
="$QT_CONFIG inotify"
6005 if [ "$CFG_LIBJPEG" = "no" ]; then
6007 elif [ "$CFG_LIBJPEG" = "system" ]; then
6008 QT_CONFIG
="$QT_CONFIG system-jpeg"
6010 if [ "$CFG_JPEG" = "no" ]; then
6011 QT_CONFIG
="$QT_CONFIG no-jpeg"
6012 elif [ "$CFG_JPEG" = "yes" ]; then
6013 QT_CONFIG
="$QT_CONFIG jpeg"
6015 if [ "$CFG_LIBMNG" = "no" ]; then
6017 elif [ "$CFG_LIBMNG" = "system" ]; then
6018 QT_CONFIG
="$QT_CONFIG system-mng"
6020 if [ "$CFG_MNG" = "no" ]; then
6021 QT_CONFIG
="$QT_CONFIG no-mng"
6022 elif [ "$CFG_MNG" = "yes" ]; then
6023 QT_CONFIG
="$QT_CONFIG mng"
6025 if [ "$CFG_LIBPNG" = "no" ]; then
6028 if [ "$CFG_LIBPNG" = "system" ]; then
6029 QT_CONFIG
="$QT_CONFIG system-png"
6031 if [ "$CFG_PNG" = "no" ]; then
6032 QT_CONFIG
="$QT_CONFIG no-png"
6033 elif [ "$CFG_PNG" = "yes" ]; then
6034 QT_CONFIG
="$QT_CONFIG png"
6036 if [ "$CFG_GIF" = "no" ]; then
6037 QT_CONFIG
="$QT_CONFIG no-gif"
6038 elif [ "$CFG_GIF" = "yes" ]; then
6039 QT_CONFIG
="$QT_CONFIG gif"
6041 if [ "$CFG_LIBTIFF" = "no" ]; then
6043 elif [ "$CFG_LIBTIFF" = "system" ]; then
6044 QT_CONFIG
="$QT_CONFIG system-tiff"
6046 if [ "$CFG_TIFF" = "no" ]; then
6047 QT_CONFIG
="$QT_CONFIG no-tiff"
6048 elif [ "$CFG_TIFF" = "yes" ]; then
6049 QT_CONFIG
="$QT_CONFIG tiff"
6051 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6052 QT_CONFIG
="$QT_CONFIG no-freetype"
6053 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6054 QT_CONFIG
="$QT_CONFIG system-freetype"
6056 QT_CONFIG
="$QT_CONFIG freetype"
6059 if [ "x$PLATFORM_MAC" = "xyes" ]; then
6060 #On Mac we implicitly link against libz, so we
6061 #never use the 3rdparty stuff.
6062 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB
="system"
6064 if [ "$CFG_ZLIB" = "yes" ]; then
6065 QT_CONFIG
="$QT_CONFIG zlib"
6066 elif [ "$CFG_ZLIB" = "system" ]; then
6067 QT_CONFIG
="$QT_CONFIG system-zlib"
6070 [ "$CFG_NIS" = "yes" ] && QT_CONFIG
="$QT_CONFIG nis"
6071 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG
="$QT_CONFIG cups"
6072 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG
="$QT_CONFIG iconv"
6073 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG
="$QT_CONFIG gnu-libiconv"
6074 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG
="$QT_CONFIG glib"
6075 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG
="$QT_CONFIG gstreamer"
6076 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG
="$QT_CONFIG dbus"
6077 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG
="$QT_CONFIG dbus dbus-linked"
6078 [ "$CFG_NAS" = "system" ] && QT_CONFIG
="$QT_CONFIG nas"
6079 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG
="$QT_CONFIG openssl"
6080 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG
="$QT_CONFIG openssl-linked"
6082 if [ "$PLATFORM_X11" = "yes" ]; then
6083 [ "$CFG_SM" = "yes" ] && QT_CONFIG
="$QT_CONFIG x11sm"
6085 # for some reason, the following libraries are not always built shared,
6086 # so *every* program/lib (including Qt) has to link against them
6087 if [ "$CFG_XSHAPE" = "yes" ]; then
6088 QT_CONFIG
="$QT_CONFIG xshape"
6090 if [ "$CFG_XSYNC" = "yes" ]; then
6091 QT_CONFIG
="$QT_CONFIG xsync"
6093 if [ "$CFG_XINERAMA" = "yes" ]; then
6094 QT_CONFIG
="$QT_CONFIG xinerama"
6095 QMakeVar
set QMAKE_LIBS_X11
'-lXinerama $$QMAKE_LIBS_X11'
6097 if [ "$CFG_XCURSOR" = "yes" ]; then
6098 QT_CONFIG
="$QT_CONFIG xcursor"
6099 QMakeVar
set QMAKE_LIBS_X11
'-lXcursor $$QMAKE_LIBS_X11'
6101 if [ "$CFG_XFIXES" = "yes" ]; then
6102 QT_CONFIG
="$QT_CONFIG xfixes"
6103 QMakeVar
set QMAKE_LIBS_X11
'-lXfixes $$QMAKE_LIBS_X11'
6105 if [ "$CFG_XRANDR" = "yes" ]; then
6106 QT_CONFIG
="$QT_CONFIG xrandr"
6107 if [ "$CFG_XRENDER" != "yes" ]; then
6108 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6109 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr -lXrender $$QMAKE_LIBS_X11'
6111 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr $$QMAKE_LIBS_X11'
6114 if [ "$CFG_XRENDER" = "yes" ]; then
6115 QT_CONFIG
="$QT_CONFIG xrender"
6116 QMakeVar
set QMAKE_LIBS_X11
'-lXrender $$QMAKE_LIBS_X11'
6118 if [ "$CFG_MITSHM" = "yes" ]; then
6119 QT_CONFIG
="$QT_CONFIG mitshm"
6121 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6122 QT_CONFIG
="$QT_CONFIG fontconfig"
6124 if [ "$CFG_XINPUT" = "yes" ]; then
6125 QMakeVar
set QMAKE_LIBS_X11
'-lXi $$QMAKE_LIBS_X11'
6127 if [ "$CFG_XINPUT" = "yes" ]; then
6128 QT_CONFIG
="$QT_CONFIG xinput tablet"
6130 if [ "$CFG_XKB" = "yes" ]; then
6131 QT_CONFIG
="$QT_CONFIG xkb"
6135 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES
"$D_FLAGS"
6136 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS
"$L_FLAGS"
6137 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS
"$l_FLAGS"
6139 if [ "$PLATFORM_MAC" = "yes" ]; then
6140 if [ "$CFG_RPATH" = "yes" ]; then
6141 QMAKE_CONFIG
="$QMAKE_CONFIG absolute_library_soname"
6143 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
6144 if [ -n "$RPATH_FLAGS" ]; then
6146 echo "ERROR: -R cannot be used on this platform as \$QMAKE_RPATH is"
6150 elif [ "$CFG_RPATH" = "yes" ]; then
6151 RPATH_MESSAGE
=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6155 if [ "$CFG_RPATH" = "yes" ]; then
6156 # set the default rpath to the library installation directory
6157 RPATH_FLAGS
="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6159 if [ -n "$RPATH_FLAGS" ]; then
6160 # add the user defined rpaths
6161 QMakeVar add QMAKE_RPATHDIR
"$RPATH_FLAGS"
6165 if [ '!' -z "$I_FLAGS" ]; then
6166 # add the user define include paths
6167 QMakeVar add QMAKE_CFLAGS
"$I_FLAGS"
6168 QMakeVar add QMAKE_CXXFLAGS
"$I_FLAGS"
6171 # turn off exceptions for the compilers that support it
6172 if [ "$PLATFORM_QWS" = "yes" ]; then
6173 COMPILER
=`echo $XPLATFORM | cut -f 3- -d-`
6175 COMPILER
=`echo $PLATFORM | cut -f 2- -d-`
6177 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6181 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6182 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG exceptions"
6185 if [ "$CFG_ALSA" = "yes" ]; then
6186 QT_CONFIG
="$QT_CONFIG alsa"
6190 # Some Qt modules are too advanced in C++ for some old compilers
6191 # Detect here the platforms where they are known to work.
6193 # See Qt documentation for more information on which features are
6194 # supported and on which compilers.
6196 canBuildQtXmlPatterns
="yes"
6197 canBuildWebKit
="$HAVE_STL"
6198 canBuildQtConcurrent
="yes"
6200 # WebKit requires stdint.h
6201 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stdint
"Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
6202 if [ $?
!= "0" ]; then
6206 case "$XPLATFORM" in
6208 # PA-RISC's assembly is too limited
6209 # gcc 3.4 on that platform can't build QtXmlPatterns
6210 # the assembly it generates cannot be compiled
6212 # Check gcc's version
6213 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6217 canBuildQtXmlPatterns
="no"
6221 canBuildQtXmlPatterns
="no"
6225 unsupported
/vxworks-
*-g++*)
6228 unsupported
/vxworks-
*-dcc*)
6230 canBuildQtXmlPatterns
="no"
6233 # Check gcc's version
6234 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6242 canBuildQtXmlPatterns
="no"
6247 # Check the compiler version
6248 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6251 canBuildQtXmlPatterns
="no"
6252 canBuildQtConcurrent
="no"
6256 canBuildQtConcurrent
="no"
6262 canBuildQtXmlPatterns
="no"
6263 canBuildQtConcurrent
="no"
6269 # Get the xlC version
6270 cat > xlcver.c
<<EOF
6274 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6279 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c
>/dev
/null
2>/dev
/null
; then
6280 xlcver
=`./xlcver 2>/dev/null`
6283 if [ "$OPT_VERBOSE" = "yes" ]; then
6284 if [ -n "$xlcver" ]; then
6285 echo Found IBM xlC version
: $xlcver.
6287 echo Could not determine IBM xlC version
, assuming oldest supported.
6294 canBuildQtXmlPatterns
="no"
6295 canBuildQtConcurrent
="no"
6299 canBuildQtConcurrent
="no"
6305 canBuildQtConcurrent
="no"
6309 CFG_CONCURRENT
="yes"
6310 if [ "$canBuildQtConcurrent" = "no" ]; then
6311 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6315 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
6316 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
6319 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
6320 CFG_XMLPATTERNS
="$canBuildQtXmlPatterns"
6321 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
6322 CFG_XMLPATTERNS
="no"
6324 if [ "$CFG_XMLPATTERNS" = "yes" ]; then
6325 QT_CONFIG
="$QT_CONFIG xmlpatterns"
6327 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
6330 if [ "$CFG_MULTIMEDIA" = "no" ]; then
6331 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
6333 QT_CONFIG
="$QT_CONFIG multimedia"
6336 if [ "$CFG_SVG" = "yes" ]; then
6337 QT_CONFIG
="$QT_CONFIG svg"
6339 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SVG"
6342 if [ "$CFG_WEBKIT" = "auto" ]; then
6343 CFG_WEBKIT
="$canBuildWebKit"
6346 if [ "$CFG_WEBKIT" = "yes" ]; then
6347 QT_CONFIG
="$QT_CONFIG webkit"
6348 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
6352 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_WEBKIT"
6355 if [ "$CFG_SCRIPT" = "auto" ]; then
6356 CFG_SCRIPT
="$canBuildWebKit"
6359 if [ "$CFG_SCRIPT" = "yes" ]; then
6360 QT_CONFIG
="$QT_CONFIG script"
6362 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SCRIPT"
6365 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
6366 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
6369 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
6370 CFG_SCRIPTTOOLS
="yes"
6371 elif [ "$CFG_SCRIPT" = "no" ]; then
6372 CFG_SCRIPTTOOLS
="no"
6375 if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
6376 QT_CONFIG
="$QT_CONFIG scripttools"
6378 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
6381 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6384 QMakeVar add QMAKE_CFLAGS
-fno-exceptions
6385 QMakeVar add QMAKE_CXXFLAGS
-fno-exceptions
6386 QMakeVar add QMAKE_LFLAGS
-fno-exceptions
6391 QMakeVar add QMAKE_CFLAGS
-LANG:exceptions
=off
6392 QMakeVar add QMAKE_CXXFLAGS
-LANG:exceptions
=off
6393 QMakeVar add QMAKE_LFLAGS
-LANG:exceptions
=off
6400 QMAKE_CONFIG
="$QMAKE_CONFIG exceptions_off"
6403 # On Mac, set the minimum deployment target for the different architechtures
6404 # using the Xarch compiler option when supported (10.5 and up). On 10.4 the
6405 # deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
6406 # env. variable. "-cocoa" on the command line means Cocoa is used in 32-bit mode also,
6407 # in this case fall back on QMAKE_MACOSX_DEPLOYMENT_TARGET which will be set to 10.5.
6408 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] && [ "$COMMANDLINE_MAC_COCOA" != "yes" ]; then
6409 if echo "$CFG_MAC_ARCHS" |
grep '\<x86\>' > /dev
/null
2>&1; then
6410 QMakeVar add QMAKE_CFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6411 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6412 QMakeVar add QMAKE_LFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6413 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86
"-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
6415 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc\>' > /dev
/null
2>&1; then
6416 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc -mmacosx-version-min=10.4"
6417 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc -mmacosx-version-min=10.4"
6418 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc -mmacosx-version-min=10.4"
6419 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC
"-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
6421 if echo "$CFG_MAC_ARCHS" |
grep '\<x86_64\>' > /dev
/null
2>&1; then
6422 QMakeVar add QMAKE_CFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6423 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6424 QMakeVar add QMAKE_LFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6425 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64
"-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
6427 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc64\>' > /dev
/null
2>&1; then
6428 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6429 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6430 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6431 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64
"-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
6435 #-------------------------------------------------------------------------------
6436 # generate QT_BUILD_KEY
6437 #-------------------------------------------------------------------------------
6439 # some compilers generate binary incompatible code between different versions,
6440 # so we need to generate a build key that is different between these compilers
6444 COMPILER_VERSION
=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6446 case "$COMPILER_VERSION" in
6448 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6449 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6450 QT_GCC_PATCH_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6453 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6454 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6455 QT_GCC_PATCH_VERSION
=0
6459 case "$COMPILER_VERSION" in
6461 COMPILER_VERSION
="2.95.*"
6464 COMPILER_VERSION
="3.*"
6467 COMPILER_VERSION
="4"
6472 [ '!' -z "$COMPILER_VERSION" ] && COMPILER
="g++-${COMPILER_VERSION}"
6479 # QT_CONFIG can contain the following:
6481 # Things that affect the Qt API/ABI:
6484 # minimal-config small-config medium-config large-config full-config
6486 # Different edition modules:
6487 # network canvas table xml opengl sql
6489 # Things that do not affect the Qt API/ABI:
6491 # system-jpeg no-jpeg jpeg
6492 # system-mng no-mng mng
6493 # system-png no-png png
6494 # system-zlib no-zlib zlib
6495 # system-libtiff no-libtiff
6508 # X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb
6509 # Embedded: embedded freetype
6515 # determine the build options
6516 for config_option
in $QMAKE_CONFIG $QT_CONFIG; do
6518 case "$config_option" in
6520 # take the last *-config setting. this is the highest config being used,
6521 # and is the one that we will use for tagging plugins
6522 BUILD_CONFIG
="$config_option"
6525 *) # skip all other options since they don't affect the Qt API/ABI.
6529 if [ "$SKIP" = "no" ]; then
6530 BUILD_OPTIONS
="$BUILD_OPTIONS $config_option"
6534 # put the options that we are missing into .options
6536 for opt
in `echo $ALL_OPTIONS`; do
6538 if echo $BUILD_OPTIONS |
grep $opt >/dev
/null
2>&1; then
6541 if [ "$SKIP" = "no" ]; then
6542 echo "$opt" >> .options
6546 # reconstruct BUILD_OPTIONS with a sorted negative feature list
6547 # (ie. only things that are missing are will be put into the build key)
6549 if [ -f .options
]; then
6550 for opt
in `sort -f .options | uniq`; do
6551 BUILD_OPTIONS
="$BUILD_OPTIONS no-$opt"
6556 # QT_NO* defines affect the Qt API (and binary compatibility). they need
6557 # to be included in the build key
6558 for build_option
in $D_FLAGS; do
6559 build_option
=`echo $build_option | cut -d \" -f 2 -`
6560 case "$build_option" in
6562 echo "$build_option" >> .options
6565 # skip all other compiler defines
6570 # sort the compile time defines (helps ensure that changes in this configure
6571 # script don't affect the QT_BUILD_KEY generation)
6572 if [ -f .options
]; then
6573 for opt
in `sort -f .options | uniq`; do
6574 BUILD_OPTIONS
="$BUILD_OPTIONS $opt"
6579 BUILD_OPTIONS
="$BUILD_CONFIG $BUILD_OPTIONS"
6580 # extract the operating system from the XPLATFORM
6581 TARGET_OPERATING_SYSTEM
=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
6583 # when cross-compiling, don't include build-host information (build key is target specific)
6584 QT_BUILD_KEY
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6585 if [ -n "$QT_NAMESPACE" ]; then
6586 QT_BUILD_KEY
="$QT_BUILD_KEY $QT_NAMESPACE"
6588 MAC_NEED_TWO_BUILD_KEYS
="no"
6589 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
6590 QT_BUILD_KEY_CARBON
=$QT_BUILD_KEY
6591 TARGET_OPERATING_SYSTEM
="$TARGET_OPERATING_SYSTEM-cocoa"
6592 QT_BUILD_KEY_COCOA
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6593 if [ "$CFG_MAC_CARBON" = "no" ]; then
6594 QT_BUILD_KEY
=$QT_BUILD_KEY_COCOA
6596 MAC_NEED_TWO_BUILD_KEYS
="yes"
6599 # don't break loading plugins build with an older version of Qt
6600 QT_BUILD_KEY_COMPAT
=
6601 if [ "$QT_CROSS_COMPILE" = "no" ]; then
6602 # previous versions of Qt used a build key built from the uname
6603 QT_BUILD_KEY_COMPAT
="$CFG_USER_BUILD_KEY $UNAME_MACHINE $UNAME_SYSTEM $COMPILER $BUILD_OPTIONS"
6604 if [ -n "$QT_NAMESPACE" ]; then
6605 QT_BUILD_KEY_COMPAT
="$QT_BUILD_KEY_COMPAT $QT_NAMESPACE"
6608 # strip out leading/trailing/extra whitespace
6609 QT_BUILD_KEY
=`echo $QT_BUILD_KEY | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6610 QT_BUILD_KEY_COMPAT
=`echo $QT_BUILD_KEY_COMPAT | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6612 #-------------------------------------------------------------------------------
6613 # part of configuration information goes into qconfig.h
6614 #-------------------------------------------------------------------------------
6616 case "$CFG_QCONFIG" in
6618 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6621 tmpconfig
="$outpath/src/corelib/global/qconfig.h.new"
6622 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6623 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6624 echo "#endif" >>"$tmpconfig"
6628 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6632 # define QT_EDITION $QT_EDITION
6635 /* Machine byte-order */
6636 #define Q_BIG_ENDIAN 4321
6637 #define Q_LITTLE_ENDIAN 1234
6640 if [ "$MAC_NEED_TWO_BUILD_KEYS" = "no" ]; then
6641 echo "#define QT_BUILD_KEY \"$QT_BUILD_KEY\"" \
6642 >> "$outpath/src/corelib/global/qconfig.h.new"
6644 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6646 #define QT_BUILD_KEY_CARBON "$QT_BUILD_KEY_CARBON"
6647 #define QT_BUILD_KEY_COCOA "$QT_BUILD_KEY_COCOA"
6651 if [ -n "$QT_BUILD_KEY_COMPAT" ]; then
6652 echo "#define QT_BUILD_KEY_COMPAT \"$QT_BUILD_KEY_COMPAT\"" \
6653 >> "$outpath/src/corelib/global/qconfig.h.new"
6655 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6657 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6658 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6659 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6660 #if defined(__BIG_ENDIAN__)
6661 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6662 #elif defined(__LITTLE_ENDIAN__)
6663 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6665 # error "Unable to determine byte order!"
6669 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6671 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6672 if [ "$CFG_ENDIAN" = "auto" ]; then
6673 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6674 #if defined(__BIG_ENDIAN__)
6675 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6676 #elif defined(__LITTLE_ENDIAN__)
6677 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6679 # error "Unable to determine byte order!"
6683 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6685 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6687 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6688 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6689 /* Non-IEEE double format */
6690 #define Q_DOUBLE_LITTLE "01234567"
6691 #define Q_DOUBLE_BIG "76543210"
6692 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6693 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6694 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6697 if [ "$CFG_ARMFPA" = "yes" ]; then
6698 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6699 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6700 #ifndef QT_BOOTSTRAPPED
6705 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6709 CFG_ARCH_STR
=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6710 CFG_HOST_ARCH_STR
=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6711 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6712 /* Machine Architecture */
6713 #ifndef QT_BOOTSTRAPPED
6714 # define QT_ARCH_${CFG_ARCH_STR}
6716 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6720 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6721 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6723 if [ "$CFG_LARGEFILE" = "yes" ]; then
6724 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6727 # if both carbon and cocoa are specified, enable the autodetection code.
6728 if [ "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
6729 echo "#define AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6730 elif [ "$CFG_MAC_COCOA" = "yes" ]; then
6731 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6734 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6735 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6738 if [ "$PLATFORM_MAC" = "yes" ]; then
6739 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6740 #if defined(__LP64__)
6741 # define QT_POINTER_SIZE 8
6743 # define QT_POINTER_SIZE 4
6747 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6748 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6752 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6754 if [ "$CFG_DEV" = "yes" ]; then
6755 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6758 # Embedded compile time options
6759 if [ "$PLATFORM_QWS" = "yes" ]; then
6760 # Add QWS to config.h
6761 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_WS_QWS"
6763 # Add excluded decorations to $QCONFIG_FLAGS
6764 decors
=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
6765 for decor
in $decors; do
6766 NODECORATION
=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6767 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
6770 # Figure which embedded drivers which are turned off
6771 CFG_GFX_OFF
="$CFG_GFX_AVAILABLE"
6772 for ADRIVER
in $CFG_GFX_ON; do
6773 CFG_GFX_OFF
=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
6776 CFG_KBD_OFF
="$CFG_KBD_AVAILABLE"
6777 # the um driver is currently not in the available list for external builds
6778 if [ "$CFG_DEV" = "no" ]; then
6779 CFG_KBD_OFF
="$CFG_KBD_OFF um"
6781 for ADRIVER
in $CFG_KBD_ON; do
6782 CFG_KBD_OFF
=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
6785 CFG_MOUSE_OFF
="$CFG_MOUSE_AVAILABLE"
6786 for ADRIVER
in $CFG_MOUSE_ON; do
6787 CFG_MOUSE_OFF
=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
6790 for DRIVER
in $CFG_GFX_OFF; do
6791 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6792 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
6795 for DRIVER
in $CFG_KBD_OFF; do
6796 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6797 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
6800 for DRIVER
in $CFG_MOUSE_OFF; do
6801 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6802 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
6806 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6807 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6810 # Add turned on SQL drivers
6811 for DRIVER
in $CFG_SQL_AVAILABLE; do
6812 eval "VAL=\$CFG_SQL_$DRIVER"
6815 ONDRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6816 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6817 SQL_DRIVERS
="$SQL_DRIVERS $DRIVER"
6820 SQL_PLUGINS
="$SQL_PLUGINS $DRIVER"
6826 QMakeVar
set sql-drivers
"$SQL_DRIVERS"
6827 QMakeVar
set sql-plugins
"$SQL_PLUGINS"
6829 # Add other configuration options to the qconfig.h file
6830 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6831 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
6832 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6833 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6834 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
6835 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ZLIB"
6836 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6837 [ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6"
6838 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SXE"
6839 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_DBUS"
6841 if [ "$PLATFORM_QWS" != "yes" ]; then
6842 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
6843 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
6844 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
6847 # X11/Unix/Mac only configs
6848 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CUPS"
6849 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ICONV"
6850 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GLIB"
6851 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6852 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6853 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6854 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MREMAP"
6855 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6856 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6857 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6858 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_INOTIFY"
6859 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NAS"
6860 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NIS"
6861 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENSSL"
6862 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6864 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6865 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XCURSOR"
6866 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XFIXES"
6867 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6868 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINERAMA"
6869 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XKB"
6870 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRANDR"
6871 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRENDER"
6872 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MITSHM"
6873 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SHAPE"
6874 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XSYNC"
6875 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6877 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6878 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6879 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6880 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6881 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6882 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ALSA"
6884 # sort QCONFIG_FLAGS for neatness if we can
6885 [ '!' -z "$AWK" ] && QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6886 QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS`
6888 if [ -n "$QCONFIG_FLAGS" ]; then
6889 for cfg
in $QCONFIG_FLAGS; do
6890 cfgd
=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6891 cfg
=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6892 # figure out define logic, so we can output the correct
6893 # ifdefs to override the global defines in a project
6895 if [ true
] && echo "$cfgd" |
grep 'QT_NO_' >/dev
/null
2>&1; then
6896 # QT_NO_option can be forcefully turned on by QT_option
6897 cfgdNeg
=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6898 elif [ true
] && echo "$cfgd" |
grep 'QT_' >/dev
/null
2>&1; then
6899 # QT_option can be forcefully turned off by QT_NO_option
6900 cfgdNeg
=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6903 if [ -z $cfgdNeg ]; then
6904 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6911 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6912 #if defined($cfgd) && defined($cfgdNeg)
6914 #elif !defined($cfgd) && !defined($cfgdNeg)
6923 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6924 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6925 #define QT_VISIBILITY_AVAILABLE
6930 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6931 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6932 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6934 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w
"$outpath/src/corelib/global/qconfig.h"
6935 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6936 chmod -w "$outpath/src/corelib/global/qconfig.h"
6937 for conf
in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
6938 if [ '!' -f "$conf" ]; then
6939 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
6944 #-------------------------------------------------------------------------------
6945 # save configuration into qconfig.pri
6946 #-------------------------------------------------------------------------------
6948 QTCONFIG
="$outpath/mkspecs/qconfig.pri"
6949 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG no_mocdepend"
6950 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6951 if [ "$CFG_DEBUG" = "yes" ]; then
6952 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG debug"
6953 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6954 QT_CONFIG
="$QT_CONFIG release"
6956 QT_CONFIG
="$QT_CONFIG debug"
6957 elif [ "$CFG_DEBUG" = "no" ]; then
6958 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG release"
6959 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6960 QT_CONFIG
="$QT_CONFIG debug"
6962 QT_CONFIG
="$QT_CONFIG release"
6964 if [ "$CFG_STL" = "yes" ]; then
6965 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG stl"
6967 if [ "$CFG_FRAMEWORK" = "no" ]; then
6968 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_no_framework"
6970 QT_CONFIG
="$QT_CONFIG qt_framework"
6971 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_framework"
6973 if [ "$PLATFORM_MAC" = "yes" ]; then
6974 QT_CONFIG
="$QT_CONFIG $CFG_MAC_ARCHS"
6976 if [ "$CFG_DEV" = "yes" ]; then
6977 QT_CONFIG
="$QT_CONFIG private_tests"
6980 # Make the application arch follow the Qt arch for single arch builds.
6981 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
6982 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
6983 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
6986 cat >>"$QTCONFIG.tmp" <<EOF
6988 CONFIG += $QTCONFIG_CONFIG
6990 QT_EDITION = $Edition
6991 QT_CONFIG += $QT_CONFIG
6994 QT_VERSION = $QT_VERSION
6995 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6996 QT_MINOR_VERSION = $QT_MINOR_VERSION
6997 QT_PATCH_VERSION = $QT_PATCH_VERSION
7000 QT_LIBINFIX = $QT_LIBINFIX
7001 QT_NAMESPACE = $QT_NAMESPACE
7002 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7005 if [ "$CFG_RPATH" = "yes" ]; then
7006 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7008 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7009 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7010 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7011 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7013 # replace qconfig.pri if it differs from the newly created temp file
7014 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7015 rm -f "$QTCONFIG.tmp"
7017 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7020 #-------------------------------------------------------------------------------
7021 # save configuration into .qmake.cache
7022 #-------------------------------------------------------------------------------
7024 CACHEFILE
="$outpath/.qmake.cache"
7025 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7026 cat >>"$CACHEFILE.tmp" <<EOF
7027 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
7028 QT_SOURCE_TREE = \$\$quote($relpath)
7029 QT_BUILD_TREE = \$\$quote($outpath)
7030 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7031 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7032 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7034 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7035 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7036 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7037 QMAKE_UIC3 = \$\$QT_BUILD_TREE/bin/uic3
7038 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7039 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
7040 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7041 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7045 # Ensure we can link to uninistalled libraries
7046 if linkerSupportsFlag
-rpath-link "$outpath/lib"; then
7047 echo "QMAKE_LFLAGS += -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp"
7050 if [ -n "$QT_CFLAGS_PSQL" ]; then
7051 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp"
7053 if [ -n "$QT_LFLAGS_PSQL" ]; then
7054 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$CACHEFILE.tmp"
7056 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7057 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7059 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7060 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7062 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7063 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7065 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7066 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7068 if [ -n "$QT_LFLAGS_ODBC" ]; then
7069 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$CACHEFILE.tmp"
7072 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7073 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
7076 #dump in the OPENSSL_LIBS info
7077 if [ '!' -z "$OPENSSL_LIBS" ]; then
7078 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp"
7079 elif [ "$CFG_OPENSSL" = "linked" ]; then
7080 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$CACHEFILE.tmp"
7083 #dump in the SDK info
7084 if [ '!' -z "$CFG_SDK" ]; then
7085 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$CACHEFILE.tmp"
7088 # mac gcc -Xarch support
7089 if [ "$CFG_MAC_XARCH" = "no" ]; then
7090 echo "QMAKE_MAC_XARCH = no" >> "$CACHEFILE.tmp"
7093 #dump the qmake spec
7094 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7095 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7097 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7101 cat "$QMAKE_VARS_FILE" >> "$CACHEFILE.tmp"
7102 rm -f "$QMAKE_VARS_FILE" 2>/dev
/null
7106 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4
>/dev
/null
2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL
="yes"
7107 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7108 find "$relpath" -perm u
+w
-mtime -3 |
grep 'cpp$' |
while read f
; do
7109 # don't need to worry about generated files
7110 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7111 basename "$f" |
grep '^moc_' >/dev
/null
2>&1 && continue
7113 INCREMENTAL
="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7115 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7116 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7119 # replace .qmake.cache if it differs from the newly created temp file
7120 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7121 rm -f "$CACHEFILE.tmp"
7123 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7126 #-------------------------------------------------------------------------------
7127 # give feedback on configuration
7128 #-------------------------------------------------------------------------------
7132 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7135 This target is using the GNU C++ compiler ($PLATFORM).
7137 Recent versions of this compiler automatically include code for
7138 exceptions, which increase both the size of the Qt libraries and
7139 the amount of memory taken by your applications.
7141 You may choose to re-run `basename $0` with the -no-exceptions
7142 option to compile Qt without exceptions. This is completely binary
7143 compatible, and existing applications will continue to work.
7151 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7154 This target is using the MIPSpro C++ compiler ($PLATFORM).
7156 You may choose to re-run `basename $0` with the -no-exceptions
7157 option to compile Qt without exceptions. This will make the
7158 size of the Qt library smaller and reduce the amount of memory
7159 taken by your applications.
7170 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" == "yes" ]; then
7172 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
7173 in debug mode will run out of memory on systems with 2GB or less.
7174 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
7175 -no-webkit or -release to skip webkit debug.
7180 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7181 echo "Build type: $PLATFORM"
7183 echo "Building on: $PLATFORM"
7184 echo "Building for: $XPLATFORM"
7187 if [ "$PLATFORM_MAC" = "yes" ]; then
7188 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7190 echo "Architecture: $CFG_ARCH"
7193 if [ "$PLATFORM_QWS" = "yes" ]; then
7194 echo "Host architecture: $CFG_HOST_ARCH"
7197 if [ "$PLATFORM_MAC" = "yes" ]; then
7198 if [ "$CFG_MAC_COCOA" = "yes" ]; then
7199 if [ "$CFG_MAC_CARBON" = "yes" ]; then
7200 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
7202 echo "Using framework: Cocoa"
7205 echo "Using framework: Carbon"
7209 if [ -n "$PLATFORM_NOTES" ]; then
7210 echo "Platform notes:"
7211 echo "$PLATFORM_NOTES"
7216 if [ "$OPT_VERBOSE" = "yes" ]; then
7217 if echo '\c' |
grep '\c' >/dev
/null
; then
7218 echo -n "qmake vars .......... "
7220 echo "qmake vars .......... \c"
7222 cat "$QMAKE_VARS_FILE" |
tr '\n' ' '
7223 echo "qmake switches ...... $QMAKE_SWITCHES"
7226 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ......... $INCREMENTAL"
7227 echo "Build ............... $CFG_BUILD_PARTS"
7228 echo "Configuration ....... $QMAKE_CONFIG $QT_CONFIG"
7229 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7230 echo "Debug ............... yes (combined)"
7231 if [ "$CFG_DEBUG" = "yes" ]; then
7232 echo "Default Link ........ debug"
7234 echo "Default Link ........ release"
7237 echo "Debug ............... $CFG_DEBUG"
7239 echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
7240 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
7241 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
7242 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
7243 echo "QtConcurrent code.... $CFG_CONCURRENT"
7244 echo "QtScript module ..... $CFG_SCRIPT"
7245 echo "QtScriptTools module $CFG_SCRIPTTOOLS"
7246 echo "QtXmlPatterns module $CFG_XMLPATTERNS"
7247 echo "Phonon module ....... $CFG_PHONON"
7248 echo "Multimedia module ... $CFG_MULTIMEDIA"
7249 echo "SVG module .......... $CFG_SVG"
7250 echo "WebKit module ....... $CFG_WEBKIT"
7251 echo "STL support ......... $CFG_STL"
7252 echo "PCH support ......... $CFG_PRECOMPILE"
7253 echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
7254 if [ "${CFG_ARCH}" = "arm" ]; then
7255 echo "iWMMXt support ...... ${CFG_IWMMXT}"
7257 [ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
7258 echo "IPv6 support ........ $CFG_IPV6"
7259 echo "IPv6 ifname support . $CFG_IPV6IFNAME"
7260 echo "getaddrinfo support . $CFG_GETADDRINFO"
7261 echo "getifaddrs support .. $CFG_GETIFADDRS"
7262 echo "Accessibility ....... $CFG_ACCESSIBILITY"
7263 echo "NIS support ......... $CFG_NIS"
7264 echo "CUPS support ........ $CFG_CUPS"
7265 echo "Iconv support ....... $CFG_ICONV"
7266 echo "Glib support ........ $CFG_GLIB"
7267 echo "GStreamer support ... $CFG_GSTREAMER"
7268 echo "Large File support .. $CFG_LARGEFILE"
7269 echo "GIF support ......... $CFG_GIF"
7270 if [ "$CFG_TIFF" = "no" ]; then
7271 echo "TIFF support ........ $CFG_TIFF"
7273 echo "TIFF support ........ $CFG_TIFF ($CFG_LIBTIFF)"
7275 if [ "$CFG_JPEG" = "no" ]; then
7276 echo "JPEG support ........ $CFG_JPEG"
7278 echo "JPEG support ........ $CFG_JPEG ($CFG_LIBJPEG)"
7280 if [ "$CFG_PNG" = "no" ]; then
7281 echo "PNG support ......... $CFG_PNG"
7283 echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
7285 if [ "$CFG_MNG" = "no" ]; then
7286 echo "MNG support ......... $CFG_MNG"
7288 echo "MNG support ......... $CFG_MNG ($CFG_LIBMNG)"
7290 echo "zlib support ........ $CFG_ZLIB"
7291 echo "Session management .. $CFG_SM"
7292 if [ "$PLATFORM_QWS" = "yes" ]; then
7293 echo "Embedded support .... $CFG_EMBEDDED"
7294 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
7295 echo "Freetype2 support ... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
7297 echo "Freetype2 support ... $CFG_QWS_FREETYPE"
7299 # Normalize the decoration output first
7300 CFG_GFX_ON
=`echo ${CFG_GFX_ON}`
7301 CFG_GFX_PLUGIN
=`echo ${CFG_GFX_PLUGIN}`
7302 echo "Graphics (qt) ....... ${CFG_GFX_ON}"
7303 echo "Graphics (plugin) ... ${CFG_GFX_PLUGIN}"
7304 CFG_DECORATION_ON
=`echo ${CFG_DECORATION_ON}`
7305 CFG_DECORATION_PLUGIN
=`echo ${CFG_DECORATION_PLUGIN}`
7306 echo "Decorations (qt) .... $CFG_DECORATION_ON"
7307 echo "Decorations (plugin) $CFG_DECORATION_PLUGIN"
7308 CFG_KBD_ON
=`echo ${CFG_KBD_ON}`
7309 CFG_KBD_PLUGIN
=`echo ${CFG_KBD_PLUGIN}`
7310 echo "Keyboard driver (qt). ${CFG_KBD_ON}"
7311 echo "Keyboard driver (plugin) ${CFG_KBD_PLUGIN}"
7312 CFG_MOUSE_ON
=`echo ${CFG_MOUSE_ON}`
7313 CFG_MOUSE_PLUGIN
=`echo ${CFG_MOUSE_PLUGIN}`
7314 echo "Mouse driver (qt) ... $CFG_MOUSE_ON"
7315 echo "Mouse driver (plugin) $CFG_MOUSE_PLUGIN"
7317 if [ "$CFG_OPENGL" = "desktop" ]; then
7318 echo "OpenGL support ...... yes (Desktop OpenGL)"
7319 elif [ "$CFG_OPENGL" = "es1" ]; then
7320 echo "OpenGL support ...... yes (OpenGL ES 1.x Common profile)"
7321 elif [ "$CFG_OPENGL" = "es1cl" ]; then
7322 echo "OpenGL support ...... yes (OpenGL ES 1.x Common Lite profile)"
7323 elif [ "$CFG_OPENGL" = "es2" ]; then
7324 echo "OpenGL support ...... yes (OpenGL ES 2.x)"
7326 echo "OpenGL support ...... no"
7328 if [ "$CFG_EGL" != "no" ]; then
7329 if [ "$CFG_EGL_GLES_INCLUDES" != "no" ]; then
7330 echo "EGL support ......... yes <GLES/egl.h>"
7332 echo "EGL support ......... yes <EGL/egl.h>"
7335 if [ "$CFG_OPENVG" ]; then
7336 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7337 echo "OpenVG support ...... ShivaVG"
7339 echo "OpenVG support ...... $CFG_OPENVG"
7342 if [ "$PLATFORM_X11" = "yes" ]; then
7343 echo "NAS sound support ... $CFG_NAS"
7344 echo "XShape support ...... $CFG_XSHAPE"
7345 echo "XSync support ....... $CFG_XSYNC"
7346 echo "Xinerama support .... $CFG_XINERAMA"
7347 echo "Xcursor support ..... $CFG_XCURSOR"
7348 echo "Xfixes support ...... $CFG_XFIXES"
7349 echo "Xrandr support ...... $CFG_XRANDR"
7350 echo "Xrender support ..... $CFG_XRENDER"
7351 echo "Xi support .......... $CFG_XINPUT"
7352 echo "MIT-SHM support ..... $CFG_MITSHM"
7353 echo "FontConfig support .. $CFG_FONTCONFIG"
7354 echo "XKB Support ......... $CFG_XKB"
7355 echo "immodule support .... $CFG_IM"
7356 echo "GTK theme support ... $CFG_QGTKSTYLE"
7358 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support ....... $CFG_SQL_mysql"
7359 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support .. $CFG_SQL_psql"
7360 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........ $CFG_SQL_odbc"
7361 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ......... $CFG_SQL_oci"
7362 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ......... $CFG_SQL_tds"
7363 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ......... $CFG_SQL_db2"
7364 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ... $CFG_SQL_ibase"
7365 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support .... $CFG_SQL_sqlite2"
7366 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ...... $CFG_SQL_sqlite ($CFG_SQLITE)"
7369 if [ "$CFG_OPENSSL" = "yes" ]; then
7370 OPENSSL_LINKAGE
="(run-time)"
7371 elif [ "$CFG_OPENSSL" = "linked" ]; then
7372 OPENSSL_LINKAGE
="(linked)"
7374 echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
7376 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
7378 # complain about not being able to use dynamic plugins if we are using a static build
7379 if [ "$CFG_SHARED" = "no" ]; then
7381 echo "WARNING: Using static linking will disable the use of dynamically"
7382 echo "loaded plugins. Make sure to import all needed static plugins,"
7383 echo "or compile needed modules into the library."
7386 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7388 echo "NOTE: When linking against OpenSSL, you can override the default"
7389 echo "library names through OPENSSL_LIBS."
7391 echo " ./configure -openssl-linked OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto'"
7394 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7396 echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
7399 echo "alsa support ........ $CFG_ALSA"
7402 sepath
=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7407 #-------------------------------------------------------------------------------
7408 # build makefiles based on the configuration
7409 #-------------------------------------------------------------------------------
7411 echo "Finding project files. Please wait..."
7412 "$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
7413 if [ -f "${relpath}/projects.pro" ]; then
7414 mkfile
="${outpath}/Makefile"
7415 [ -f "$mkfile" ] && chmod +w
"$mkfile"
7416 QTDIR
="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro" -o "$mkfile"
7419 # .projects -> projects to process
7420 # .projects.1 -> qt and moc
7421 # .projects.2 -> subdirs and libs
7422 # .projects.3 -> the rest
7423 rm -f .projects .projects
.1 .projects
.2 .projects
.3
7425 QMAKE_PROJECTS
=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7426 if [ -z "$AWK" ]; then
7427 for p
in `echo $QMAKE_PROJECTS`; do
7428 echo "$p" >> .projects
7431 cat >projects.
awk <<EOF
7437 first = "./.projects.1.tmp"
7438 second = "./.projects.2.tmp"
7439 third = "./.projects.3.tmp"
7444 if ( ! target_file )
7446 print input_file >target_file
7451 input_file = FILENAME
7456 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7462 matched_target == 0 && /^(TEMPLATE.*=)/ {
7463 if ( \$3 == "subdirs" )
7464 target_file = second
7465 else if ( \$3 == "lib" )
7471 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7472 if ( \$0 ~ /plugin/ )
7475 target_file = second
7480 if ( ! target_file )
7482 print input_file >>target_file
7489 for p
in `echo $QMAKE_PROJECTS`; do
7490 echo "$p" >> .projects.all
7493 # if you get errors about the length of the command line to awk, change the -l arg
7495 split -l 100 .projects.all .projects.all.
7496 for p
in .projects.all.
*; do
7497 "$AWK" -f projects.
awk `cat $p`
7498 [ -f .projects
.1.tmp
] && cat .projects
.1.tmp
>> .projects
.1
7499 [ -f .projects
.2.tmp
] && cat .projects
.2.tmp
>> .projects
.2
7500 [ -f .projects
.3.tmp
] && cat .projects
.3.tmp
>> .projects
.3
7501 rm -f .projects
.1.tmp .projects
.2.tmp .projects
.3.tmp
$p
7503 rm -f .projects.all
* projects.
awk
7505 [ -f .projects
.1 ] && cat .projects
.1 >>.projects
7506 [ -f .projects
.2 ] && cat .projects
.2 >>.projects
7507 rm -f .projects
.1 .projects
.2
7508 if [ -f .projects
.3 ] && [ "$OPT_FAST" = "no" ]; then
7509 cat .projects
.3 >>.projects
7513 # don't sort Qt and MOC in with the other project files
7514 # also work around a segfaulting uniq(1)
7515 if [ -f .sorted.projects
.2 ]; then
7516 sort .sorted.projects
.2 > .sorted.projects
.2.new
7517 mv -f .sorted.projects
.2.new .sorted.projects
.2
7518 cat .sorted.projects
.2 >> .sorted.projects
.1
7520 [ -f .sorted.projects
.1 ] && sort .sorted.projects
.1 >> .sorted.projects
7521 rm -f .sorted.projects
.2 .sorted.projects
.1
7525 if [ -f .projects
]; then
7526 uniq .projects
>.tmp
7527 mv -f .tmp .projects
7528 NORM_PROJECTS
=`cat .projects | wc -l | sed -e "s, ,,g"`
7530 if [ -f .projects
.3 ]; then
7531 uniq .projects
.3 >.tmp
7532 mv -f .tmp .projects
.3
7533 FAST_PROJECTS
=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7535 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7539 for part
in $CFG_BUILD_PARTS; do
7541 tools
) PART_ROOTS
="$PART_ROOTS tools" ;;
7542 libs
) PART_ROOTS
="$PART_ROOTS src" ;;
7543 examples
) PART_ROOTS
="$PART_ROOTS examples demos" ;;
7548 if [ "$CFG_DEV" = "yes" ]; then
7549 PART_ROOTS
="$PART_ROOTS tests"
7552 echo "Creating makefiles. Please wait..."
7553 for file in .projects .projects
.3; do
7554 [ '!' -f "$file" ] && continue
7555 for a
in `cat $file`; do
7557 for r
in $PART_ROOTS; do
7558 if echo "$a" |
grep "^$r" >/dev
/null
2>&1 ||
echo "$a" |
grep "^$relpath/$r" >/dev
/null
2>&1; then
7563 [ "$IN_ROOT" = "no" ] && continue
7566 *winmain
/winmain.pro
) continue ;;
7567 *s60main
/s60main.pro
) continue ;;
7568 */qmake
/qmake.pro
) continue ;;
7569 *tools
/bootstrap
*|
*tools
/moc
*|
*tools
/rcc
*|
*tools
/uic
*) SPEC
=$QMAKESPEC ;;
7570 *) SPEC
=$XQMAKESPEC ;;
7572 dir
=`dirname "$a" | sed -e "s;$sepath;.;g"`
7573 test -d "$dir" || mkdir
-p "$dir"
7574 OUTDIR
="$outpath/$dir"
7575 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7576 # fast configure - the makefile exists, skip it
7577 # since the makefile exists, it was generated by qmake, which means we
7578 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7580 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7583 QMAKE_SPEC_ARGS
="-spec $SPEC"
7584 if echo '\c' |
grep '\c' >/dev
/null
; then
7590 QMAKE
="$outpath/bin/qmake"
7591 QMAKE_ARGS
="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7592 if [ "$file" = ".projects.3" ]; then
7593 if echo '\c' |
grep '\c' >/dev
/null
; then
7600 cat >"${OUTDIR}/Makefile" <<EOF
7601 # ${OUTDIR}/Makefile: generated by configure
7603 # WARNING: This makefile will be replaced with a real makefile.
7604 # All changes made to this file will be lost.
7606 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7608 cat >>"${OUTDIR}/Makefile" <<EOF
7610 all clean install qmake first Makefile: FORCE
7611 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7619 if [ "$OPT_VERBOSE" = "yes" ]; then
7620 echo " (`basename $SPEC`)"
7621 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7626 [ -f "${OUTDIR}/Makefile" ] && chmod +w
"${OUTDIR}/Makefile"
7627 QTDIR
="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7631 rm -f .projects .projects
.3
7633 #-------------------------------------------------------------------------------
7634 # XShape is important, DnD in the Designer doens't work without it
7635 #-------------------------------------------------------------------------------
7636 if [ "$PLATFORM_X11" = "yes" ] && [ "$CFG_XSHAPE" = "no" ]; then
7639 NOTICE: Qt will not be built with XShape support.
7641 As a result, drag-and-drop in the Qt Designer will NOT
7642 work. We recommend that you enable XShape support by passing
7643 the -xshape switch to $0.
7647 #-------------------------------------------------------------------------------
7648 # check for platforms that we don't yet know about
7649 #-------------------------------------------------------------------------------
7650 if [ "$CFG_ARCH" = "generic" ]; then
7653 NOTICE: Atomic operations are not yet supported for this
7656 Qt will use the 'generic' architecture instead, which uses a
7657 single pthread_mutex_t to protect all atomic operations. This
7658 implementation is the slow (but safe) fallback implementation
7659 for architectures Qt does not yet support.
7663 #-------------------------------------------------------------------------------
7664 # check if the user passed the -no-zlib option, which is no longer supported
7665 #-------------------------------------------------------------------------------
7666 if [ -n "$ZLIB_FORCED" ]; then
7667 which_zlib
="supplied"
7668 if [ "$CFG_ZLIB" = "system" ]; then
7674 NOTICE: The -no-zlib option was supplied but is no longer
7677 Qt now requires zlib support in all builds, so the -no-zlib
7678 option was ignored. Qt will be built using the $which_zlib
7683 #-------------------------------------------------------------------------------
7684 # finally save the executed command to another script
7685 #-------------------------------------------------------------------------------
7686 if [ `basename $0` != "config.status" ]; then
7687 CONFIG_STATUS
="$relpath/$relconf $OPT_CMDLINE"
7689 # add the system variables
7690 for varname
in $SYSTEM_VARIABLES; do
7692 'if [ -n "\$'${varname}'" ]; then
7693 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7698 echo "$CONFIG_STATUS" |
grep '\-confirm\-license' >/dev
/null
2>&1 || CONFIG_STATUS
="$CONFIG_STATUS -confirm-license"
7700 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7701 echo "#!/bin/sh" > "$outpath/config.status"
7702 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7703 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7704 echo "else" >> "$outpath/config.status"
7705 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7706 echo "fi" >> "$outpath/config.status"
7707 chmod +x
"$outpath/config.status"
7710 if [ -n "$RPATH_MESSAGE" ]; then
7712 echo "$RPATH_MESSAGE"
7715 MAKE
=`basename "$MAKE"`
7717 echo Qt is now configured
for building. Just run
\'$MAKE\'.
7718 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7719 echo Once everything is built
, Qt is installed.
7720 echo You should not run
\'$MAKE install\'.
7722 echo Once everything is built
, you must run
\'$MAKE install\'.
7723 echo Qt will be installed into
$QT_INSTALL_PREFIX
7726 echo To reconfigure
, run
\'$MAKE confclean
\' and
\'configure
\'.