If the file is open, there must be an engine.
[qt-netbsd.git] / configure
blob81872f91e280b044364017bc92c06f6da1f99e53
1 #!/bin/sh
2 #############################################################################
3 ##
4 ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5 ## All rights reserved.
6 ## Contact: Nokia Corporation (qt-info@nokia.com)
7 ##
8 ## This file is the build configuration utility of the Qt Toolkit.
9 ##
10 ## $QT_BEGIN_LICENSE:LGPL$
11 ## No Commercial Usage
12 ## This file contains pre-release code and may not be distributed.
13 ## You may use this file in accordance with the terms and conditions
14 ## contained in the Technology Preview License Agreement accompanying
15 ## this package.
17 ## GNU Lesser General Public License Usage
18 ## Alternatively, this file may be used under the terms of the GNU Lesser
19 ## General Public License version 2.1 as published by the Free Software
20 ## Foundation and appearing in the file LICENSE.LGPL included in the
21 ## packaging of this file. Please review the following information to
22 ## ensure the GNU Lesser General Public License version 2.1 requirements
23 ## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ## In addition, as a special exception, Nokia gives you certain additional
26 ## rights. These rights are described in the Nokia Qt LGPL Exception
27 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ## If you have questions regarding the use of this file, please contact
30 ## Nokia at qt-info@nokia.com.
39 ## $QT_END_LICENSE$
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
48 relconf=`basename $0`
49 # the directory of this script is the "source tree"
50 relpath=`dirname $0`
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
53 outpath=`/bin/pwd`
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
67 QMAKE_SWITCHES=
68 QMAKE_VARS=
69 QMAKE_CONFIG=
70 QTCONFIG_CONFIG=
71 QT_CONFIG=
72 SUPPORTED=
73 QMAKE_VARS_FILE=.qmake.vars
75 :> "$QMAKE_VARS_FILE"
77 #-------------------------------------------------------------------------------
78 # utility functions
79 #-------------------------------------------------------------------------------
81 shellEscape()
83 echo "$@" | sed 's/ /\ /g'
86 # Adds a new qmake variable to the cache
87 # Usage: QMakeVar mode varname contents
88 # where mode is one of: set, add, del
89 QMakeVar()
91 case "$1" in
92 set)
93 eq="="
95 add)
96 eq="+="
98 del)
99 eq="-="
102 echo >&2 "BUG: wrong command to QMakeVar: $1"
104 esac
106 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
109 # Helper function for getQMakeConf. It parses include statements in
110 # qmake.conf and prints out the expanded file
111 getQMakeConf1()
113 while read line; do case "$line" in
114 include*)
115 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
116 current_dir=`dirname "$1"`
117 conf_file="$current_dir/$inc_file"
118 if [ ! -e "$conf_file" ]; then
119 echo "WARNING: Unable to find file $conf_file" >&2
120 continue
122 getQMakeConf1 "$conf_file"
125 echo "$line"
127 esac; done < "$1"
131 # relies on $QMAKESPEC being set correctly. parses include statements in
132 # qmake.conf and prints out the expanded file
133 getQMakeConf()
135 tmpSPEC="$QMAKESPEC"
136 if [ -n "$1" ]; then
137 tmpSPEC="$1"
139 getQMakeConf1 "$tmpSPEC/qmake.conf"
142 # relies on $TEST_COMPILER being set correctly
143 compilerSupportsFlag()
145 cat >conftest.cpp <<EOF
146 int main() { return 0; }
148 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
149 ret=$?
150 rm -f conftest.cpp conftest.o
151 return $ret
154 # relies on $TEST_COMPILER being set correctly
155 linkerSupportsFlag()
157 lflags=-Wl
158 for flag
160 safe_flag=`shellEscape "$flag"`
161 lflags=$lflags,$safe_flag
162 done
163 compilerSupportsFlag "$lflags" >/dev/null 2>&1
166 #-------------------------------------------------------------------------------
167 # operating system detection
168 #-------------------------------------------------------------------------------
170 # need that throughout the script
171 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
172 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
173 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
174 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
177 #-------------------------------------------------------------------------------
178 # window system detection
179 #-------------------------------------------------------------------------------
181 PLATFORM_X11=no
182 PLATFORM_MAC=no
183 PLATFORM_QWS=no
185 if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ] && [ -d /System/Library/Frameworks/Carbon.framework ]; then
186 # Qt/Mac
187 # ~ the Carbon SDK exists
188 # ~ src/gui/base/qapplication_mac.cpp is present
189 # ~ this is the internal edition and Qt/Mac sources exist
190 PLATFORM_MAC=maybe
191 elif [ -f "$relpath"/src/gui/kernel/qapplication_qws.cpp ]; then
192 # Qt Embedded
193 # ~ src/gui/base/qapplication_qws.cpp is present
194 # ~ this is the free or commercial edition
195 # ~ this is the internal edition and Qt Embedded is explicitly enabled
196 if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ]; then
197 # This is a depot build, or an all-platforms package
198 PLATFORM_QWS=maybe
199 else
200 # This must be the embedded package, since the Qt/Mac source files are not present
201 PLATFORM_QWS=yes
205 #-----------------------------------------------------------------------------
206 # Qt version detection
207 #-----------------------------------------------------------------------------
208 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
209 QT_MAJOR_VERSION=
210 QT_MINOR_VERSION=0
211 QT_PATCH_VERSION=0
212 if [ -n "$QT_VERSION" ]; then
213 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
214 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
215 if [ -n "$MAJOR" ]; then
216 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
217 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
218 QT_MAJOR_VERSION="$MAJOR"
219 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
220 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
223 if [ -z "$QT_MAJOR_VERSION" ]; then
224 echo "Cannot process version from qglobal.h: $QT_VERSION"
225 echo "Cannot proceed."
226 exit 1
229 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
230 if [ -z "$QT_PACKAGEDATE" ]; then
231 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
232 echo "Cannot proceed"
233 exit 1
236 #-------------------------------------------------------------------------------
237 # check the license
238 #-------------------------------------------------------------------------------
239 COMMERCIAL_USER=ask
240 CFG_DEV=no
241 CFG_NOKIA=no
242 CFG_EMBEDDED=no
243 CFG_RTOS_ENABLED=yes
244 EditionString=Commercial
246 earlyArgParse()
248 # parse the arguments, setting things to "yes" or "no"
249 while [ "$#" -gt 0 ]; do
250 CURRENT_OPT="$1"
251 UNKNOWN_ARG=no
252 case "$1" in
253 #Autoconf style options
254 --enable-*)
255 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
256 VAL=yes
258 --disable-*)
259 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
260 VAL=no
262 --*=*)
263 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
264 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
266 --no-*)
267 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
268 VAL=no
270 -embedded)
271 VAR=embedded
272 # this option may or may not be followed by an argument
273 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
274 VAL=auto
275 else
276 shift;
277 VAL=$1
280 -h|help|--help|-help)
281 if [ "$VAL" = "yes" ]; then
282 OPT_HELP="$VAL"
283 COMMERCIAL_USER="no" #doesn't matter we will display the help
284 else
285 UNKNOWN_OPT=yes
286 COMMERCIAL_USER="no" #doesn't matter we will display the help
289 --*)
290 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
291 VAL=yes
294 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
295 VAL="unknown"
298 UNKNOWN_ARG=yes
300 esac
301 if [ "$UNKNOWN_ARG" = "yes" ]; then
302 shift
303 continue
305 shift
307 UNKNOWN_OPT=no
308 case "$VAR" in
309 embedded)
310 CFG_EMBEDDED="$VAL"
311 if [ "$PLATFORM_QWS" != "no" ]; then
312 if [ "$PLATFORM_QWS" = "maybe" ]; then
313 PLATFORM_X11=no
314 PLATFORM_MAC=no
315 PLATFORM_QWS=yes
317 else
318 echo "No license exists to enable Qt for Embedded Linux. Disabling."
319 CFG_EMBEDDED=no
322 developer-build)
323 CFG_DEV="yes"
325 nokia-developer)
326 CFG_DEV="yes"
327 CFG_NOKIA="yes"
328 COMMERCIAL_USER="no"
330 commercial)
331 COMMERCIAL_USER="yes"
333 opensource)
334 COMMERCIAL_USER="no"
337 UNKNOWN_OPT=yes
339 esac
340 done
343 earlyArgParse "$@"
345 if [ "$COMMERCIAL_USER" = "ask" ]; then
346 while true; do
347 echo "Which edition of Qt do you want to use ?"
348 echo
349 echo "Type 'c' if you want to use the Commercial Edition."
350 echo "Type 'o' if you want to use the Open Source Edition."
351 echo
352 read commercial
353 echo
354 if [ "$commercial" = "c" ]; then
355 COMMERCIAL_USER="yes"
356 break
357 elif [ "$commercial" = "o" ]; then
358 COMMERCIAL_USER="no"
359 break
361 done
364 if [ "$CFG_NOKIA" = "yes" ]; then
365 Licensee="Nokia"
366 Edition="NokiaInternalBuild"
367 EditionString="Nokia Internal Build"
368 QT_EDITION="QT_EDITION_OPENSOURCE"
369 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
370 elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
371 # Commercial preview release
372 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
373 Licensee="Preview"
374 Edition="Preview"
375 QT_EDITION="QT_EDITION_DESKTOP"
376 LicenseType="Technology Preview"
377 elif [ $COMMERCIAL_USER = "yes" ]; then
378 # one of commercial editions
379 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
380 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
382 # read in the license file
383 if [ -f "$LICENSE_FILE" ]; then
384 . "$LICENSE_FILE" >/dev/null 2>&1
385 if [ -z "$LicenseKeyExt" ]; then
386 echo
387 echo "You are using an old license file."
388 echo
389 echo "Please install the license file supplied by Nokia,"
390 echo "or install the Qt Open Source Edition if you intend to"
391 echo "develop free software."
392 exit 1
394 if [ -z "$Licensee" ]; then
395 echo
396 echo "Invalid license key. Please check the license key."
397 exit 1
399 else
400 if [ -z "$LicenseKeyExt" ]; then
401 echo
402 if echo '\c' | grep '\c' >/dev/null; then
403 echo -n "Please enter your license key: "
404 else
405 echo "Please enter your license key: \c"
407 read LicenseKeyExt
408 Licensee="Unknown user"
412 # Key verification
413 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
414 && LicenseValid="yes" \
415 || LicenseValid="no"
416 if [ "$LicenseValid" != "yes" ]; then
417 echo
418 echo "Invalid license key. Please check the license key."
419 exit 1
421 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
422 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
423 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
424 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
426 # determine which edition we are licensed to use
427 case "$LicenseTypeCode" in
428 F4M)
429 LicenseType="Commercial"
430 case $ProductCode in
432 Edition="Universal"
433 QT_EDITION="QT_EDITION_UNIVERSAL"
436 Edition="FullFramework"
437 EditionString="Full Framework"
438 QT_EDITION="QT_EDITION_DESKTOP"
441 Edition="GUIFramework"
442 EditionString="GUI Framework"
443 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
445 esac
447 Z4M|R4M|Q4M)
448 LicenseType="Evaluation"
449 QMakeVar add DEFINES QT_EVAL
450 case $ProductCode in
452 Edition="Evaluation"
453 QT_EDITION="QT_EDITION_EVALUATION"
455 esac
457 esac
458 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
459 echo
460 echo "Invalid license key. Please check the license key."
461 exit 1
464 # verify that we are licensed to use Qt on this platform
465 LICENSE_EXTENSION=
466 case "$PlatformCode" in
468 CFG_RTOS_ENABLED=yes
469 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
472 CFG_RTOS_ENABLED=no
473 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
475 esac
476 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
477 X9,* | XC,* | XU,* | XW,* | XM,*)
478 # Qt All-OS
479 LICENSE_EXTENSION="-ALLOS"
481 8M,* | KM,* | S9,* | SC,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
482 # Qt for Embedded Linux
483 LICENSE_EXTENSION="-EMBEDDED"
485 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
486 # Embedded no-deploy
487 LICENSE_EXTENSION="-EMBEDDED"
489 FM,*,no | LM,yes,* | ZM,no,no)
490 # Desktop
491 LICENSE_EXTENSION="-DESKTOP"
494 Platform=Linux/X11
495 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
496 [ "$PLATFORM_QWS" = "yes" ] && Platform='Embedded Linux'
497 echo
498 echo "You are not licensed for the $Platform platform."
499 echo
500 echo "Please contact qt-info@nokia.com to upgrade your license to"
501 echo "include the $Platform platform, or install the Qt Open Source Edition"
502 echo "if you intend to develop free software."
503 exit 1
505 esac
507 if test -r "$relpath/.LICENSE"; then
508 # Generic, non-final license
509 LICENSE_EXTENSION=""
510 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
511 case "$line" in
512 *BETA*)
513 Edition=Beta
515 *TECHNOLOGY?PREVIEW*)
516 Edition=Preview
518 *EVALUATION*)
519 Edition=Evaluation
522 echo >&2 "Invalid license files; cannot continue"
523 exit 1
525 esac
526 Licensee="$Edition"
527 EditionString="$Edition"
528 QT_EDITION="QT_EDITION_DESKTOP"
531 case "$LicenseFeatureCode" in
532 B|G|L|Y)
533 # US
534 case "$LicenseType" in
535 Commercial)
536 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
538 Evaluation)
539 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
541 esac
543 2|4|5|F)
544 # non-US
545 case "$LicenseType" in
546 Commercial)
547 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
549 Evaluation)
550 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
552 esac
555 echo
556 echo "Invalid license key. Please check the license key."
557 exit 1
559 esac
560 case "$LicenseFeatureCode" in
561 4|B|F|Y)
562 CFG_RTOS_ENABLED=yes
564 2|5|G|L)
565 CFG_RTOS_ENABLED=no
567 esac
568 if [ '!' -f "$outpath/LICENSE" ]; then
569 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
570 echo "this software has disappeared."
571 echo
572 echo "Sorry, you are not licensed to use this software."
573 echo "Try re-installing."
574 echo
575 exit 1
577 elif [ $COMMERCIAL_USER = "no" ]; then
578 # Open Source edition - may only be used under the terms of the GPL or LGPL.
579 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
580 Licensee="Open Source"
581 Edition="OpenSource"
582 EditionString="Open Source"
583 QT_EDITION="QT_EDITION_OPENSOURCE"
586 #-------------------------------------------------------------------------------
587 # initalize variables
588 #-------------------------------------------------------------------------------
590 SYSTEM_VARIABLES="CC CXX CFLAGS CXXFLAGS LDFLAGS"
591 for varname in $SYSTEM_VARIABLES; do
592 qmakevarname="${varname}"
593 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
594 if [ "${varname}" = "LDFLAGS" ]; then
595 qmakevarname="LFLAGS"
597 cmd=`echo \
598 'if [ -n "\$'${varname}'" ]; then
599 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
600 fi'`
601 eval "$cmd"
602 done
603 # Use CC/CXX to run config.tests
604 mkdir -p "$outpath/config.tests"
605 rm -f "$outpath/config.tests/.qmake.cache"
606 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
608 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
609 QMakeVar add decorations "default windows styled"
610 QMakeVar add mouse-drivers "pc"
611 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
612 QMakeVar add gfx-drivers "linuxfb"
613 QMakeVar add mouse-drivers "linuxtp"
615 QMakeVar add kbd-drivers "tty"
617 if [ "$CFG_DEV" = "yes" ]; then
618 QMakeVar add kbd-drivers "um"
621 # QTDIR may be set and point to an old or system-wide Qt installation
622 unset QTDIR
624 # the minimum version of libdbus-1 that we require:
625 MIN_DBUS_1_VERSION=0.93
627 # initalize internal variables
628 CFG_CONFIGURE_EXIT_ON_ERROR=yes
629 CFG_PROFILE=no
630 CFG_EXCEPTIONS=unspecified
631 CFG_SCRIPT=auto # (yes|no|auto)
632 CFG_SCRIPTTOOLS=auto # (yes|no|auto)
633 CFG_XMLPATTERNS=auto # (yes|no|auto)
634 CFG_INCREMENTAL=auto
635 CFG_QCONFIG=full
636 CFG_DEBUG=auto
637 CFG_MYSQL_CONFIG=
638 CFG_DEBUG_RELEASE=no
639 CFG_SHARED=yes
640 CFG_SM=auto
641 CFG_XSHAPE=auto
642 CFG_XSYNC=auto
643 CFG_XINERAMA=runtime
644 CFG_XFIXES=runtime
645 CFG_ZLIB=auto
646 CFG_SQLITE=qt
647 CFG_GIF=auto
648 CFG_TIFF=auto
649 CFG_LIBTIFF=auto
650 CFG_PNG=yes
651 CFG_LIBPNG=auto
652 CFG_JPEG=auto
653 CFG_LIBJPEG=auto
654 CFG_MNG=auto
655 CFG_LIBMNG=auto
656 CFG_XCURSOR=runtime
657 CFG_XRANDR=runtime
658 CFG_XRENDER=auto
659 CFG_MITSHM=auto
660 CFG_OPENGL=auto
661 CFG_OPENVG=no
662 CFG_OPENVG_LC_INCLUDES=no
663 CFG_OPENVG_SHIVA=no
664 CFG_OPENVG_ON_OPENGL=no
665 CFG_EGL=no
666 CFG_EGL_GLES_INCLUDES=no
667 CFG_SSE=auto
668 CFG_FONTCONFIG=auto
669 CFG_QWS_FREETYPE=auto
670 CFG_LIBFREETYPE=auto
671 CFG_SQL_AVAILABLE=
672 QT_DEFAULT_BUILD_PARTS="libs tools examples demos docs translations"
673 CFG_BUILD_PARTS=""
674 CFG_NOBUILD_PARTS=""
675 CFG_RELEASE_QMAKE=no
676 CFG_PHONON=auto
677 CFG_PHONON_BACKEND=yes
678 CFG_MULTIMEDIA=yes
679 CFG_AUDIO_BACKEND=yes
680 CFG_SVG=yes
681 CFG_DECLARATIVE=auto
682 CFG_WEBKIT=auto # (yes|no|auto)
683 CFG_JAVASCRIPTCORE_JIT=auto
685 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
686 CFG_GFX_ON="linuxfb multiscreen"
687 CFG_GFX_PLUGIN_AVAILABLE=
688 CFG_GFX_PLUGIN=
689 CFG_GFX_OFF=
690 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
691 CFG_KBD_ON="tty" #default, see QMakeVar above
692 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
693 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
695 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
696 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
697 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
698 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
701 CFG_ARCH=
702 CFG_HOST_ARCH=
703 CFG_KBD_PLUGIN_AVAILABLE=
704 CFG_KBD_PLUGIN=
705 CFG_KBD_OFF=
706 CFG_MOUSE_PLUGIN_AVAILABLE=
707 CFG_MOUSE_PLUGIN=
708 CFG_MOUSE_OFF=
709 CFG_USE_GNUMAKE=no
710 CFG_IM=yes
711 CFG_DECORATION_AVAILABLE="styled windows default"
712 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
713 CFG_DECORATION_PLUGIN_AVAILABLE=
714 CFG_DECORATION_PLUGIN=
715 CFG_XINPUT=runtime
716 CFG_XKB=auto
717 CFG_NIS=auto
718 CFG_CUPS=auto
719 CFG_ICONV=auto
720 CFG_DBUS=auto
721 CFG_GLIB=auto
722 CFG_GSTREAMER=auto
723 CFG_QGTKSTYLE=auto
724 CFG_LARGEFILE=auto
725 CFG_OPENSSL=auto
726 CFG_PTMALLOC=no
727 CFG_STL=auto
728 CFG_PRECOMPILE=auto
729 CFG_SEPARATE_DEBUG_INFO=auto
730 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
731 CFG_REDUCE_EXPORTS=auto
732 CFG_MMX=auto
733 CFG_3DNOW=auto
734 CFG_SSE=auto
735 CFG_SSE2=auto
736 CFG_REDUCE_RELOCATIONS=no
737 CFG_IPV6=auto
738 CFG_NAS=no
739 CFG_QWS_DEPTHS=all
740 CFG_USER_BUILD_KEY=
741 CFG_ACCESSIBILITY=auto
742 CFG_QT3SUPPORT=yes
743 CFG_ENDIAN=auto
744 CFG_HOST_ENDIAN=auto
745 CFG_DOUBLEFORMAT=auto
746 CFG_ARMFPA=auto
747 CFG_IWMMXT=no
748 CFG_NEON=auto
749 CFG_CLOCK_GETTIME=auto
750 CFG_CLOCK_MONOTONIC=auto
751 CFG_MREMAP=auto
752 CFG_GETADDRINFO=auto
753 CFG_IPV6IFNAME=auto
754 CFG_GETIFADDRS=auto
755 CFG_INOTIFY=auto
756 CFG_RPATH=yes
757 CFG_FRAMEWORK=auto
758 CFG_MAC_ARCHS=
759 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
760 CFG_MAC_DWARF2=auto
761 CFG_MAC_XARCH=auto
762 CFG_MAC_CARBON=yes
763 CFG_MAC_COCOA=auto
764 COMMANDLINE_MAC_COCOA=no
765 CFG_SXE=no
766 CFG_PREFIX_INSTALL=yes
767 CFG_SDK=
768 D_FLAGS=
769 I_FLAGS=
770 L_FLAGS=
771 RPATH_FLAGS=
772 l_FLAGS=
773 QCONFIG_FLAGS=
774 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
775 PLATFORM=$QMAKESPEC
776 QT_CROSS_COMPILE=no
777 OPT_CONFIRM_LICENSE=no
778 OPT_SHADOW=maybe
779 OPT_FAST=auto
780 OPT_VERBOSE=no
781 OPT_HELP=
782 CFG_SILENT=no
783 CFG_GRAPHICS_SYSTEM=default
784 CFG_ALSA=auto
786 # initalize variables used for installation
787 QT_INSTALL_PREFIX=
788 QT_INSTALL_DOCS=
789 QT_INSTALL_HEADERS=
790 QT_INSTALL_LIBS=
791 QT_INSTALL_BINS=
792 QT_INSTALL_PLUGINS=
793 QT_INSTALL_DATA=
794 QT_INSTALL_TRANSLATIONS=
795 QT_INSTALL_SETTINGS=
796 QT_INSTALL_EXAMPLES=
797 QT_INSTALL_DEMOS=
798 QT_HOST_PREFIX=
800 #flags for SQL drivers
801 QT_CFLAGS_PSQL=
802 QT_LFLAGS_PSQL=
803 QT_CFLAGS_MYSQL=
804 QT_LFLAGS_MYSQL=
805 QT_LFLAGS_MYSQL_R=
806 QT_CFLAGS_SQLITE=
807 QT_LFLAGS_SQLITE=
808 QT_LFLAGS_ODBC="-lodbc"
810 # flags for libdbus-1
811 QT_CFLAGS_DBUS=
812 QT_LIBS_DBUS=
814 # flags for Glib (X11 only)
815 QT_CFLAGS_GLIB=
816 QT_LIBS_GLIB=
818 # flags for GStreamer (X11 only)
819 QT_CFLAGS_GSTREAMER=
820 QT_LIBS_GSTREAMER=
822 #-------------------------------------------------------------------------------
823 # check SQL drivers, mouse drivers and decorations available in this package
824 #-------------------------------------------------------------------------------
826 # opensource version removes some drivers, so force them to be off
827 CFG_SQL_tds=no
828 CFG_SQL_oci=no
829 CFG_SQL_db2=no
831 CFG_SQL_AVAILABLE=
832 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
833 for a in "$relpath/src/plugins/sqldrivers/"*; do
834 if [ -d "$a" ]; then
835 base_a=`basename "$a"`
836 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
837 eval "CFG_SQL_${base_a}=auto"
839 done
842 CFG_DECORATION_PLUGIN_AVAILABLE=
843 if [ -d "$relpath/src/plugins/decorations" ]; then
844 for a in "$relpath/src/plugins/decorations/"*; do
845 if [ -d "$a" ]; then
846 base_a=`basename "$a"`
847 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
849 done
852 CFG_KBD_PLUGIN_AVAILABLE=
853 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
854 for a in "$relpath/src/plugins/kbddrivers/"*; do
855 if [ -d "$a" ]; then
856 base_a=`basename "$a"`
857 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
859 done
862 CFG_MOUSE_PLUGIN_AVAILABLE=
863 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
864 for a in "$relpath/src/plugins/mousedrivers/"*; do
865 if [ -d "$a" ]; then
866 base_a=`basename "$a"`
867 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
869 done
872 CFG_GFX_PLUGIN_AVAILABLE=
873 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
874 for a in "$relpath/src/plugins/gfxdrivers/"*; do
875 if [ -d "$a" ]; then
876 base_a=`basename "$a"`
877 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
879 done
880 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
883 #-------------------------------------------------------------------------------
884 # parse command line arguments
885 #-------------------------------------------------------------------------------
887 # parse the arguments, setting things to "yes" or "no"
888 while [ "$#" -gt 0 ]; do
889 CURRENT_OPT="$1"
890 UNKNOWN_ARG=no
891 case "$1" in
892 #Autoconf style options
893 --enable-*)
894 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
895 VAL=yes
897 --disable-*)
898 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
899 VAL=no
901 --*=*)
902 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
903 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
905 --no-*)
906 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
907 VAL=no
909 --*)
910 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
911 VAL=yes
913 #Qt plugin options
914 -no-*-*|-plugin-*-*|-qt-*-*)
915 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
916 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
918 #Qt style no options
919 -no-*)
920 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
921 VAL=no
923 #Qt style yes options
924 -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-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|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
925 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
926 VAL=yes
928 #Qt style options that pass an argument
929 -qconfig)
930 if [ "$PLATFORM_QWS" != "yes" ]; then
931 echo
932 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
933 echo
935 CFG_QCONFIG="$VAL"
936 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
937 shift
938 VAL=$1
940 -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config)
941 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
942 shift
943 VAL="$1"
945 #Qt style complex options in one command
946 -enable-*|-disable-*)
947 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
948 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
950 #Qt Builtin/System style options
951 -no-*|-system-*|-qt-*)
952 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
953 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
955 #Options that cannot be generalized
956 -k|-continue)
957 VAR=fatal_error
958 VAL=no
960 -embedded)
961 VAR=embedded
962 # this option may or may not be followed by an argument
963 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
964 VAL=auto
965 else
966 shift;
967 VAL=$1
970 -opengl)
971 VAR=opengl
972 # this option may or may not be followed by an argument
973 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
974 VAL=yes
975 else
976 shift;
977 VAL=$1
980 -openvg)
981 VAR=openvg
982 # this option may or may not be followed by an argument
983 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
984 VAL=yes
985 else
986 shift;
987 VAL=$1
990 -hostprefix)
991 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
992 # this option may or may not be followed by an argument
993 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
994 VAL=$outpath
995 else
996 shift;
997 VAL=$1
1000 -host-*-endian)
1001 VAR=host_endian
1002 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1004 -*-endian)
1005 VAR=endian
1006 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1008 -qtnamespace)
1009 VAR="qtnamespace"
1010 shift
1011 VAL="$1"
1013 -graphicssystem)
1014 VAR="graphicssystem"
1015 shift
1016 VAL=$1
1018 -qtlibinfix)
1019 VAR="qtlibinfix"
1020 shift
1021 VAL="$1"
1023 -D?*|-D)
1024 VAR="add_define"
1025 if [ "$1" = "-D" ]; then
1026 shift
1027 VAL="$1"
1028 else
1029 VAL=`echo $1 | sed 's,-D,,'`
1032 -I?*|-I)
1033 VAR="add_ipath"
1034 if [ "$1" = "-I" ]; then
1035 shift
1036 VAL="$1"
1037 else
1038 VAL=`echo $1 | sed 's,-I,,'`
1041 -L?*|-L)
1042 VAR="add_lpath"
1043 if [ "$1" = "-L" ]; then
1044 shift
1045 VAL="$1"
1046 else
1047 VAL=`echo $1 | sed 's,-L,,'`
1050 -R?*|-R)
1051 VAR="add_rpath"
1052 if [ "$1" = "-R" ]; then
1053 shift
1054 VAL="$1"
1055 else
1056 VAL=`echo $1 | sed 's,-R,,'`
1059 -l?*)
1060 VAR="add_link"
1061 VAL=`echo $1 | sed 's,-l,,'`
1063 -F?*|-F)
1064 VAR="add_fpath"
1065 if [ "$1" = "-F" ]; then
1066 shift
1067 VAL="$1"
1068 else
1069 VAL=`echo $1 | sed 's,-F,,'`
1072 -fw?*|-fw)
1073 VAR="add_framework"
1074 if [ "$1" = "-fw" ]; then
1075 shift
1076 VAL="$1"
1077 else
1078 VAL=`echo $1 | sed 's,-fw,,'`
1082 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1083 VAL="unknown"
1086 UNKNOWN_ARG=yes
1088 esac
1089 if [ "$UNKNOWN_ARG" = "yes" ]; then
1090 echo "$1: unknown argument"
1091 OPT_HELP=yes
1092 ERROR=yes
1093 shift
1094 continue
1096 shift
1098 UNKNOWN_OPT=no
1099 case "$VAR" in
1100 qt3support)
1101 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1102 CFG_QT3SUPPORT="$VAL"
1103 else
1104 UNKNOWN_OPT=yes
1107 accessibility)
1108 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1109 CFG_ACCESSIBILITY="$VAL"
1110 else
1111 UNKNOWN_OPT=yes
1114 license)
1115 LICENSE_FILE="$VAL"
1117 gnumake)
1118 CFG_USE_GNUMAKE="$VAL"
1120 mysql_config)
1121 CFG_MYSQL_CONFIG="$VAL"
1123 prefix)
1124 QT_INSTALL_PREFIX="$VAL"
1126 hostprefix)
1127 QT_HOST_PREFIX="$VAL"
1129 force-pkg-config)
1130 QT_FORCE_PKGCONFIG=yes
1132 docdir)
1133 QT_INSTALL_DOCS="$VAL"
1135 headerdir)
1136 QT_INSTALL_HEADERS="$VAL"
1138 plugindir)
1139 QT_INSTALL_PLUGINS="$VAL"
1141 datadir)
1142 QT_INSTALL_DATA="$VAL"
1144 libdir)
1145 QT_INSTALL_LIBS="$VAL"
1147 qtnamespace)
1148 QT_NAMESPACE="$VAL"
1150 qtlibinfix)
1151 QT_LIBINFIX="$VAL"
1153 translationdir)
1154 QT_INSTALL_TRANSLATIONS="$VAL"
1156 sysconfdir|settingsdir)
1157 QT_INSTALL_SETTINGS="$VAL"
1159 examplesdir)
1160 QT_INSTALL_EXAMPLES="$VAL"
1162 demosdir)
1163 QT_INSTALL_DEMOS="$VAL"
1165 qconfig)
1166 CFG_QCONFIG="$VAL"
1168 bindir)
1169 QT_INSTALL_BINS="$VAL"
1171 buildkey)
1172 CFG_USER_BUILD_KEY="$VAL"
1174 sxe)
1175 CFG_SXE="$VAL"
1177 embedded)
1178 CFG_EMBEDDED="$VAL"
1179 if [ "$PLATFORM_QWS" != "no" ]; then
1180 if [ "$PLATFORM_QWS" = "maybe" ]; then
1181 PLATFORM_X11=no
1182 PLATFORM_MAC=no
1183 PLATFORM_QWS=yes
1185 else
1186 echo "No license exists to enable Qt for Embedded Linux. Disabling."
1187 CFG_EMBEDDED=no
1190 sse)
1191 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1192 CFG_SSE="$VAL"
1193 else
1194 UNKNOWN_OPT=yes
1197 endian)
1198 if [ "$VAL" = "little" ]; then
1199 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1200 elif [ "$VAL" = "big" ]; then
1201 CFG_ENDIAN="Q_BIG_ENDIAN"
1202 else
1203 UNKNOWN_OPT=yes
1206 host_endian)
1207 if [ "$VAL" = "little" ]; then
1208 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1209 elif [ "$VAL" = "big" ]; then
1210 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1211 else
1212 UNKNOWN_OPT=yes
1215 armfpa)
1216 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1217 CFG_ARMFPA="$VAL"
1218 else
1219 UNKNOWN_OPT=yes
1222 depths)
1223 CFG_QWS_DEPTHS="$VAL"
1225 opengl)
1226 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1227 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1228 [ "$VAL" = "es1cl" ] || [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
1229 CFG_OPENGL="$VAL"
1230 else
1231 UNKNOWN_OPT=yes
1234 openvg)
1235 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1236 CFG_OPENVG="$VAL"
1237 else
1238 UNKNOWN_OPT=yes
1241 graphicssystem)
1242 if [ "$PLATFORM_QWS" = "yes" ]; then
1243 echo "Error: Graphics System plugins are not supported on QWS."
1244 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1245 echo " rather than existing as a separate plugin."
1246 echo ""
1247 UNKNOWN_OPT=yes
1248 else
1249 if [ "$VAL" = "opengl" ]; then
1250 CFG_GRAPHICS_SYSTEM="opengl"
1251 elif [ "$VAL" = "openvg" ]; then
1252 CFG_GRAPHICS_SYSTEM="openvg"
1253 elif [ "$VAL" = "raster" ]; then
1254 CFG_GRAPHICS_SYSTEM="raster"
1255 else
1256 UNKNOWN_OPT=yes
1261 qvfb) # left for commandline compatibility, not documented
1262 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1263 if [ "$VAL" = "yes" ]; then
1264 QMakeVar add gfx-drivers qvfb
1265 QMakeVar add kbd-drivers qvfb
1266 QMakeVar add mouse-drivers qvfb
1267 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1268 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1269 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1271 else
1272 UNKNOWN_OPT=yes
1275 nomake)
1276 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1278 make)
1279 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1281 x11)
1282 if [ "$PLATFORM_MAC" = "yes" ]; then
1283 PLATFORM_MAC=no
1284 elif [ "$PLATFORM_QWS" = "yes" ]; then
1285 PLATFORM_QWS=no
1287 if [ "$CFG_FRAMEWORK" = "auto" ]; then
1288 CFG_FRAMEWORK=no
1290 PLATFORM_X11=yes
1292 sdk)
1293 if [ "$PLATFORM_MAC" = "yes" ]; then
1294 CFG_SDK="$VAL"
1295 else
1296 UNKNOWN_OPT=yes
1299 dwarf2)
1300 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1301 CFG_MAC_DWARF2="$VAL"
1302 else
1303 UNKNOWN_OPT=yes
1306 arch)
1307 if [ "$PLATFORM_MAC" = "yes" ]; then
1308 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1309 else
1310 CFG_ARCH=$VAL
1313 host-arch)
1314 CFG_HOST_ARCH=$VAL
1316 universal)
1317 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1318 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1319 else
1320 UNKNOWN_OPT=yes
1323 cocoa)
1324 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1325 CFG_MAC_COCOA="$VAL"
1326 COMMANDLINE_MAC_COCOA="$VAL"
1327 else
1328 UNKNOWN_OPT=yes
1331 framework)
1332 if [ "$PLATFORM_MAC" = "yes" ]; then
1333 CFG_FRAMEWORK="$VAL"
1334 else
1335 UNKNOWN_OPT=yes
1338 profile)
1339 if [ "$VAL" = "yes" ]; then
1340 CFG_PROFILE=yes
1341 QMakeVar add QMAKE_CFLAGS -pg
1342 QMakeVar add QMAKE_CXXFLAGS -pg
1343 QMakeVar add QMAKE_LFLAGS -pg
1344 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1345 else
1346 UNKNOWN_OPT=yes
1349 exceptions|g++-exceptions)
1350 if [ "$VAL" = "no" ]; then
1351 CFG_EXCEPTIONS=no
1352 elif [ "$VAL" = "yes" ]; then
1353 CFG_EXCEPTIONS=yes
1354 else
1355 UNKNOWN_OPT=yes
1358 platform)
1359 PLATFORM="$VAL"
1360 # keep compatibility with old platform names
1361 case $PLATFORM in
1362 aix-64)
1363 PLATFORM=aix-xlc-64
1365 hpux-o64)
1366 PLATFORM=hpux-acc-o64
1368 hpux-n64)
1369 PLATFORM=hpux-acc-64
1371 hpux-acc-n64)
1372 PLATFORM=hpux-acc-64
1374 irix-n32)
1375 PLATFORM=irix-cc
1377 irix-64)
1378 PLATFORM=irix-cc-64
1380 irix-cc-n64)
1381 PLATFORM=irix-cc-64
1383 reliant-64)
1384 PLATFORM=reliant-cds-64
1386 solaris-64)
1387 PLATFORM=solaris-cc-64
1389 solaris-64)
1390 PLATFORM=solaris-cc-64
1392 openunix-cc)
1393 PLATFORM=unixware-cc
1395 openunix-g++)
1396 PLATFORM=unixware-g++
1398 unixware7-cc)
1399 PLATFORM=unixware-cc
1401 unixware7-g++)
1402 PLATFORM=unixware-g++
1404 macx-g++-64)
1405 PLATFORM=macx-g++
1406 NATIVE_64_ARCH=
1407 case `uname -p` in
1408 i386) NATIVE_64_ARCH="x86_64" ;;
1409 powerpc) NATIVE_64_ARCH="ppc64" ;;
1410 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1411 esac
1412 if [ ! -z "$NATIVE_64_ARCH" ]; then
1413 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1414 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1417 esac
1419 xplatform)
1420 XPLATFORM="$VAL"
1422 debug-and-release)
1423 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1424 CFG_DEBUG_RELEASE="$VAL"
1425 else
1426 UNKNOWN_OPT=yes
1429 optimized-qmake)
1430 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1431 CFG_RELEASE_QMAKE="$VAL"
1432 else
1433 UNKNOWN_OPT=yes
1436 release)
1437 if [ "$VAL" = "yes" ]; then
1438 CFG_DEBUG=no
1439 elif [ "$VAL" = "no" ]; then
1440 CFG_DEBUG=yes
1441 else
1442 UNKNOWN_OPT=yes
1445 prefix-install)
1446 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1447 CFG_PREFIX_INSTALL="$VAL"
1448 else
1449 UNKNOWN_OPT=yes
1452 debug)
1453 CFG_DEBUG="$VAL"
1455 developer-build|commercial|opensource|nokia-developer)
1456 # These switches have been dealt with already
1458 static)
1459 if [ "$VAL" = "yes" ]; then
1460 CFG_SHARED=no
1461 elif [ "$VAL" = "no" ]; then
1462 CFG_SHARED=yes
1463 else
1464 UNKNOWN_OPT=yes
1467 incremental)
1468 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1469 CFG_INCREMENTAL="$VAL"
1470 else
1471 UNKNOWN_OPT=yes
1474 fatal_error)
1475 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1476 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1477 else
1478 UNKNOWN_OPT=yes
1481 feature-*)
1482 if [ "$PLATFORM_QWS" = "yes" ]; then
1483 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1484 if [ "$VAL" = "no" ]; then
1485 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1486 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1487 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1488 else
1489 UNKNOWN_OPT=yes
1491 else
1492 UNKNOWN_OPT=yes
1495 shared)
1496 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1497 CFG_SHARED="$VAL"
1498 else
1499 UNKNOWN_OPT=yes
1502 gif)
1503 [ "$VAL" = "qt" ] && VAL=yes
1504 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1505 CFG_GIF="$VAL"
1506 else
1507 UNKNOWN_OPT=yes
1511 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1512 CFG_SM="$VAL"
1513 else
1514 UNKNOWN_OPT=yes
1518 xinerama)
1519 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1520 CFG_XINERAMA="$VAL"
1521 else
1522 UNKNOWN_OPT=yes
1525 xshape)
1526 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1527 CFG_XSHAPE="$VAL"
1528 else
1529 UNKNOWN_OPT=yes
1532 xsync)
1533 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1534 CFG_XSYNC="$VAL"
1535 else
1536 UNKNOWN_OPT=yes
1539 xinput)
1540 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1541 CFG_XINPUT="$VAL"
1542 else
1543 UNKNOWN_OPT=yes
1546 stl)
1547 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1548 CFG_STL="$VAL"
1549 else
1550 UNKNOWN_OPT=yes
1553 pch)
1554 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1555 CFG_PRECOMPILE="$VAL"
1556 else
1557 UNKNOWN_OPT=yes
1560 separate-debug-info)
1561 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1562 CFG_SEPARATE_DEBUG_INFO="$VAL"
1563 elif [ "$VAL" = "nocopy" ] ; then
1564 CFG_SEPARATE_DEBUG_INFO="yes"
1565 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1566 else
1567 UNKNOWN_OPT=yes
1570 reduce-exports)
1571 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1572 CFG_REDUCE_EXPORTS="$VAL"
1573 else
1574 UNKNOWN_OPT=yes
1577 mmx)
1578 if [ "$VAL" = "no" ]; then
1579 CFG_MMX="$VAL"
1580 else
1581 UNKNOWN_OPT=yes
1584 3dnow)
1585 if [ "$VAL" = "no" ]; then
1586 CFG_3DNOW="$VAL"
1587 else
1588 UNKNOWN_OPT=yes
1591 sse)
1592 if [ "$VAL" = "no" ]; then
1593 CFG_SSE="$VAL"
1594 else
1595 UNKNOWN_OPT=yes
1598 sse2)
1599 if [ "$VAL" = "no" ]; then
1600 CFG_SSE2="$VAL"
1601 else
1602 UNKNOWN_OPT=yes
1605 iwmmxt)
1606 CFG_IWMMXT="yes"
1608 neon)
1609 if [ "$VAL" = "no" ]; then
1610 CFG_NEON="$VAL"
1611 else
1612 UNKNOWN_OPT=yes
1615 reduce-relocations)
1616 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1617 CFG_REDUCE_RELOCATIONS="$VAL"
1618 else
1619 UNKNOWN_OPT=yes
1622 freetype)
1623 [ "$VAL" = "qt" ] && VAL=yes
1624 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1625 CFG_QWS_FREETYPE="$VAL"
1626 else
1627 UNKNOWN_OPT=yes
1630 zlib)
1631 [ "$VAL" = "qt" ] && VAL=yes
1632 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1633 CFG_ZLIB="$VAL"
1634 else
1635 UNKNOWN_OPT=yes
1637 # No longer supported:
1638 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1640 sqlite)
1641 if [ "$VAL" = "system" ]; then
1642 CFG_SQLITE=system
1643 else
1644 UNKNOWN_OPT=yes
1647 libpng)
1648 [ "$VAL" = "yes" ] && VAL=qt
1649 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1650 CFG_LIBPNG="$VAL"
1651 else
1652 UNKNOWN_OPT=yes
1655 libjpeg)
1656 [ "$VAL" = "yes" ] && VAL=qt
1657 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1658 CFG_LIBJPEG="$VAL"
1659 else
1660 UNKNOWN_OPT=yes
1663 libmng)
1664 [ "$VAL" = "yes" ] && VAL=qt
1665 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1666 CFG_LIBMNG="$VAL"
1667 else
1668 UNKNOWN_OPT=yes
1671 libtiff)
1672 [ "$VAL" = "yes" ] && VAL=qt
1673 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1674 CFG_LIBTIFF="$VAL"
1675 else
1676 UNKNOWN_OPT=yes
1679 nas-sound)
1680 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1681 CFG_NAS="$VAL"
1682 else
1683 UNKNOWN_OPT=yes
1686 xcursor)
1687 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1688 CFG_XCURSOR="$VAL"
1689 else
1690 UNKNOWN_OPT=yes
1693 xfixes)
1694 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1695 CFG_XFIXES="$VAL"
1696 else
1697 UNKNOWN_OPT=yes
1700 xrandr)
1701 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1702 CFG_XRANDR="$VAL"
1703 else
1704 UNKNOWN_OPT=yes
1707 xrender)
1708 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1709 CFG_XRENDER="$VAL"
1710 else
1711 UNKNOWN_OPT=yes
1714 mitshm)
1715 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1716 CFG_MITSHM="$VAL"
1717 else
1718 UNKNOWN_OPT=yes
1721 fontconfig)
1722 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1723 CFG_FONTCONFIG="$VAL"
1724 else
1725 UNKNOWN_OPT=yes
1728 xkb)
1729 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1730 CFG_XKB="$VAL"
1731 else
1732 UNKNOWN_OPT=yes
1735 cups)
1736 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1737 CFG_CUPS="$VAL"
1738 else
1739 UNKNOWN_OPT=yes
1742 iconv)
1743 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1744 CFG_ICONV="$VAL"
1745 else
1746 UNKNOWN_OPT=yes
1749 glib)
1750 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1751 CFG_GLIB="$VAL"
1752 else
1753 UNKNOWN_OPT=yes
1756 gstreamer)
1757 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1758 CFG_GSTREAMER="$VAL"
1759 else
1760 UNKNOWN_OPT=yes
1763 gtkstyle)
1764 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1765 CFG_QGTKSTYLE="$VAL"
1766 else
1767 UNKNOWN_OPT=yes
1770 qdbus|dbus)
1771 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1772 CFG_DBUS="$VAL"
1773 elif [ "$VAL" = "runtime" ]; then
1774 CFG_DBUS="yes"
1775 else
1776 UNKNOWN_OPT=yes
1779 dbus-linked)
1780 if [ "$VAL" = "yes" ]; then
1781 CFG_DBUS="linked"
1782 else
1783 UNKNOWN_OPT=yes
1786 nis)
1787 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1788 CFG_NIS="$VAL"
1789 else
1790 UNKNOWN_OPT=yes
1793 largefile)
1794 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1795 CFG_LARGEFILE="$VAL"
1796 else
1797 UNKNOWN_OPT=yes
1800 openssl)
1801 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1802 CFG_OPENSSL="$VAL"
1803 else
1804 UNKNOWN_OPT=yes
1807 openssl-linked)
1808 if [ "$VAL" = "yes" ]; then
1809 CFG_OPENSSL="linked"
1810 else
1811 UNKNOWN_OPT=yes
1814 ptmalloc)
1815 if [ "$VAL" = "yes" ]; then
1816 CFG_PTMALLOC="yes"
1817 else
1818 UNKNOWN_OPT=yes
1822 xmlpatterns)
1823 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1824 CFG_XMLPATTERNS="yes"
1825 else
1826 if [ "$VAL" = "no" ]; then
1827 CFG_XMLPATTERNS="no"
1828 else
1829 UNKNOWN_OPT=yes
1833 script)
1834 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1835 CFG_SCRIPT="yes"
1836 else
1837 if [ "$VAL" = "no" ]; then
1838 CFG_SCRIPT="no"
1839 else
1840 UNKNOWN_OPT=yes
1844 scripttools)
1845 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1846 CFG_SCRIPTTOOLS="yes"
1847 else
1848 if [ "$VAL" = "no" ]; then
1849 CFG_SCRIPTTOOLS="no"
1850 else
1851 UNKNOWN_OPT=yes
1855 svg)
1856 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1857 CFG_SVG="yes"
1858 else
1859 if [ "$VAL" = "no" ]; then
1860 CFG_SVG="no"
1861 else
1862 UNKNOWN_OPT=yes
1866 declarative)
1867 if [ "$VAL" = "yes" ]; then
1868 CFG_DECLARATIVE="yes"
1869 else
1870 if [ "$VAL" = "no" ]; then
1871 CFG_DECLARATIVE="no"
1872 else
1873 UNKNOWN_OPT=yes
1877 webkit)
1878 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1879 CFG_WEBKIT="yes"
1880 else
1881 if [ "$VAL" = "no" ]; then
1882 CFG_WEBKIT="no"
1883 else
1884 UNKNOWN_OPT=yes
1888 javascript-jit)
1889 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1890 CFG_JAVASCRIPTCORE_JIT="$VAL"
1891 else
1892 UNKNOWN_OPT=yes
1895 confirm-license)
1896 if [ "$VAL" = "yes" ]; then
1897 OPT_CONFIRM_LICENSE="$VAL"
1898 else
1899 UNKNOWN_OPT=yes
1902 h|help)
1903 if [ "$VAL" = "yes" ]; then
1904 OPT_HELP="$VAL"
1905 else
1906 UNKNOWN_OPT=yes
1909 sql-*|gfx-*|decoration-*|kbd-*|mouse-*)
1910 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1911 # if autoconf style options were used, $VAL can be "yes" or "no"
1912 [ "$VAL" = "yes" ] && VAL=qt
1913 # now $VAL should be "no", "qt", or "plugin"... double-check
1914 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1915 UNKNOWN_OPT=yes
1917 # now $VAL is "no", "qt", or "plugin"
1918 OPT="$VAL"
1919 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1920 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1922 # Grab the available values
1923 case "$VAR" in
1924 sql)
1925 avail="$CFG_SQL_AVAILABLE"
1927 gfx)
1928 avail="$CFG_GFX_AVAILABLE"
1929 if [ "$OPT" = "plugin" ]; then
1930 avail="$CFG_GFX_PLUGIN_AVAILABLE"
1933 decoration)
1934 avail="$CFG_DECORATION_AVAILABLE"
1935 if [ "$OPT" = "plugin" ]; then
1936 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
1939 kbd)
1940 avail="$CFG_KBD_AVAILABLE"
1941 if [ "$OPT" = "plugin" ]; then
1942 avail="$CFG_KBD_PLUGIN_AVAILABLE"
1945 mouse)
1946 avail="$CFG_MOUSE_AVAILABLE"
1947 if [ "$OPT" = "plugin" ]; then
1948 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
1952 avail=""
1953 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1955 esac
1957 # Check that that user's value is available.
1958 found=no
1959 for d in $avail; do
1960 if [ "$VAL" = "$d" ]; then
1961 found=yes
1962 break
1964 done
1965 [ "$found" = yes ] || ERROR=yes
1967 if [ "$VAR" = "sql" ]; then
1968 # set the CFG_SQL_driver
1969 eval "CFG_SQL_$VAL=\$OPT"
1970 continue
1973 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1974 if [ "$OPT" = "plugin" ]; then
1975 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
1976 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
1977 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
1978 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
1979 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
1980 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
1981 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
1982 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
1983 VAR="${VAR}-${OPT}"
1984 else
1985 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
1986 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
1987 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
1988 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
1989 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
1990 VAR="${VAR}-driver"
1993 QMakeVar add "${VAR}s" "${VAL}"
1994 elif [ "$OPT" = "no" ]; then
1995 PLUG_VAR="${VAR}-plugin"
1996 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
1997 IN_VAR="${VAR}-driver"
1998 else
1999 IN_VAR="${VAR}"
2001 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2002 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2003 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2004 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2005 QMakeVar del "${IN_VAR}s" "$VAL"
2006 QMakeVar del "${PLUG_VAR}s" "$VAL"
2008 if [ "$ERROR" = "yes" ]; then
2009 echo "$CURRENT_OPT: unknown argument"
2010 OPT_HELP=yes
2013 v|verbose)
2014 if [ "$VAL" = "yes" ]; then
2015 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2016 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2017 else
2018 OPT_VERBOSE=yes
2020 elif [ "$VAL" = "no" ]; then
2021 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2022 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2023 else
2024 OPT_VERBOSE=no
2026 else
2027 UNKNOWN_OPT=yes
2030 fast)
2031 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2032 OPT_FAST="$VAL"
2033 else
2034 UNKNOWN_OPT=yes
2037 rpath)
2038 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2039 CFG_RPATH="$VAL"
2040 else
2041 UNKNOWN_OPT=yes
2044 add_define)
2045 D_FLAGS="$D_FLAGS \"$VAL\""
2047 add_ipath)
2048 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2050 add_lpath)
2051 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2053 add_rpath)
2054 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2056 add_link)
2057 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2059 add_fpath)
2060 if [ "$PLATFORM_MAC" = "yes" ]; then
2061 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2062 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2063 else
2064 UNKNOWN_OPT=yes
2067 add_framework)
2068 if [ "$PLATFORM_MAC" = "yes" ]; then
2069 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2070 else
2071 UNKNOWN_OPT=yes
2074 silent)
2075 CFG_SILENT="$VAL"
2077 phonon)
2078 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2079 CFG_PHONON="$VAL"
2080 else
2081 UNKNOWN_OPT=yes
2084 phonon-backend)
2085 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2086 CFG_PHONON_BACKEND="$VAL"
2087 else
2088 UNKNOWN_OPT=yes
2091 multimedia)
2092 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2093 CFG_MULTIMEDIA="$VAL"
2094 else
2095 UNKNOWN_OPT=yes
2098 audio-backend)
2099 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2100 CFG_AUDIO_BACKEND="$VAL"
2101 else
2102 UNKNOWN_OPT=yes
2106 UNKNOWN_OPT=yes
2108 esac
2109 if [ "$UNKNOWN_OPT" = "yes" ]; then
2110 echo "${CURRENT_OPT}: invalid command-line switch"
2111 OPT_HELP=yes
2112 ERROR=yes
2114 done
2116 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2117 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2118 CFG_QT3SUPPORT="no"
2121 # update QT_CONFIG to show our current predefined configuration
2122 case "$CFG_QCONFIG" in
2123 minimal|small|medium|large|full)
2124 # these are a sequence of increasing functionality
2125 for c in minimal small medium large full; do
2126 QT_CONFIG="$QT_CONFIG $c-config"
2127 [ "$CFG_QCONFIG" = $c ] && break
2128 done
2131 # not known to be sufficient for anything
2132 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ]; then
2133 echo >&2 "Error: configuration file not found:"
2134 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2135 OPT_HELP=yes
2137 esac
2139 #-------------------------------------------------------------------------------
2140 # build tree initialization
2141 #-------------------------------------------------------------------------------
2143 # where to find which..
2144 unixtests="$relpath/config.tests/unix"
2145 mactests="$relpath/config.tests/mac"
2146 WHICH="$unixtests/which.test"
2148 PERL=`$WHICH perl 2>/dev/null`
2150 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2151 AWK=
2152 for e in gawk nawk awk; do
2153 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2154 AWK=$e
2155 break
2157 done
2159 # find perl
2160 PERL="/usr/bin/perl"
2161 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2162 PERL=`$WHICH perl`
2165 ### skip this if the user just needs help...
2166 if [ "$OPT_HELP" != "yes" ]; then
2168 # is this a shadow build?
2169 if [ "$OPT_SHADOW" = "maybe" ]; then
2170 OPT_SHADOW=no
2171 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2172 if [ -h "$outpath" ]; then
2173 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2174 else
2175 OPT_SHADOW=yes
2179 if [ "$OPT_SHADOW" = "yes" ]; then
2180 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2181 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2182 echo >&2 "Cannot proceed."
2183 exit 1
2185 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2188 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2189 echo
2190 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2191 echo "By default, Qt is built in release mode with separate debug information, so"
2192 echo "-debug-and-release is not necessary anymore"
2193 echo
2196 # detect build style
2197 if [ "$CFG_DEBUG" = "auto" ]; then
2198 if [ "$PLATFORM_MAC" = "yes" ]; then
2199 CFG_DEBUG_RELEASE=yes
2200 CFG_DEBUG=yes
2201 elif [ "$CFG_DEV" = "yes" ]; then
2202 CFG_DEBUG_RELEASE=no
2203 CFG_DEBUG=yes
2204 else
2205 CFG_DEBUG_RELEASE=no
2206 CFG_DEBUG=no
2209 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2210 QMAKE_CONFIG="$QMAKE_CONFIG build_all"
2213 if [ "$CFG_SILENT" = "yes" ]; then
2214 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2217 # if the source tree is different from the build tree,
2218 # symlink or copy part of the sources
2219 if [ "$OPT_SHADOW" = "yes" ]; then
2220 echo "Preparing build tree..."
2222 if [ -z "$PERL" ]; then
2223 echo
2224 echo "You need perl in your PATH to make a shadow build."
2225 echo "Cannot proceed."
2226 exit 1
2229 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2231 # symlink the qmake directory
2232 find "$relpath/qmake" | while read a; do
2233 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2234 if [ '!' -f "$my_a" ]; then
2235 if [ -d "$a" ]; then
2236 # directories are created...
2237 mkdir -p "$my_a"
2238 else
2239 a_dir=`dirname "$my_a"`
2240 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2241 # ... and files are symlinked
2242 case `basename "$a"` in
2243 *.o|*.d|GNUmakefile*|qmake)
2246 rm -f "$my_a"
2247 ln -s "$a" "$my_a"
2249 esac
2252 done
2254 # make a syncqt script that can be used in the shadow
2255 rm -f "$outpath/bin/syncqt"
2256 if [ -x "$relpath/bin/syncqt" ]; then
2257 mkdir -p "$outpath/bin"
2258 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2259 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
2260 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2261 chmod 755 "$outpath/bin/syncqt"
2264 # symlink the mkspecs directory
2265 mkdir -p "$outpath/mkspecs"
2266 rm -f "$outpath"/mkspecs/*
2267 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2268 rm -f "$outpath/mkspecs/default"
2270 # symlink the doc directory
2271 rm -rf "$outpath/doc"
2272 ln -s "$relpath/doc" "$outpath/doc"
2274 # make sure q3porting.xml can be found
2275 mkdir -p "$outpath/tools/porting/src"
2276 rm -f "$outpath/tools/porting/src/q3porting.xml"
2277 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2280 # symlink fonts to be able to run application from build directory
2281 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then
2282 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2283 mkdir -p "${outpath}/lib"
2284 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2288 if [ "$OPT_FAST" = "auto" ]; then
2289 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2290 OPT_FAST=yes
2291 else
2292 OPT_FAST=no
2296 # find a make command
2297 if [ -z "$MAKE" ]; then
2298 MAKE=
2299 for mk in gmake make; do
2300 if "$WHICH" $mk >/dev/null 2>&1; then
2301 MAKE=`"$WHICH" $mk`
2302 break
2304 done
2305 if [ -z "$MAKE" ]; then
2306 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2307 echo >&2 "Cannot proceed."
2308 exit 1
2310 # export MAKE, we need it later in the config.tests
2311 export MAKE
2314 fi ### help
2316 #-------------------------------------------------------------------------------
2317 # auto-detect all that hasn't been specified in the arguments
2318 #-------------------------------------------------------------------------------
2320 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2321 if [ "$CFG_EMBEDDED" != "no" ]; then
2322 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2323 Darwin:*)
2324 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2325 if [ -z "$XPLATFORM" ]; then
2326 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2327 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2330 FreeBSD:*)
2331 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2332 if [ -z "$XPLATFORM" ]; then
2333 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2334 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2337 SunOS:5*)
2338 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2339 if [ -z "$XPLATFORM" ]; then
2340 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2341 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2344 Linux:*)
2345 if [ -z "$PLATFORM" ]; then
2346 case "$UNAME_MACHINE" in
2347 *86)
2348 PLATFORM=qws/linux-x86-g++
2350 *86_64)
2351 PLATFORM=qws/linux-x86_64-g++
2354 PLATFORM=qws/linux-generic-g++
2356 esac
2358 if [ -z "$XPLATFORM" ]; then
2359 if [ "$CFG_EMBEDDED" = "auto" ]; then
2360 if [ -n "$CFG_ARCH" ]; then
2361 CFG_EMBEDDED=$CFG_ARCH
2362 else
2363 case "$UNAME_MACHINE" in
2364 *86)
2365 CFG_EMBEDDED=x86
2367 *86_64)
2368 CFG_EMBEDDED=x86_64
2371 CFG_EMBEDDED=generic
2373 esac
2376 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2379 QNX:*)
2380 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2381 if [ -z "$XPLATFORM" ]; then
2382 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2383 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2386 CYGWIN*:*)
2387 CFG_EMBEDDED=x86
2390 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2391 CFG_EMBEDDED=no
2392 PLATFORM_QWS=no
2394 esac
2396 if [ -z "$PLATFORM" ]; then
2397 PLATFORM_NOTES=
2398 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2399 Darwin:*)
2400 if [ "$PLATFORM_MAC" = "yes" ]; then
2401 PLATFORM=macx-g++
2402 # PLATFORM=macx-xcode
2403 else
2404 PLATFORM=darwin-g++
2407 AIX:*)
2408 #PLATFORM=aix-g++
2409 #PLATFORM=aix-g++-64
2410 PLATFORM=aix-xlc
2411 #PLATFORM=aix-xlc-64
2412 PLATFORM_NOTES="
2413 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2416 GNU:*)
2417 PLATFORM=hurd-g++
2419 dgux:*)
2420 PLATFORM=dgux-g++
2422 # DYNIX/ptx:4*)
2423 # PLATFORM=dynix-g++
2424 # ;;
2425 ULTRIX:*)
2426 PLATFORM=ultrix-g++
2428 FreeBSD:*)
2429 PLATFORM=freebsd-g++
2430 PLATFORM_NOTES="
2431 - Also available for FreeBSD: freebsd-icc
2434 OpenBSD:*)
2435 PLATFORM=openbsd-g++
2437 NetBSD:*)
2438 PLATFORM=netbsd-g++
2440 BSD/OS:*|BSD/386:*)
2441 PLATFORM=bsdi-g++
2443 IRIX*:*)
2444 #PLATFORM=irix-g++
2445 PLATFORM=irix-cc
2446 #PLATFORM=irix-cc-64
2447 PLATFORM_NOTES="
2448 - Also available for IRIX: irix-g++ irix-cc-64
2451 HP-UX:*)
2452 case "$UNAME_MACHINE" in
2453 ia64)
2454 #PLATFORM=hpuxi-acc-32
2455 PLATFORM=hpuxi-acc-64
2456 PLATFORM_NOTES="
2457 - Also available for HP-UXi: hpuxi-acc-32
2461 #PLATFORM=hpux-g++
2462 PLATFORM=hpux-acc
2463 #PLATFORM=hpux-acc-64
2464 #PLATFORM=hpux-cc
2465 #PLATFORM=hpux-acc-o64
2466 PLATFORM_NOTES="
2467 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2470 esac
2472 OSF1:*)
2473 #PLATFORM=tru64-g++
2474 PLATFORM=tru64-cxx
2475 PLATFORM_NOTES="
2476 - Also available for Tru64: tru64-g++
2479 Linux:*)
2480 case "$UNAME_MACHINE" in
2481 x86_64|s390x|ppc64)
2482 PLATFORM=linux-g++-64
2485 PLATFORM=linux-g++
2487 esac
2488 PLATFORM_NOTES="
2489 - Also available for Linux: linux-kcc linux-icc linux-cxx
2492 SunOS:5*)
2493 #PLATFORM=solaris-g++
2494 PLATFORM=solaris-cc
2495 #PLATFORM=solaris-cc64
2496 PLATFORM_NOTES="
2497 - Also available for Solaris: solaris-g++ solaris-cc-64
2500 ReliantUNIX-*:*|SINIX-*:*)
2501 PLATFORM=reliant-cds
2502 #PLATFORM=reliant-cds-64
2503 PLATFORM_NOTES="
2504 - Also available for Reliant UNIX: reliant-cds-64
2507 CYGWIN*:*)
2508 PLATFORM=cygwin-g++
2510 LynxOS*:*)
2511 PLATFORM=lynxos-g++
2513 OpenUNIX:*)
2514 #PLATFORM=unixware-g++
2515 PLATFORM=unixware-cc
2516 PLATFORM_NOTES="
2517 - Also available for OpenUNIX: unixware-g++
2520 UnixWare:*)
2521 #PLATFORM=unixware-g++
2522 PLATFORM=unixware-cc
2523 PLATFORM_NOTES="
2524 - Also available for UnixWare: unixware-g++
2527 SCO_SV:*)
2528 #PLATFORM=sco-g++
2529 PLATFORM=sco-cc
2530 PLATFORM_NOTES="
2531 - Also available for SCO OpenServer: sco-g++
2534 UNIX_SV:*)
2535 PLATFORM=unixware-g++
2537 QNX:*)
2538 PLATFORM=unsupported/qnx-g++
2541 if [ "$OPT_HELP" != "yes" ]; then
2542 echo
2543 for p in $PLATFORMS; do
2544 echo " $relconf $* -platform $p"
2545 done
2546 echo >&2
2547 echo " The build script does not currently recognize all" >&2
2548 echo " platforms supported by Qt." >&2
2549 echo " Rerun this script with a -platform option listed to" >&2
2550 echo " set the system/compiler combination you use." >&2
2551 echo >&2
2552 exit 2
2554 esac
2557 if [ "$PLATFORM_QWS" = "yes" ]; then
2558 CFG_SM=no
2559 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2560 else
2561 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2564 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2565 if [ -d "$PLATFORM" ]; then
2566 QMAKESPEC="$PLATFORM"
2567 else
2568 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2570 if [ -d "$XPLATFORM" ]; then
2571 XQMAKESPEC="$XPLATFORM"
2572 else
2573 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2575 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2576 QT_CROSS_COMPILE=yes
2577 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2580 if [ "$PLATFORM_MAC" = "yes" ]; then
2581 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2582 echo >&2
2583 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2584 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2585 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2586 echo " built with 'macx-g++'" >&2
2587 echo >&2
2588 exit 2
2592 # check specified platforms are supported
2593 if [ '!' -d "$QMAKESPEC" ]; then
2594 echo
2595 echo " The specified system/compiler is not supported:"
2596 echo
2597 echo " $QMAKESPEC"
2598 echo
2599 echo " Please see the README file for a complete list."
2600 echo
2601 exit 2
2603 if [ '!' -d "$XQMAKESPEC" ]; then
2604 echo
2605 echo " The specified system/compiler is not supported:"
2606 echo
2607 echo " $XQMAKESPEC"
2608 echo
2609 echo " Please see the README file for a complete list."
2610 echo
2611 exit 2
2613 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2614 echo
2615 echo " The specified system/compiler port is not complete:"
2616 echo
2617 echo " $XQMAKESPEC/qplatformdefs.h"
2618 echo
2619 echo " Please contact qt-bugs@trolltech.com."
2620 echo
2621 exit 2
2624 # now look at the configs and figure out what platform we are config'd for
2625 [ "$CFG_EMBEDDED" = "no" ] \
2626 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2627 && PLATFORM_X11=yes
2628 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2630 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2631 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2632 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2633 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2634 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2638 #-------------------------------------------------------------------------------
2639 # determine the system architecture
2640 #-------------------------------------------------------------------------------
2641 if [ "$OPT_VERBOSE" = "yes" ]; then
2642 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2645 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2646 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2647 echo ""
2648 echo "You have specified a target architecture with -embedded and -arch."
2649 echo "The two architectures you have specified are different, so we can"
2650 echo "not proceed. Either set both to be the same, or only use -embedded."
2651 echo ""
2652 exit 1
2656 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2657 case `basename "$XPLATFORM"` in
2658 qnx-* | vxworks-*)
2659 echo ""
2660 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2661 echo ""
2662 echo "Please contact qt-info@nokia.com to upgrade your license to"
2663 echo "include this platform, or install the Qt Open Source Edition"
2664 echo "if you intend to develop free software."
2665 exit 1
2667 esac
2670 if [ -z "${CFG_HOST_ARCH}" ]; then
2671 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2672 IRIX*:*:*)
2673 CFG_HOST_ARCH=`uname -p`
2674 if [ "$OPT_VERBOSE" = "yes" ]; then
2675 echo " SGI ($CFG_HOST_ARCH)"
2678 SunOS:5*:*)
2679 case "$UNAME_MACHINE" in
2680 sun4u*|sun4v*)
2681 if [ "$OPT_VERBOSE" = "yes" ]; then
2682 echo " Sun SPARC (sparc)"
2684 CFG_HOST_ARCH=sparc
2686 i86pc)
2687 case "$PLATFORM" in
2688 *-64)
2689 if [ "$OPT_VERBOSE" = "yes" ]; then
2690 echo " 64-bit AMD 80x86 (x86_64)"
2692 CFG_HOST_ARCH=x86_64
2695 if [ "$OPT_VERBOSE" = "yes" ]; then
2696 echo " 32-bit Intel 80x86 (i386)"
2698 CFG_HOST_ARCH=i386
2700 esac
2701 esac
2703 Darwin:*:*)
2704 case "$UNAME_MACHINE" in
2705 Power?Macintosh)
2706 if [ "$OPT_VERBOSE" = "yes" ]; then
2707 echo " 32-bit Apple PowerPC (powerpc)"
2710 x86)
2711 if [ "$OPT_VERBOSE" = "yes" ]; then
2712 echo " 32-bit Intel 80x86 (i386)"
2715 esac
2716 CFG_HOST_ARCH=macosx
2718 AIX:*:00????????00)
2719 if [ "$OPT_VERBOSE" = "yes" ]; then
2720 echo " 64-bit IBM PowerPC (powerpc)"
2722 CFG_HOST_ARCH=powerpc
2724 HP-UX:*:9000*)
2725 if [ "$OPT_VERBOSE" = "yes" ]; then
2726 echo " HP PA-RISC (parisc)"
2728 CFG_HOST_ARCH=parisc
2730 *:*:i?86)
2731 if [ "$OPT_VERBOSE" = "yes" ]; then
2732 echo " 32-bit Intel 80x86 (i386)"
2734 CFG_HOST_ARCH=i386
2736 *:*:x86_64|*:*:amd64)
2737 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2738 if [ "$OPT_VERBOSE" = "yes" ]; then
2739 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2741 CFG_HOST_ARCH=i386
2742 else
2743 if [ "$OPT_VERBOSE" = "yes" ]; then
2744 echo " 64-bit AMD 80x86 (x86_64)"
2746 CFG_HOST_ARCH=x86_64
2749 *:*:ppc)
2750 if [ "$OPT_VERBOSE" = "yes" ]; then
2751 echo " 32-bit PowerPC (powerpc)"
2753 CFG_HOST_ARCH=powerpc
2755 *:*:ppc64)
2756 if [ "$OPT_VERBOSE" = "yes" ]; then
2757 echo " 64-bit PowerPC (powerpc)"
2759 CFG_HOST_ARCH=powerpc
2761 *:*:s390*)
2762 if [ "$OPT_VERBOSE" = "yes" ]; then
2763 echo " IBM S/390 (s390)"
2765 CFG_HOST_ARCH=s390
2767 *:*:arm*)
2768 if [ "$OPT_VERBOSE" = "yes" ]; then
2769 echo " ARM (arm)"
2771 CFG_HOST_ARCH=arm
2773 Linux:*:sparc*)
2774 if [ "$OPT_VERBOSE" = "yes" ]; then
2775 echo " Linux on SPARC"
2777 CFG_HOST_ARCH=sparc
2779 QNX:*:*)
2780 case "$UNAME_MACHINE" in
2781 x86pc)
2782 if [ "$OPT_VERBOSE" = "yes" ]; then
2783 echo " QNX on Intel 80x86 (i386)"
2785 CFG_HOST_ARCH=i386
2787 esac
2789 *:*:*)
2790 if [ "$OPT_VERBOSE" = "yes" ]; then
2791 echo " Trying '$UNAME_MACHINE'..."
2793 CFG_HOST_ARCH="$UNAME_MACHINE"
2795 esac
2798 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2799 if [ -n "$CFG_ARCH" ]; then
2800 CFG_EMBEDDED=$CFG_ARCH
2803 case "$CFG_EMBEDDED" in
2804 x86)
2805 CFG_ARCH=i386
2807 x86_64)
2808 CFG_ARCH=x86_64
2810 ipaq|sharp)
2811 CFG_ARCH=arm
2813 dm7000)
2814 CFG_ARCH=powerpc
2816 dm800)
2817 CFG_ARCH=mips
2819 sh4al)
2820 CFG_ARCH=sh4a
2823 CFG_ARCH="$CFG_EMBEDDED"
2825 esac
2826 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2827 CFG_ARCH=$CFG_HOST_ARCH
2830 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
2831 if [ "$OPT_VERBOSE" = "yes" ]; then
2832 echo " '$CFG_ARCH' is supported"
2834 else
2835 if [ "$OPT_VERBOSE" = "yes" ]; then
2836 echo " '$CFG_ARCH' is unsupported, using 'generic'"
2838 CFG_ARCH=generic
2840 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
2841 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
2842 if [ "$OPT_VERBOSE" = "yes" ]; then
2843 echo " '$CFG_HOST_ARCH' is supported"
2845 else
2846 if [ "$OPT_VERBOSE" = "yes" ]; then
2847 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
2849 CFG_HOST_ARCH=generic
2853 if [ "$OPT_VERBOSE" = "yes" ]; then
2854 echo "System architecture: '$CFG_ARCH'"
2855 if [ "$PLATFORM_QWS" = "yes" ]; then
2856 echo "Host architecture: '$CFG_HOST_ARCH'"
2860 #-------------------------------------------------------------------------------
2861 # tests that don't need qmake (must be run before displaying help)
2862 #-------------------------------------------------------------------------------
2864 if [ -z "$PKG_CONFIG" ]; then
2865 # See if PKG_CONFIG is set in the mkspec:
2866 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
2868 if [ -z "$PKG_CONFIG" ]; then
2869 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2872 # Work out if we can use pkg-config
2873 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2874 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2875 echo >&2 ""
2876 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2877 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2878 echo >&2 "environment!"
2879 echo >&2 ""
2880 if [ -z "$PKG_CONFIG_PATH" ]; then
2881 echo >&2 ""
2882 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2883 echo >&2 "the host compiler's .pc files will be used. This is probably"
2884 echo >&2 "not what you want."
2885 echo >&2 ""
2886 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2887 echo >&2 ""
2888 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2889 echo >&2 "been set. This means your toolchain's .pc files must contain"
2890 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2891 echo >&2 "tests are failing, please check these files."
2892 echo >&2 ""
2894 else
2895 echo >&2 ""
2896 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2897 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2898 echo >&2 "dependencies"
2899 echo >&2 ""
2900 PKG_CONFIG=""
2904 # process CFG_MAC_ARCHS
2905 if [ "$PLATFORM_MAC" = "yes" ]; then
2906 # check -arch arguments for validity.
2907 ALLOWED="x86 ppc x86_64 ppc64 i386"
2908 # Save the list so we can re-write it using only valid values
2909 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
2910 CFG_MAC_ARCHS=
2911 for i in $CFG_MAC_ARCHS_IN
2913 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
2914 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
2915 exit 2;
2917 if [ "$i" = "i386" -o "$i" = "x86" ]; then
2918 # These are synonymous values
2919 # CFG_MAC_ARCHS requires x86 while GCC requires i386
2920 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
2921 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
2922 else
2923 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
2924 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
2926 done
2929 # pass on $CFG_SDK to the configure tests.
2930 if [ '!' -z "$CFG_SDK" ]; then
2931 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2934 # find the default framework value
2935 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2936 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2937 CFG_FRAMEWORK="$CFG_SHARED"
2938 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2939 echo
2940 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2941 echo
2942 CFG_FRAMEWORK="no"
2944 else
2945 CFG_FRAMEWORK=no
2948 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
2949 TEST_COMPILER="$CC"
2950 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
2951 if [ -z "$TEST_COMPILER" ]; then
2952 echo "ERROR: Cannot set the compiler for the configuration tests"
2953 exit 1
2956 # auto-detect precompiled header support
2957 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2958 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2959 CFG_PRECOMPILE=no
2960 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2961 CFG_PRECOMPILE=no
2962 else
2963 CFG_PRECOMPILE=yes
2965 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2966 echo
2967 echo "WARNING: Using universal binaries disables precompiled headers."
2968 echo
2969 CFG_PRECOMPILE=no
2972 #auto-detect DWARF2 on the mac
2973 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2974 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2975 CFG_MAC_DWARF2=no
2976 else
2977 CFG_MAC_DWARF2=yes
2981 # auto-detect support for -Xarch on the mac
2982 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
2983 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2984 CFG_MAC_XARCH=no
2985 else
2986 CFG_MAC_XARCH=yes
2990 # don't autodetect support for separate debug info on objcopy when
2991 # cross-compiling as lots of toolchains seems to have problems with this
2992 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2993 CFG_SEPARATE_DEBUG_INFO="no"
2996 # auto-detect support for separate debug info in objcopy
2997 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2998 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_].*=%%p' | tr '\n' ' '`
2999 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_].*=%%p' | tr '\n' ' '`
3000 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3001 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3002 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3003 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3004 CFG_SEPARATE_DEBUG_INFO=no
3005 else
3006 case "$PLATFORM" in
3007 hpux-*)
3008 # binutils on HP-UX is buggy; default to no.
3009 CFG_SEPARATE_DEBUG_INFO=no
3012 CFG_SEPARATE_DEBUG_INFO=yes
3014 esac
3018 # auto-detect -fvisibility support
3019 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3020 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3021 CFG_REDUCE_EXPORTS=no
3022 else
3023 CFG_REDUCE_EXPORTS=yes
3027 # detect the availability of the -Bsymbolic-functions linker optimization
3028 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3029 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3030 CFG_REDUCE_RELOCATIONS=no
3031 else
3032 CFG_REDUCE_RELOCATIONS=yes
3036 # auto-detect GNU make support
3037 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3038 CFG_USE_GNUMAKE=yes
3041 # If -opengl wasn't specified, don't try to auto-detect
3042 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3043 CFG_OPENGL=no
3046 # mac
3047 if [ "$PLATFORM_MAC" = "yes" ]; then
3048 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3049 CFG_OPENGL=desktop
3053 # find the default framework value
3054 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
3055 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3056 CFG_FRAMEWORK="$CFG_SHARED"
3057 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3058 echo
3059 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3060 echo
3061 CFG_FRAMEWORK="no"
3063 else
3064 CFG_FRAMEWORK=no
3067 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3068 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3069 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3070 # get the darwin version. 10.0.0 and up means snow leopard.
3071 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3072 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3073 echo
3074 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3075 echo
3079 # x11 tests are done after qmake is built
3082 #setup the build parts
3083 if [ -z "$CFG_BUILD_PARTS" ]; then
3084 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3086 # don't build tools by default when cross-compiling
3087 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3088 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3091 for nobuild in $CFG_NOBUILD_PARTS; do
3092 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3093 done
3094 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3095 # echo
3096 # echo "WARNING: libs is a required part of the build."
3097 # echo
3098 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3101 #-------------------------------------------------------------------------------
3102 # post process QT_INSTALL_* variables
3103 #-------------------------------------------------------------------------------
3105 #prefix
3106 if [ -z "$QT_INSTALL_PREFIX" ]; then
3107 if [ "$CFG_DEV" = "yes" ]; then
3108 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3109 elif [ "$PLATFORM_QWS" = "yes" ]; then
3110 QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
3111 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3112 QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
3114 else
3115 QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
3118 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3120 #docs
3121 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3122 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3123 if [ "$PLATFORM_MAC" = "yes" ]; then
3124 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3127 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3130 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3132 #headers
3133 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3134 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3135 if [ "$PLATFORM_MAC" = "yes" ]; then
3136 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3137 QT_INSTALL_HEADERS=
3141 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3144 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3146 #libs
3147 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3148 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3149 if [ "$PLATFORM_MAC" = "yes" ]; then
3150 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3151 QT_INSTALL_LIBS="/Libraries/Frameworks"
3155 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3157 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3159 #bins
3160 if [ -z "$QT_INSTALL_BINS" ]; then #default
3161 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3162 if [ "$PLATFORM_MAC" = "yes" ]; then
3163 QT_INSTALL_BINS="/Developer/Applications/Qt"
3166 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3169 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3171 #plugins
3172 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3173 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3174 if [ "$PLATFORM_MAC" = "yes" ]; then
3175 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3178 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3180 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3182 #data
3183 if [ -z "$QT_INSTALL_DATA" ]; then #default
3184 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3186 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3188 #translations
3189 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3190 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3192 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3194 #settings
3195 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3196 if [ "$PLATFORM_MAC" = "yes" ]; then
3197 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3198 else
3199 QT_INSTALL_SETTINGS=/etc/xdg
3202 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3204 #examples
3205 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3206 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3207 if [ "$PLATFORM_MAC" = "yes" ]; then
3208 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3211 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3213 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3215 #demos
3216 if [ -z "$QT_INSTALL_DEMOS" ]; then #default
3217 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3218 if [ "$PLATFORM_MAC" = "yes" ]; then
3219 QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos"
3222 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos"
3224 QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
3226 #-------------------------------------------------------------------------------
3227 # help - interactive parts of the script _after_ this section please
3228 #-------------------------------------------------------------------------------
3230 # next, emit a usage message if something failed.
3231 if [ "$OPT_HELP" = "yes" ]; then
3232 [ "x$ERROR" = "xyes" ] && echo
3233 if [ "$CFG_NIS" = "no" ]; then
3234 NSY=" "
3235 NSN="*"
3236 else
3237 NSY="*"
3238 NSN=" "
3240 if [ "$CFG_CUPS" = "no" ]; then
3241 CUY=" "
3242 CUN="*"
3243 else
3244 CUY="*"
3245 CUN=" "
3247 if [ "$CFG_ICONV" = "no" ]; then
3248 CIY=" "
3249 CIN="*"
3250 else
3251 CIY="*"
3252 CIN=" "
3254 if [ "$CFG_LARGEFILE" = "no" ]; then
3255 LFSY=" "
3256 LFSN="*"
3257 else
3258 LFSY="*"
3259 LFSN=" "
3261 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3262 SHY="*"
3263 SHN=" "
3264 else
3265 SHY=" "
3266 SHN="*"
3268 if [ "$CFG_IPV6" = "auto" ]; then
3269 I6Y="*"
3270 I6N=" "
3272 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3273 PHY=" "
3274 PHN="*"
3275 else
3276 PHY="*"
3277 PHN=" "
3280 cat <<EOF
3281 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3282 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
3283 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3284 [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
3285 [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3286 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3287 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3288 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3289 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3290 [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3291 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3292 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3293 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3294 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3295 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
3296 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3297 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3298 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3299 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3300 [-no-audio-backend] [-audio-backend] [-no-openssl] [-openssl] [-openssl-linked]
3301 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
3302 [-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative]
3304 [additional platform specific options (see below)]
3307 Installation options:
3309 These are optional, but you may specify install directories.
3311 -prefix <dir> ...... This will install everything relative to <dir>
3312 (default $QT_INSTALL_PREFIX)
3314 if [ "$PLATFORM_QWS" = "yes" ]; then
3315 cat <<EOF
3317 -hostprefix [dir] .. Tools and libraries needed when developing
3318 applications are installed in [dir]. If [dir] is
3319 not given, the current build directory will be used.
3322 cat <<EOF
3324 * -prefix-install .... Force a sandboxed "local" installation of
3325 Qt. This will install into
3326 $QT_INSTALL_PREFIX, if this option is
3327 disabled then some platforms will attempt a
3328 "system" install by placing default values to
3329 be placed in a system location other than
3330 PREFIX.
3332 You may use these to separate different parts of the install:
3334 -bindir <dir> ......... Executables will be installed to <dir>
3335 (default PREFIX/bin)
3336 -libdir <dir> ......... Libraries will be installed to <dir>
3337 (default PREFIX/lib)
3338 -docdir <dir> ......... Documentation will be installed to <dir>
3339 (default PREFIX/doc)
3340 -headerdir <dir> ...... Headers will be installed to <dir>
3341 (default PREFIX/include)
3342 -plugindir <dir> ...... Plugins will be installed to <dir>
3343 (default PREFIX/plugins)
3344 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3345 (default PREFIX)
3346 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3347 (default PREFIX/translations)
3348 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3349 (default PREFIX/etc/settings)
3350 -examplesdir <dir> .... Examples will be installed to <dir>
3351 (default PREFIX/examples)
3352 -demosdir <dir> ....... Demos will be installed to <dir>
3353 (default PREFIX/demos)
3355 You may use these options to turn on strict plugin loading.
3357 -buildkey <key> .... Build the Qt library and plugins using the specified
3358 <key>. When the library loads plugins, it will only
3359 load those that have a matching key.
3361 Configure options:
3363 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3364 that needs to be evaluated. If the evaluation succeeds, the feature is
3365 included. Here is a short explanation of each option:
3367 * -release ........... Compile and link Qt with debugging turned off.
3368 -debug ............. Compile and link Qt with debugging turned on.
3369 -debug-and-release . Compile and link two versions of Qt, with and without
3370 debugging turned on (Mac only).
3372 -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting)
3374 -opensource......... Compile and link the Open-Source Edition of Qt.
3375 -commercial......... Compile and link the Commercial Edition of Qt.
3378 * -shared ............ Create and use shared Qt libraries.
3379 -static ............ Create and use static Qt libraries.
3381 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3382 project files.
3383 -fast .............. Configure Qt quickly by generating Makefiles only for
3384 library and subdirectory targets. All other Makefiles
3385 are created as wrappers, which will in turn run qmake.
3387 -no-largefile ...... Disables large file support.
3388 + -largefile ......... Enables Qt to access files larger than 4 GB.
3391 if [ "$PLATFORM_QWS" = "yes" ]; then
3392 EXCN="*"
3393 EXCY=" "
3394 else
3395 EXCN=" "
3396 EXCY="*"
3398 if [ "$CFG_DBUS" = "no" ]; then
3399 DBY=" "
3400 DBN="+"
3401 else
3402 DBY="+"
3403 DBN=" "
3406 cat << EOF
3407 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3408 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3410 -no-accessibility .. Do not compile Accessibility support.
3411 * -accessibility ..... Compile Accessibility support.
3413 $SHN -no-stl ............ Do not compile STL support.
3414 $SHY -stl ............... Compile STL support.
3416 -no-sql-<driver> ... Disable SQL <driver> entirely.
3417 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3418 none are turned on.
3419 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3420 at run time.
3422 Possible values for <driver>:
3423 [ $CFG_SQL_AVAILABLE ]
3425 -system-sqlite ..... Use sqlite from the operating system.
3427 -no-qt3support ..... Disables the Qt 3 support functionality.
3428 * -qt3support ........ Enables the Qt 3 support functionality.
3430 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3431 + -xmlpatterns ....... Build the QtXmlPatterns module.
3432 QtXmlPatterns is built if a decent C++ compiler
3433 is used and exceptions are enabled.
3435 -no-multimedia ..... Do not build the QtMultimedia module.
3436 + -multimedia ........ Build the QtMultimedia module.
3438 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3439 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3441 -no-phonon ......... Do not build the Phonon module.
3442 + -phonon ............ Build the Phonon module.
3443 Phonon is built if a decent C++ compiler is used.
3444 -no-phonon-backend.. Do not build the platform phonon plugin.
3445 + -phonon-backend..... Build the platform phonon plugin.
3447 -no-svg ............ Do not build the SVG module.
3448 + -svg ............... Build the SVG module.
3450 -no-webkit ......... Do not build the WebKit module.
3451 + -webkit ............ Build the WebKit module.
3452 WebKit is built if a decent C++ compiler is used.
3454 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3455 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3457 -no-script ......... Do not build the QtScript module.
3458 + -script ............ Build the QtScript module.
3460 -no-scripttools .... Do not build the QtScriptTools module.
3461 + -scripttools ....... Build the QtScriptTools module.
3463 + -no-declarative .....Do not build the declarative module.
3464 -declarative ....... Build the declarative module.
3466 -platform target ... The operating system and compiler you are building
3467 on ($PLATFORM).
3469 See the README file for a list of supported
3470 operating systems and compilers.
3472 if [ "${PLATFORM_QWS}" != "yes" ]; then
3473 cat << EOF
3474 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3475 raster - Software rasterizer
3476 opengl - Rendering via OpenGL, Experimental!
3479 cat << EOF
3481 -no-mmx ............ Do not compile with use of MMX instructions.
3482 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3483 -no-sse ............ Do not compile with use of SSE instructions.
3484 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3486 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3487 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3489 -D <string> ........ Add an explicit define to the preprocessor.
3490 -I <string> ........ Add an explicit include path.
3491 -L <string> ........ Add an explicit library path.
3493 -help, -h .......... Display this information.
3495 Third Party Libraries:
3497 -qt-zlib ........... Use the zlib bundled with Qt.
3498 + -system-zlib ....... Use zlib from the operating system.
3499 See http://www.gzip.org/zlib
3501 -no-gif ............ Do not compile the plugin for GIF reading support.
3502 * -qt-gif ............ Compile the plugin for GIF reading support.
3503 See also src/plugins/imageformats/gif/qgifhandler.h
3505 -no-libtiff ........ Do not compile the plugin for TIFF support.
3506 -qt-libtiff ........ Use the libtiff bundled with Qt.
3507 + -system-libtiff .... Use libtiff from the operating system.
3508 See http://www.libtiff.org
3510 -no-libpng ......... Do not compile in PNG support.
3511 -qt-libpng ......... Use the libpng bundled with Qt.
3512 + -system-libpng ..... Use libpng from the operating system.
3513 See http://www.libpng.org/pub/png
3515 -no-libmng ......... Do not compile the plugin for MNG support.
3516 -qt-libmng ......... Use the libmng bundled with Qt.
3517 + -system-libmng ..... Use libmng from the operating system.
3518 See http://www.libmng.com
3520 -no-libjpeg ........ Do not compile the plugin for JPEG support.
3521 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3522 + -system-libjpeg .... Use libjpeg from the operating system.
3523 See http://www.ijg.org
3525 -no-openssl ........ Do not compile support for OpenSSL.
3526 + -openssl ........... Enable run-time OpenSSL support.
3527 -openssl-linked .... Enabled linked OpenSSL support.
3529 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3530 (Experimental.)
3532 Additional options:
3534 -make <part> ....... Add part to the list of parts to be built at make time.
3535 ($QT_DEFAULT_BUILD_PARTS)
3536 -nomake <part> ..... Exclude part from the list of parts to be built.
3538 -R <string> ........ Add an explicit runtime library path to the Qt
3539 libraries.
3540 -l <string> ........ Add an explicit library.
3542 -no-rpath .......... Do not use the library install path as a runtime
3543 library path.
3544 + -rpath ............. Link Qt libraries and executables using the library
3545 install path as a runtime library path. Equivalent
3546 to -R install_libpath
3548 -continue .......... Continue as far as possible if an error occurs.
3550 -verbose, -v ....... Print verbose information about each step of the
3551 configure process.
3553 -silent ............ Reduce the build output so that warnings and errors
3554 can be seen more easily.
3556 * -no-optimized-qmake ... Do not build qmake optimized.
3557 -optimized-qmake ...... Build qmake optimized.
3559 $NSN -no-nis ............ Do not compile NIS support.
3560 $NSY -nis ............... Compile NIS support.
3562 $CUN -no-cups ........... Do not compile CUPS support.
3563 $CUY -cups .............. Compile CUPS support.
3564 Requires cups/cups.h and libcups.so.2.
3566 $CIN -no-iconv .......... Do not compile support for iconv(3).
3567 $CIY -iconv ............. Compile support for iconv(3).
3569 $PHN -no-pch ............ Do not use precompiled header support.
3570 $PHY -pch ............... Use precompiled header support.
3572 $DBN -no-dbus ........... Do not compile the QtDBus module.
3573 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3574 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3576 -reduce-relocations ..... Reduce relocations in the libraries through extra
3577 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3578 experimental; needs GNU ld >= 2.18).
3581 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3582 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3583 SBY=""
3584 SBN="*"
3585 else
3586 SBY="*"
3587 SBN=" "
3589 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3590 SBY="*"
3591 SBN=" "
3592 else
3593 SBY=" "
3594 SBN="*"
3597 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
3599 cat << EOF
3601 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3602 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3606 fi # X11/QWS
3608 if [ "$PLATFORM_X11" = "yes" ]; then
3609 if [ "$CFG_SM" = "no" ]; then
3610 SMY=" "
3611 SMN="*"
3612 else
3613 SMY="*"
3614 SMN=" "
3616 if [ "$CFG_XSHAPE" = "no" ]; then
3617 SHY=" "
3618 SHN="*"
3619 else
3620 SHY="*"
3621 SHN=" "
3623 if [ "$CFG_XINERAMA" = "no" ]; then
3624 XAY=" "
3625 XAN="*"
3626 else
3627 XAY="*"
3628 XAN=" "
3630 if [ "$CFG_FONTCONFIG" = "no" ]; then
3631 FCGY=" "
3632 FCGN="*"
3633 else
3634 FCGY="*"
3635 FCGN=" "
3637 if [ "$CFG_XCURSOR" = "no" ]; then
3638 XCY=" "
3639 XCN="*"
3640 else
3641 XCY="*"
3642 XCN=" "
3644 if [ "$CFG_XFIXES" = "no" ]; then
3645 XFY=" "
3646 XFN="*"
3647 else
3648 XFY="*"
3649 XFN=" "
3651 if [ "$CFG_XRANDR" = "no" ]; then
3652 XZY=" "
3653 XZN="*"
3654 else
3655 XZY="*"
3656 XZN=" "
3658 if [ "$CFG_XRENDER" = "no" ]; then
3659 XRY=" "
3660 XRN="*"
3661 else
3662 XRY="*"
3663 XRN=" "
3665 if [ "$CFG_MITSHM" = "no" ]; then
3666 XMY=" "
3667 XMN="*"
3668 else
3669 XMY="*"
3670 XMN=" "
3672 if [ "$CFG_XINPUT" = "no" ]; then
3673 XIY=" "
3674 XIN="*"
3675 else
3676 XIY="*"
3677 XIN=" "
3679 if [ "$CFG_XKB" = "no" ]; then
3680 XKY=" "
3681 XKN="*"
3682 else
3683 XKY="*"
3684 XKN=" "
3686 if [ "$CFG_IM" = "no" ]; then
3687 IMY=" "
3688 IMN="*"
3689 else
3690 IMY="*"
3691 IMN=" "
3693 cat << EOF
3695 Qt/X11 only:
3697 -no-gtkstyle ....... Do not build the GTK theme integration.
3698 + -gtkstyle .......... Build the GTK theme integration.
3700 * -no-nas-sound ...... Do not compile in NAS sound support.
3701 -system-nas-sound .. Use NAS libaudio from the operating system.
3702 See http://radscan.com/nas.html
3704 -no-opengl ......... Do not support OpenGL.
3705 + -opengl <api> ...... Enable OpenGL support.
3706 With no parameter, this will auto-detect the "best"
3707 OpenGL API to use. If desktop OpenGL is available, it
3708 will be used. Use desktop, es1, es1cl or es2 for <api>
3709 to force the use of the Desktop (OpenGL 1.x or 2.x),
3710 OpenGL ES 1.x Common profile, 1.x Common Lite profile
3711 or 2.x APIs instead. On X11, the EGL API will be used
3712 to manage GL contexts in the case of OpenGL ES
3714 -no-openvg ........ Do not support OpenVG.
3715 + -openvg ........... Enable OpenVG support.
3716 Requires EGL support, typically supplied by an OpenGL
3717 or other graphics implementation.
3719 $SMN -no-sm ............. Do not support X Session Management.
3720 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3722 $SHN -no-xshape ......... Do not compile XShape support.
3723 $SHY -xshape ............ Compile XShape support.
3724 Requires X11/extensions/shape.h.
3726 $SHN -no-xsync .......... Do not compile XSync support.
3727 $SHY -xsync ............. Compile XSync support.
3728 Requires X11/extensions/sync.h.
3730 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3731 $XAY -xinerama .......... Compile Xinerama support.
3732 Requires X11/extensions/Xinerama.h and libXinerama.
3733 By default, Xinerama support will be compiled if
3734 available and the shared libraries are dynamically
3735 loaded at runtime.
3737 $XCN -no-xcursor ........ Do not compile Xcursor support.
3738 $XCY -xcursor ........... Compile Xcursor support.
3739 Requires X11/Xcursor/Xcursor.h and libXcursor.
3740 By default, Xcursor support will be compiled if
3741 available and the shared libraries are dynamically
3742 loaded at runtime.
3744 $XFN -no-xfixes ......... Do not compile Xfixes support.
3745 $XFY -xfixes ............ Compile Xfixes support.
3746 Requires X11/extensions/Xfixes.h and libXfixes.
3747 By default, Xfixes support will be compiled if
3748 available and the shared libraries are dynamically
3749 loaded at runtime.
3751 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3752 $XZY -xrandr ............ Compile Xrandr support.
3753 Requires X11/extensions/Xrandr.h and libXrandr.
3755 $XRN -no-xrender ........ Do not compile Xrender support.
3756 $XRY -xrender ........... Compile Xrender support.
3757 Requires X11/extensions/Xrender.h and libXrender.
3759 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3760 $XMY -mitshm ............ Compile MIT-SHM support.
3761 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3763 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3764 $FCGY -fontconfig ........ Compile FontConfig support.
3765 Requires fontconfig/fontconfig.h, libfontconfig,
3766 freetype.h and libfreetype.
3768 $XIN -no-xinput.......... Do not compile Xinput support.
3769 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3770 which requires IRIX with wacom.h and libXi or
3771 XFree86 with X11/extensions/XInput.h and libXi.
3773 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3774 $XKY -xkb ............... Compile XKB support.
3779 if [ "$PLATFORM_MAC" = "yes" ]; then
3780 cat << EOF
3782 Qt/Mac only:
3784 -Fstring ........... Add an explicit framework path.
3785 -fw string ......... Add an explicit framework.
3787 -cocoa ............. Build the Cocoa version of Qt. Note that -no-framework
3788 and -static is not supported with -cocoa. Specifying
3789 this option creates Qt binaries that requires Mac OS X
3790 10.5 or higher.
3792 * -framework ......... Build Qt as a series of frameworks and
3793 link tools against those frameworks.
3794 -no-framework ...... Do not build Qt as a series of frameworks.
3796 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3797 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3799 -universal ......... Equivalent to -arch "ppc x86"
3801 -arch <arch> ....... Build Qt for <arch>
3802 Example values for <arch>: x86 ppc x86_64 ppc64
3803 Multiple -arch arguments can be specified, 64-bit archs
3804 will be built with the Cocoa framework.
3806 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3807 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3812 if [ "$PLATFORM_QWS" = "yes" ]; then
3813 cat << EOF
3815 Qt for Embedded Linux only:
3817 -xplatform target ... The target platform when cross-compiling.
3819 -no-feature-<feature> Do not compile in <feature>.
3820 -feature-<feature> .. Compile in <feature>. The available features
3821 are described in src/corelib/global/qfeatures.txt
3823 -embedded <arch> .... This will enable the embedded build, you must have a
3824 proper license for this switch to work.
3825 Example values for <arch>: arm mips x86 generic
3827 -armfpa ............. Target platform uses the ARM-FPA floating point format.
3828 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3830 The floating point format is usually autodetected by configure. Use this
3831 to override the detected value.
3833 -little-endian ...... Target platform is little endian (LSB first).
3834 -big-endian ......... Target platform is big endian (MSB first).
3836 -host-little-endian . Host platform is little endian (LSB first).
3837 -host-big-endian .... Host platform is big endian (MSB first).
3839 You only need to specify the endianness when
3840 cross-compiling, otherwise the host
3841 endianness will be used.
3843 -no-freetype ........ Do not compile in Freetype2 support.
3844 -qt-freetype ........ Use the libfreetype bundled with Qt.
3845 * -system-freetype .... Use libfreetype from the operating system.
3846 See http://www.freetype.org/
3848 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3849 default ($CFG_QCONFIG).
3851 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3852 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3854 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3855 by default all available decorations are on.
3856 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3857 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3858 linked to at run time.
3859 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3860 -no-decoration-<style> ....Disable decoration <style> entirely.
3861 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3863 -no-opengl .......... Do not support OpenGL.
3864 -opengl <api> ....... Enable OpenGL ES support
3865 With no parameter, this will attempt to auto-detect OpenGL ES 1.x
3866 or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection.
3868 NOTE: A QGLScreen driver for the hardware is required to support
3869 OpenGL ES on Qt for Embedded Linux.
3871 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3872 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3873 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3874 linked to at run time.
3875 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3876 -no-gfx-<driver> ... Disable graphics <driver> entirely.
3877 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3879 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
3880 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3882 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
3883 at runtime.
3884 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
3886 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
3887 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3889 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
3890 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3891 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
3892 at runtime.
3893 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
3894 -no-mouse-<driver> ... Disable mouse <driver> entirely.
3895 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3897 -iwmmxt ............ Compile using the iWMMXt instruction set
3898 (available on some XScale CPUs).
3900 -no-neon ........... Do not compile with use of NEON instructions.
3905 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3906 if [ "$CFG_GLIB" = "no" ]; then
3907 GBY=" "
3908 GBN="+"
3909 else
3910 GBY="+"
3911 GBN=" "
3913 cat << EOF
3914 $GBN -no-glib ........... Do not compile Glib support.
3915 $GBY -glib .............. Compile Glib support.
3920 [ "x$ERROR" = "xyes" ] && exit 1
3921 exit 0
3922 fi # Help
3925 # -----------------------------------------------------------------------------
3926 # LICENSING, INTERACTIVE PART
3927 # -----------------------------------------------------------------------------
3929 if [ "$PLATFORM_QWS" = "yes" ]; then
3930 Platform="Qt for Embedded Linux"
3931 elif [ "$PLATFORM_MAC" = "yes" ]; then
3932 Platform="Qt for Mac OS X"
3933 else
3934 PLATFORM_X11=yes
3935 Platform="Qt for Linux/X11"
3938 echo
3939 echo "This is the $Platform ${EditionString} Edition."
3940 echo
3942 if [ "$Edition" = "NokiaInternalBuild" ]; then
3943 echo "Detected -nokia-developer option"
3944 echo "Nokia employees and agents are allowed to use this software under"
3945 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
3946 elif [ "$Edition" = "OpenSource" ]; then
3947 while true; do
3948 echo "You are licensed to use this software under the terms of"
3949 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3950 if [ -f "$relpath/LICENSE.GPL3" ]; then
3951 echo "You are also licensed to use this software under the terms of"
3952 echo "the GNU General Public License (GPL) versions 3."
3953 affix="either"
3954 else
3955 affix="the"
3957 echo
3958 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3959 echo "You have already accepted the terms of the $LicenseType license."
3960 acceptance=yes
3961 else
3962 if [ -f "$relpath/LICENSE.GPL3" ]; then
3963 echo "Type '3' to view the GNU General Public License version 3."
3965 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3966 echo "Type 'yes' to accept this license offer."
3967 echo "Type 'no' to decline this license offer."
3968 echo
3969 if echo '\c' | grep '\c' >/dev/null; then
3970 echo -n "Do you accept the terms of $affix license? "
3971 else
3972 echo "Do you accept the terms of $affix license? \c"
3974 read acceptance
3976 echo
3977 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3978 break
3979 elif [ "$acceptance" = "no" ]; then
3980 echo "You are not licensed to use this software."
3981 echo
3982 exit 1
3983 elif [ "$acceptance" = "3" ]; then
3984 more "$relpath/LICENSE.GPL3"
3985 elif [ "$acceptance" = "L" ]; then
3986 more "$relpath/LICENSE.LGPL"
3988 done
3989 elif [ "$Edition" = "Preview" ]; then
3990 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3991 while true; do
3993 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3994 echo "You have already accepted the terms of the $LicenseType license."
3995 acceptance=yes
3996 else
3997 echo "You are licensed to use this software under the terms of"
3998 echo "the $TheLicense"
3999 echo
4000 echo "Type '?' to read the Preview License."
4001 echo "Type 'yes' to accept this license offer."
4002 echo "Type 'no' to decline this license offer."
4003 echo
4004 if echo '\c' | grep '\c' >/dev/null; then
4005 echo -n "Do you accept the terms of the license? "
4006 else
4007 echo "Do you accept the terms of the license? \c"
4009 read acceptance
4011 echo
4012 if [ "$acceptance" = "yes" ]; then
4013 break
4014 elif [ "$acceptance" = "no" ] ;then
4015 echo "You are not licensed to use this software."
4016 echo
4017 exit 0
4018 elif [ "$acceptance" = "?" ]; then
4019 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4021 done
4022 elif [ "$Edition" != "OpenSource" ]; then
4023 if [ -n "$ExpiryDate" ]; then
4024 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4025 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4026 Today=`date +%Y%m%d`
4027 if [ "$Today" -gt "$ExpiryDate" ]; then
4028 case "$LicenseType" in
4029 Commercial|Academic|Educational)
4030 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4031 echo
4032 echo "NOTICE NOTICE NOTICE NOTICE"
4033 echo
4034 echo " Your support and upgrade period has expired."
4035 echo
4036 echo " You are no longer licensed to use this version of Qt."
4037 echo " Please contact qt-info@nokia.com to renew your support"
4038 echo " and upgrades for this license."
4039 echo
4040 echo "NOTICE NOTICE NOTICE NOTICE"
4041 echo
4042 exit 1
4043 else
4044 echo
4045 echo "WARNING WARNING WARNING WARNING"
4046 echo
4047 echo " Your support and upgrade period has expired."
4048 echo
4049 echo " You may continue to use your last licensed release"
4050 echo " of Qt under the terms of your existing license"
4051 echo " agreement. But you are not entitled to technical"
4052 echo " support, nor are you entitled to use any more recent"
4053 echo " Qt releases."
4054 echo
4055 echo " Please contact qt-info@nokia.com to renew your"
4056 echo " support and upgrades for this license."
4057 echo
4058 echo "WARNING WARNING WARNING WARNING"
4059 echo
4060 sleep 3
4063 Evaluation|*)
4064 echo
4065 echo "NOTICE NOTICE NOTICE NOTICE"
4066 echo
4067 echo " Your Evaluation license has expired."
4068 echo
4069 echo " You are no longer licensed to use this software. Please"
4070 echo " contact qt-info@nokia.com to purchase license, or install"
4071 echo " the Qt Open Source Edition if you intend to develop free"
4072 echo " software."
4073 echo
4074 echo "NOTICE NOTICE NOTICE NOTICE"
4075 echo
4076 exit 1
4078 esac
4081 TheLicense=`head -n 1 "$outpath/LICENSE"`
4082 while true; do
4083 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4084 echo "You have already accepted the terms of the $TheLicense."
4085 acceptance=yes
4086 else
4087 echo "You are licensed to use this software under the terms of"
4088 echo "the $TheLicense."
4089 echo
4090 echo "Type '?' to view the $TheLicense."
4091 echo "Type 'yes' to accept this license offer."
4092 echo "Type 'no' to decline this license offer."
4093 echo
4094 if echo '\c' | grep '\c' >/dev/null; then
4095 echo -n "Do you accept the terms of the $TheLicense? "
4096 else
4097 echo "Do you accept the terms of the $TheLicense? \c"
4099 read acceptance
4101 echo
4102 if [ "$acceptance" = "yes" ]; then
4103 break
4104 elif [ "$acceptance" = "no" ]; then
4105 echo "You are not licensed to use this software."
4106 echo
4107 exit 1
4108 else [ "$acceptance" = "?" ]
4109 more "$outpath/LICENSE"
4111 done
4114 # this should be moved somewhere else
4115 case "$PLATFORM" in
4116 aix-*)
4117 AIX_VERSION=`uname -v`
4118 if [ "$AIX_VERSION" -lt "5" ]; then
4119 QMakeVar add QMAKE_LIBS_X11 -lbind
4124 esac
4126 #-------------------------------------------------------------------------------
4127 # generate qconfig.cpp
4128 #-------------------------------------------------------------------------------
4129 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4131 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4132 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4133 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4134 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4135 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4136 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4137 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4138 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4139 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4140 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4141 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4142 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4143 DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4145 TODAY=`date +%Y-%m-%d`
4146 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4147 /* License Info */
4148 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4149 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4151 /* Installation date */
4152 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4156 if [ ! -z "$QT_HOST_PREFIX" ]; then
4157 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4158 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4159 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4160 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4161 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4162 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4163 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4164 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4165 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4166 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4167 HOSTDEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4169 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4171 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4172 /* Installation Info */
4173 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4174 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4175 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4176 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4177 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4178 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4179 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4180 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4181 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4182 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4183 static const char qt_configure_demos_path_str [256 + 12] = "$HOSTDEMOS_PATH_STR";
4184 #else // QT_BOOTSTRAPPED
4188 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4189 /* Installation Info */
4190 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4191 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4192 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4193 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4194 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4195 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4196 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4197 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4198 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4199 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4200 static const char qt_configure_demos_path_str [256 + 12] = "$DEMOS_PATH_STR";
4203 if [ ! -z "$QT_HOST_PREFIX" ]; then
4204 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4205 #endif // QT_BOOTSTRAPPED
4210 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4211 /* strlen( "qt_lcnsxxxx" ) == 12 */
4212 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4213 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4214 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4215 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4216 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4217 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4218 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4219 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4220 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4221 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4222 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4223 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4224 #define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;
4227 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4228 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4229 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4230 else
4231 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4232 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4233 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4236 # -----------------------------------------------------------------------------
4237 if [ "$LicenseType" = "Evaluation" ]; then
4238 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4239 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4240 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4243 if [ -n "$EVALKEY" ]; then
4244 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4245 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4246 /* Evaluation license key */
4247 static const char qt_eval_key_data [512 + 12] = "$EVALKEY";
4249 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4253 # -----------------------------------------------------------------------------
4254 # build qmake
4255 # -----------------------------------------------------------------------------
4257 # symlink includes
4258 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4259 SYNCQT_OPTS=
4260 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4261 if [ "$OPT_SHADOW" = "yes" ]; then
4262 "$outpath/bin/syncqt" $SYNCQT_OPTS
4263 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ]; then
4264 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS
4268 # $1: variable name
4269 # $2: optional transformation
4270 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4271 # is where the resulting variable is written to
4272 setBootstrapVariable()
4274 variableRegExp="^$1[^_A-Z0-9]"
4275 getQMakeConf | grep "$variableRegExp" | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4277 varLength = index($0, "=") - 1
4278 valStart = varLength + 2
4279 if (substr($0, varLength, 1) == "+") {
4280 varLength = varLength - 1
4281 valStart = valStart + 1
4283 var = substr($0, 0, varLength)
4284 gsub("[ \t]+", "", var)
4285 val = substr($0, valStart)
4286 printf "%s_%s = %s\n", var, NR, val
4288 END {
4289 if (length(var) > 0) {
4290 printf "%s =", var
4291 for (i = 1; i <= NR; ++i)
4292 printf " $(%s_%s)", var, i
4293 printf "\n"
4295 }' >> "$mkfile"
4298 # build qmake
4299 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4300 echo "Creating qmake. Please wait..."
4302 OLD_QCONFIG_H=
4303 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4304 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4305 if [ -f "$QCONFIG_H" ]; then
4306 OLD_QCONFIG_H=$QCONFIG_H
4307 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4310 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4311 # when building qmake, we use #defines for the install paths,
4312 # however they are real functions in the library
4313 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4314 mkdir -p "$outpath/src/corelib/global"
4315 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4316 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4319 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4320 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
4321 if [ '!' -f "$conf" ]; then
4322 ln -s "$QCONFIG_H" "$conf"
4324 done
4326 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4327 rm -f mkspecs/default
4328 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4329 # fix makefiles
4330 for mkfile in GNUmakefile Makefile; do
4331 EXTRA_LFLAGS=
4332 EXTRA_CFLAGS=
4333 in_mkfile="${mkfile}.in"
4334 if [ "$mkfile" = "Makefile" ]; then
4335 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4336 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4337 # fi
4338 in_mkfile="${mkfile}.unix"
4340 in_mkfile="$relpath/qmake/$in_mkfile"
4341 mkfile="$outpath/qmake/$mkfile"
4342 if [ -f "$mkfile" ]; then
4343 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4344 rm -f "$mkfile"
4346 [ -f "$in_mkfile" ] || continue
4348 echo "########################################################################" > "$mkfile"
4349 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4350 echo "########################################################################" >> "$mkfile"
4351 EXTRA_OBJS=
4352 EXTRA_SRCS=
4353 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4354 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4355 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4357 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4358 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4361 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4362 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4363 if [ "$CFG_SILENT" = "yes" ]; then
4364 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4365 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4366 else
4367 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4368 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4370 setBootstrapVariable QMAKE_CFLAGS
4371 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4372 setBootstrapVariable QMAKE_LFLAGS
4374 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4375 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4376 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4378 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4379 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4380 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4381 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4382 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4383 elif [ "$CFG_DEBUG" = "yes" ]; then
4384 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4385 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4386 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4387 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4390 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
4391 setBootstrapVariable QMAKE_RPATH 's,\$\$LITERAL_WHITESPACE, ,'
4392 for rpath in $RPATH_FLAGS; do
4393 EXTRA_LFLAGS="\$(QMAKE_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4394 done
4396 if [ "$PLATFORM_MAC" = "yes" ]; then
4397 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4398 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4399 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4400 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4401 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4402 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4403 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4404 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4405 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4406 X86_CFLAGS="-arch i386"
4407 X86_LFLAGS="-arch i386"
4408 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4409 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4410 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4412 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4413 PPC_CFLAGS="-arch ppc"
4414 PPC_LFLAGS="-arch ppc"
4415 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4416 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4417 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4419 if [ '!' -z "$CFG_SDK" ]; then
4420 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4421 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4422 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4423 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4424 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4427 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4428 if [ '!' -z "$D_FLAGS" ]; then
4429 for DEF in $D_FLAGS; do
4430 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4431 done
4433 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4434 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4435 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4436 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4437 echo >>"$mkfile"
4438 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4439 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4440 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4441 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4442 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4443 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4444 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4445 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4446 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4447 -e "s,@QMAKESPEC@,$adjqmakespec,g" "$in_mkfile" >>"$mkfile"
4449 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4450 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4451 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4452 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4453 rm "$mkfile.tmp"
4455 done
4457 QMAKE_BUILD_ERROR=no
4458 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4459 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4460 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4461 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4462 fi # Build qmake
4464 #-------------------------------------------------------------------------------
4465 # tests that need qmake
4466 #-------------------------------------------------------------------------------
4468 # detect availability of float math.h functions
4469 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4470 CFG_USE_FLOATMATH=yes
4471 else
4472 CFG_USE_FLOATMATH=no
4475 # detect mmx support
4476 if [ "${CFG_MMX}" = "auto" ]; then
4477 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4478 CFG_MMX=yes
4479 else
4480 CFG_MMX=no
4484 # detect 3dnow support
4485 if [ "${CFG_3DNOW}" = "auto" ]; then
4486 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4487 CFG_3DNOW=yes
4488 else
4489 CFG_3DNOW=no
4493 # detect sse support
4494 if [ "${CFG_SSE}" = "auto" ]; then
4495 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4496 CFG_SSE=yes
4497 else
4498 CFG_SSE=no
4502 # detect sse2 support
4503 if [ "${CFG_SSE2}" = "auto" ]; then
4504 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4505 CFG_SSE2=yes
4506 else
4507 CFG_SSE2=no
4511 # check iWMMXt support
4512 if [ "$CFG_IWMMXT" = "yes" ]; then
4513 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4514 if [ $? != "0" ]; then
4515 echo "The iWMMXt functionality test failed!"
4516 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4517 exit 1
4521 # detect neon support
4522 if ([ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]) && [ "${CFG_NEON}" = "auto" ]; then
4523 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/neon "neon" $L_FLAGS $I_FLAGS $l_FLAGS "-mfpu=neon"; then
4524 CFG_NEON=yes
4525 else
4526 CFG_NEON=no
4530 # detect zlib
4531 if [ "$CFG_ZLIB" = "no" ]; then
4532 # Note: Qt no longer support builds without zlib
4533 # So we force a "no" to be "auto" here.
4534 # If you REALLY really need no zlib support, you can still disable
4535 # it by doing the following:
4536 # add "no-zlib" to mkspecs/qconfig.pri
4537 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4539 # There's no guarantee that Qt will build under those conditions
4541 CFG_ZLIB=auto
4542 ZLIB_FORCED=yes
4544 if [ "$CFG_ZLIB" = "auto" ]; then
4545 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
4546 CFG_ZLIB=system
4547 else
4548 CFG_ZLIB=yes
4552 # detect how jpeg should be built
4553 if [ "$CFG_JPEG" = "auto" ]; then
4554 if [ "$CFG_SHARED" = "yes" ]; then
4555 CFG_JPEG=plugin
4556 else
4557 CFG_JPEG=yes
4560 # detect jpeg
4561 if [ "$CFG_LIBJPEG" = "auto" ]; then
4562 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
4563 CFG_LIBJPEG=system
4564 else
4565 CFG_LIBJPEG=qt
4569 # detect how gif should be built
4570 if [ "$CFG_GIF" = "auto" ]; then
4571 if [ "$CFG_SHARED" = "yes" ]; then
4572 CFG_GIF=plugin
4573 else
4574 CFG_GIF=yes
4578 # detect how tiff should be built
4579 if [ "$CFG_TIFF" = "auto" ]; then
4580 if [ "$CFG_SHARED" = "yes" ]; then
4581 CFG_TIFF=plugin
4582 else
4583 CFG_TIFF=yes
4587 # detect tiff
4588 if [ "$CFG_LIBTIFF" = "auto" ]; then
4589 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
4590 CFG_LIBTIFF=system
4591 else
4592 CFG_LIBTIFF=qt
4596 # detect how mng should be built
4597 if [ "$CFG_MNG" = "auto" ]; then
4598 if [ "$CFG_SHARED" = "yes" ]; then
4599 CFG_MNG=plugin
4600 else
4601 CFG_MNG=yes
4604 # detect mng
4605 if [ "$CFG_LIBMNG" = "auto" ]; then
4606 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
4607 CFG_LIBMNG=system
4608 else
4609 CFG_LIBMNG=qt
4613 # detect png
4614 if [ "$CFG_LIBPNG" = "auto" ]; then
4615 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
4616 CFG_LIBPNG=system
4617 else
4618 CFG_LIBPNG=qt
4622 # detect accessibility
4623 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4624 CFG_ACCESSIBILITY=yes
4627 # auto-detect SQL-modules support
4628 for _SQLDR in $CFG_SQL_AVAILABLE; do
4629 case $_SQLDR in
4630 mysql)
4631 if [ "$CFG_SQL_mysql" != "no" ]; then
4632 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4633 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4634 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4635 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4636 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4637 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4638 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4640 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4641 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4642 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4643 echo " You need MySql 4 or higher."
4644 echo " If you believe this message is in error you may use the continue"
4645 echo " switch (-continue) to $0 to continue."
4646 exit 101
4647 else
4648 CFG_SQL_mysql="no"
4649 QT_LFLAGS_MYSQL=""
4650 QT_LFLAGS_MYSQL_R=""
4651 QT_CFLAGS_MYSQL=""
4653 else
4654 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
4655 QMakeVar add CONFIG use_libmysqlclient_r
4656 if [ "$CFG_SQL_mysql" = "auto" ]; then
4657 CFG_SQL_mysql=plugin
4659 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4660 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
4661 if [ "$CFG_SQL_mysql" = "auto" ]; then
4662 CFG_SQL_mysql=plugin
4664 else
4665 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4666 echo "MySQL support cannot be enabled due to functionality tests!"
4667 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4668 echo " If you believe this message is in error you may use the continue"
4669 echo " switch (-continue) to $0 to continue."
4670 exit 101
4671 else
4672 CFG_SQL_mysql=no
4673 QT_LFLAGS_MYSQL=""
4674 QT_LFLAGS_MYSQL_R=""
4675 QT_CFLAGS_MYSQL=""
4681 psql)
4682 if [ "$CFG_SQL_psql" != "no" ]; then
4683 if "$WHICH" pg_config >/dev/null 2>&1; then
4684 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4685 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4687 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4688 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4689 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
4690 if [ "$CFG_SQL_psql" = "auto" ]; then
4691 CFG_SQL_psql=plugin
4693 else
4694 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4695 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4696 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4697 echo " If you believe this message is in error you may use the continue"
4698 echo " switch (-continue) to $0 to continue."
4699 exit 101
4700 else
4701 CFG_SQL_psql=no
4702 QT_CFLAGS_PSQL=""
4703 QT_LFLAGS_PSQL=""
4708 odbc)
4709 if [ "$CFG_SQL_odbc" != "no" ]; then
4710 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
4711 if [ "$CFG_SQL_odbc" = "auto" ]; then
4712 CFG_SQL_odbc=plugin
4714 else
4715 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
4716 QT_LFLAGS_ODBC="-liodbc"
4717 if [ "$CFG_SQL_odbc" = "auto" ]; then
4718 CFG_SQL_odbc=plugin
4720 else
4721 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4722 echo "ODBC support cannot be enabled due to functionality tests!"
4723 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4724 echo " If you believe this message is in error you may use the continue"
4725 echo " switch (-continue) to $0 to continue."
4726 exit 101
4727 else
4728 CFG_SQL_odbc=no
4734 oci)
4735 if [ "$CFG_SQL_oci" != "no" ]; then
4736 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
4737 if [ "$CFG_SQL_oci" = "auto" ]; then
4738 CFG_SQL_oci=plugin
4740 else
4741 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4742 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4743 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4744 echo " If you believe this message is in error you may use the continue"
4745 echo " switch (-continue) to $0 to continue."
4746 exit 101
4747 else
4748 CFG_SQL_oci=no
4753 tds)
4754 if [ "$CFG_SQL_tds" != "no" ]; then
4755 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
4756 if [ "$CFG_SQL_tds" = "auto" ]; then
4757 CFG_SQL_tds=plugin
4759 else
4760 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4761 echo "TDS support cannot be enabled due to functionality tests!"
4762 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4763 echo " If you believe this message is in error you may use the continue"
4764 echo " switch (-continue) to $0 to continue."
4765 exit 101
4766 else
4767 CFG_SQL_tds=no
4772 db2)
4773 if [ "$CFG_SQL_db2" != "no" ]; then
4774 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
4775 if [ "$CFG_SQL_db2" = "auto" ]; then
4776 CFG_SQL_db2=plugin
4778 else
4779 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4780 echo "ODBC support cannot be enabled due to functionality tests!"
4781 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4782 echo " If you believe this message is in error you may use the continue"
4783 echo " switch (-continue) to $0 to continue."
4784 exit 101
4785 else
4786 CFG_SQL_db2=no
4791 ibase)
4792 if [ "$CFG_SQL_ibase" != "no" ]; then
4793 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
4794 if [ "$CFG_SQL_ibase" = "auto" ]; then
4795 CFG_SQL_ibase=plugin
4797 else
4798 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4799 echo "InterBase support cannot be enabled due to functionality tests!"
4800 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4801 echo " If you believe this message is in error you may use the continue"
4802 echo " switch (-continue) to $0 to continue."
4803 exit 101
4804 else
4805 CFG_SQL_ibase=no
4810 sqlite2)
4811 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4812 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
4813 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4814 CFG_SQL_sqlite2=plugin
4816 else
4817 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4818 echo "SQLite2 support cannot be enabled due to functionality tests!"
4819 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4820 echo " If you believe this message is in error you may use the continue"
4821 echo " switch (-continue) to $0 to continue."
4822 exit 101
4823 else
4824 CFG_SQL_sqlite2=no
4829 sqlite)
4830 if [ "$CFG_SQL_sqlite" != "no" ]; then
4831 SQLITE_AUTODETECT_FAILED="no"
4832 if [ "$CFG_SQLITE" = "system" ]; then
4833 if [ -n "$PKG_CONFIG" ]; then
4834 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4835 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4837 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
4838 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4839 CFG_SQL_sqlite=plugin
4841 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4842 else
4843 SQLITE_AUTODETECT_FAILED="yes"
4844 CFG_SQL_sqlite=no
4846 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4847 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4848 CFG_SQL_sqlite=plugin
4850 else
4851 SQLITE_AUTODETECT_FAILED="yes"
4852 CFG_SQL_sqlite=no
4855 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4856 echo "SQLite support cannot be enabled due to functionality tests!"
4857 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4858 echo " If you believe this message is in error you may use the continue"
4859 echo " switch (-continue) to $0 to continue."
4860 exit 101
4865 if [ "$OPT_VERBOSE" = "yes" ]; then
4866 echo "unknown SQL driver: $_SQLDR"
4869 esac
4870 done
4872 # auto-detect NIS support
4873 if [ "$CFG_NIS" != "no" ]; then
4874 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
4875 CFG_NIS=yes
4876 else
4877 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4878 echo "NIS support cannot be enabled due to functionality tests!"
4879 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4880 echo " If you believe this message is in error you may use the continue"
4881 echo " switch (-continue) to $0 to continue."
4882 exit 101
4883 else
4884 CFG_NIS=no
4889 # auto-detect CUPS support
4890 if [ "$CFG_CUPS" != "no" ]; then
4891 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
4892 CFG_CUPS=yes
4893 else
4894 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4895 echo "Cups support cannot be enabled due to functionality tests!"
4896 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4897 echo " If you believe this message is in error you may use the continue"
4898 echo " switch (-continue) to $0 to continue."
4899 exit 101
4900 else
4901 CFG_CUPS=no
4906 # auto-detect iconv(3) support
4907 if [ "$CFG_ICONV" != "no" ]; then
4908 if [ "$PLATFORM_QWS" = "yes" ]; then
4909 CFG_ICONV=no
4910 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
4911 CFG_ICONV=yes
4912 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
4913 CFG_ICONV=gnu
4914 else
4915 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4916 echo "Iconv support cannot be enabled due to functionality tests!"
4917 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4918 echo " If you believe this message is in error you may use the continue"
4919 echo " switch (-continue) to $0 to continue."
4920 exit 101
4921 else
4922 CFG_ICONV=no
4927 # auto-detect libdbus-1 support
4928 if [ "$CFG_DBUS" != "no" ]; then
4929 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4930 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4931 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4933 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
4934 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4935 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4936 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4937 else
4938 if [ "$CFG_DBUS" = "auto" ]; then
4939 CFG_DBUS=no
4940 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4941 # CFG_DBUS is "yes" or "linked" here
4943 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4944 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4945 echo " If you believe this message is in error you may use the continue"
4946 echo " switch (-continue) to $0 to continue."
4947 exit 101
4952 # Generate a CRC of the namespace for using in constants for the Carbon port.
4953 # This should mean that you really *can* load two Qt's and have our custom
4954 # Carbon events work.
4955 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
4956 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`
4959 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
4961 # detect EGL support
4962 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
4963 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
4964 CFG_EGL=yes
4965 CFG_EGL_GLES_INCLUDES=no
4966 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
4967 # EGL specified by QMAKE_*_EGL, included with <GLES/egl.h>
4968 CFG_EGL=yes
4969 CFG_EGL_GLES_INCLUDES=yes
4971 if ( [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es1cl" ] || [ "$CFG_OPENGL" = "es2" ] ) && [ "$CFG_EGL" != "yes" ]; then
4972 echo "The EGL functionality test failed!"
4973 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
4974 echo " You might need to modify the include and library search paths by editing"
4975 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
4976 echo " ${XQMAKESPEC}."
4977 exit 1
4981 # auto-detect Glib support
4982 if [ "$CFG_GLIB" != "no" ]; then
4983 if [ -n "$PKG_CONFIG" ]; then
4984 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4985 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4987 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
4988 CFG_GLIB=yes
4989 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4990 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4991 else
4992 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4993 echo "Glib support cannot be enabled due to functionality tests!"
4994 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4995 echo " If you believe this message is in error you may use the continue"
4996 echo " switch (-continue) to $0 to continue."
4997 exit 101
4998 else
4999 CFG_GLIB=no
5004 if [ "$CFG_PHONON" != "no" ]; then
5005 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5006 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5007 if [ -n "$PKG_CONFIG" ]; then
5008 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5009 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5011 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
5012 CFG_GSTREAMER=yes
5013 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5014 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5015 else
5016 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5017 echo "Gstreamer support cannot be enabled due to functionality tests!"
5018 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5019 echo " If you believe this message is in error you may use the continue"
5020 echo " switch (-continue) to $0 to continue."
5021 exit 101
5022 else
5023 CFG_GSTREAMER=no
5026 elif [ "$CFG_GLIB" = "no" ]; then
5027 CFG_GSTREAMER=no
5030 if [ "$CFG_GSTREAMER" = "yes" ]; then
5031 CFG_PHONON=yes
5032 else
5033 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5034 echo "Phonon support cannot be enabled due to functionality tests!"
5035 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5036 echo " If you believe this message is in error you may use the continue"
5037 echo " switch (-continue) to $0 to continue."
5038 exit 101
5039 else
5040 CFG_PHONON=no
5043 else
5044 CFG_PHONON=yes
5047 fi # X11/QWS
5049 # x11
5050 if [ "$PLATFORM_X11" = "yes" ]; then
5051 x11tests="$relpath/config.tests/x11"
5052 X11TESTS_FLAGS=
5054 # work around broken X11 headers when using GCC 2.95 or later
5055 NOTYPE=no
5056 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5057 if [ $NOTYPE = "yes" ]; then
5058 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5059 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5062 # Check we actually have X11 :-)
5063 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5064 if [ $? != "0" ]; then
5065 echo "Basic XLib functionality test failed!"
5066 echo " You might need to modify the include and library search paths by editing"
5067 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5068 exit 1
5071 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5072 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5073 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
5074 CFG_OPENGL=desktop
5075 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
5076 CFG_OPENGL=es2
5077 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
5078 CFG_OPENGL=es1
5079 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
5080 CFG_OPENGL=es1cl
5081 else
5082 if [ "$CFG_OPENGL" = "yes" ]; then
5083 echo "All the OpenGL functionality tests failed!"
5084 echo " You might need to modify the include and library search paths by editing"
5085 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5086 echo " ${XQMAKESPEC}."
5087 exit 1
5089 CFG_OPENGL=no
5091 case "$PLATFORM" in
5092 hpux*)
5093 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5094 if [ "$CFG_OPENGL" = "desktop" ]; then
5095 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5096 if [ $? != "0" ]; then
5097 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5103 esac
5104 elif [ "$CFG_OPENGL" = "es1cl" ]; then
5105 # OpenGL ES 1.x common lite
5106 "$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
5107 if [ $? != "0" ]; then
5108 echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
5109 echo " You might need to modify the include and library search paths by editing"
5110 echo " QMAKE_INCDIR_OPENGL_ES1CL, QMAKE_LIBDIR_OPENGL_ES1CL and QMAKE_LIBS_OPENGL_ES1CL in"
5111 echo " ${XQMAKESPEC}."
5112 exit 1
5114 elif [ "$CFG_OPENGL" = "es1" ]; then
5115 # OpenGL ES 1.x
5116 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5117 if [ $? != "0" ]; then
5118 echo "The OpenGL ES 1.x functionality test failed!"
5119 echo " You might need to modify the include and library search paths by editing"
5120 echo " QMAKE_INCDIR_OPENGL_ES1, QMAKE_LIBDIR_OPENGL_ES1 and QMAKE_LIBS_OPENGL_ES1 in"
5121 echo " ${XQMAKESPEC}."
5122 exit 1
5124 elif [ "$CFG_OPENGL" = "es2" ]; then
5125 #OpenGL ES 2.x
5126 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5127 if [ $? != "0" ]; then
5128 echo "The OpenGL ES 2.0 functionality test failed!"
5129 echo " You might need to modify the include and library search paths by editing"
5130 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5131 echo " ${XQMAKESPEC}."
5132 exit 1
5134 elif [ "$CFG_OPENGL" = "desktop" ]; then
5135 # Desktop OpenGL support
5136 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5137 if [ $? != "0" ]; then
5138 echo "The OpenGL functionality test failed!"
5139 echo " You might need to modify the include and library search paths by editing"
5140 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5141 echo " ${XQMAKESPEC}."
5142 exit 1
5144 case "$PLATFORM" in
5145 hpux*)
5146 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5147 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5148 if [ $? != "0" ]; then
5149 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5154 esac
5157 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5158 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5159 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5160 CFG_GRAPHICS_SYSTEM=default
5163 # auto-detect Xcursor support
5164 if [ "$CFG_XCURSOR" != "no" ]; then
5165 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
5166 if [ "$CFG_XCURSOR" != "runtime" ]; then
5167 CFG_XCURSOR=yes;
5169 else
5170 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5171 echo "Xcursor support cannot be enabled due to functionality tests!"
5172 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5173 echo " If you believe this message is in error you may use the continue"
5174 echo " switch (-continue) to $0 to continue."
5175 exit 101
5176 else
5177 CFG_XCURSOR=no
5182 # auto-detect Xfixes support
5183 if [ "$CFG_XFIXES" != "no" ]; then
5184 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5185 if [ "$CFG_XFIXES" != "runtime" ]; then
5186 CFG_XFIXES=yes;
5188 else
5189 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5190 echo "Xfixes support cannot be enabled due to functionality tests!"
5191 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5192 echo " If you believe this message is in error you may use the continue"
5193 echo " switch (-continue) to $0 to continue."
5194 exit 101
5195 else
5196 CFG_XFIXES=no
5201 # auto-detect Xrandr support (resize and rotate extension)
5202 if [ "$CFG_XRANDR" != "no" ]; then
5203 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
5204 if [ "$CFG_XRANDR" != "runtime" ]; then
5205 CFG_XRANDR=yes
5207 else
5208 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5209 echo "Xrandr support cannot be enabled due to functionality tests!"
5210 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5211 echo " If you believe this message is in error you may use the continue"
5212 echo " switch (-continue) to $0 to continue."
5213 exit 101
5214 else
5215 CFG_XRANDR=no
5220 # auto-detect Xrender support
5221 if [ "$CFG_XRENDER" != "no" ]; then
5222 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
5223 CFG_XRENDER=yes
5224 else
5225 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5226 echo "Xrender support cannot be enabled due to functionality tests!"
5227 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5228 echo " If you believe this message is in error you may use the continue"
5229 echo " switch (-continue) to $0 to continue."
5230 exit 101
5231 else
5232 CFG_XRENDER=no
5237 # auto-detect MIT-SHM support
5238 if [ "$CFG_MITSHM" != "no" ]; then
5239 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
5240 CFG_MITSHM=yes
5241 else
5242 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5243 echo "MITSHM support cannot be enabled due to functionality tests!"
5244 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5245 echo " If you believe this message is in error you may use the continue"
5246 echo " switch (-continue) to $0 to continue."
5247 exit 101
5248 else
5249 CFG_MITSHM=no
5254 # auto-detect FontConfig support
5255 if [ "$CFG_FONTCONFIG" != "no" ]; then
5256 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5257 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5258 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5259 else
5260 QT_CFLAGS_FONTCONFIG=
5261 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5263 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
5264 CFG_FONTCONFIG=yes
5265 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5266 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5267 CFG_LIBFREETYPE=system
5268 else
5269 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5270 echo "FontConfig support cannot be enabled due to functionality tests!"
5271 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5272 echo " If you believe this message is in error you may use the continue"
5273 echo " switch (-continue) to $0 to continue."
5274 exit 101
5275 else
5276 CFG_FONTCONFIG=no
5281 # auto-detect Session Management support
5282 if [ "$CFG_SM" = "auto" ]; then
5283 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
5284 CFG_SM=yes
5285 else
5286 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5287 echo "Session Management support cannot be enabled due to functionality tests!"
5288 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5289 echo " If you believe this message is in error you may use the continue"
5290 echo " switch (-continue) to $0 to continue."
5291 exit 101
5292 else
5293 CFG_SM=no
5298 # auto-detect SHAPE support
5299 if [ "$CFG_XSHAPE" != "no" ]; then
5300 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
5301 CFG_XSHAPE=yes
5302 else
5303 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5304 echo "XShape support cannot be enabled due to functionality tests!"
5305 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5306 echo " If you believe this message is in error you may use the continue"
5307 echo " switch (-continue) to $0 to continue."
5308 exit 101
5309 else
5310 CFG_XSHAPE=no
5315 # auto-detect XSync support
5316 if [ "$CFG_XSYNC" != "no" ]; then
5317 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
5318 CFG_XSYNC=yes
5319 else
5320 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5321 echo "XSync support cannot be enabled due to functionality tests!"
5322 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5323 echo " If you believe this message is in error you may use the continue"
5324 echo " switch (-continue) to $0 to continue."
5325 exit 101
5326 else
5327 CFG_XSYNC=no
5332 # auto-detect Xinerama support
5333 if [ "$CFG_XINERAMA" != "no" ]; then
5334 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
5335 if [ "$CFG_XINERAMA" != "runtime" ]; then
5336 CFG_XINERAMA=yes
5338 else
5339 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5340 echo "Xinerama support cannot be enabled due to functionality tests!"
5341 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5342 echo " If you believe this message is in error you may use the continue"
5343 echo " switch (-continue) to $0 to continue."
5344 exit 101
5345 else
5346 CFG_XINERAMA=no
5351 # auto-detect Xinput support
5352 if [ "$CFG_XINPUT" != "no" ]; then
5353 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
5354 if [ "$CFG_XINPUT" != "runtime" ]; then
5355 CFG_XINPUT=yes
5357 else
5358 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5359 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5360 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5361 echo " If you believe this message is in error you may use the continue"
5362 echo " switch (-continue) to $0 to continue."
5363 exit 101
5364 else
5365 CFG_XINPUT=no
5370 # auto-detect XKB support
5371 if [ "$CFG_XKB" != "no" ]; then
5372 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
5373 CFG_XKB=yes
5374 else
5375 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5376 echo "XKB support cannot be enabled due to functionality tests!"
5377 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5378 echo " If you believe this message is in error you may use the continue"
5379 echo " switch (-continue) to $0 to continue."
5380 exit 101
5381 else
5382 CFG_XKB=no
5387 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5388 if [ -n "$PKG_CONFIG" ]; then
5389 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5390 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5392 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5393 CFG_QGTKSTYLE=yes
5394 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5395 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5396 else
5397 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5398 echo "Gtk theme support cannot be enabled due to functionality tests!"
5399 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5400 echo " If you believe this message is in error you may use the continue"
5401 echo " switch (-continue) to $0 to continue."
5402 exit 101
5403 else
5404 CFG_QGTKSTYLE=no
5407 elif [ "$CFG_GLIB" = "no" ]; then
5408 CFG_QGTKSTYLE=no
5410 fi # X11
5413 if [ "$PLATFORM_MAC" = "yes" ]; then
5414 if [ "$CFG_PHONON" != "no" ]; then
5415 # Always enable Phonon (unless it was explicitly disabled)
5416 CFG_PHONON=yes
5420 # QWS
5421 if [ "$PLATFORM_QWS" = "yes" ]; then
5423 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5424 if [ "$CFG_OPENGL" = "yes" ]; then
5425 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
5426 CFG_OPENGL=es2
5427 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
5428 CFG_OPENGL=es1
5429 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
5430 CFG_OPENGL=es1cl
5431 else
5432 echo "All the OpenGL ES functionality tests failed!"
5433 echo " You might need to modify the include and library search paths by editing"
5434 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5435 echo " ${XQMAKESPEC}."
5436 exit 1
5438 elif [ "$CFG_OPENGL" = "es1" ]; then
5439 # OpenGL ES 1.x
5440 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5441 if [ $? != "0" ]; then
5442 echo "The OpenGL ES 1.x functionality test failed!"
5443 echo " You might need to modify the include and library search paths by editing"
5444 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5445 echo " ${XQMAKESPEC}."
5446 exit 1
5448 elif [ "$CFG_OPENGL" = "es2" ]; then
5449 #OpenGL ES 2.x
5450 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5451 if [ $? != "0" ]; then
5452 echo "The OpenGL ES 2.0 functionality test failed!"
5453 echo " You might need to modify the include and library search paths by editing"
5454 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5455 echo " ${XQMAKESPEC}."
5456 exit 1
5458 elif [ "$CFG_OPENGL" = "desktop" ]; then
5459 # Desktop OpenGL support
5460 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5461 exit 1
5464 # screen drivers
5465 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5466 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5467 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
5468 if [ $? != "0" ]; then
5469 echo "The Ahi screen driver functionality test failed!"
5470 echo " You might need to modify the include and library search paths by editing"
5471 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5472 echo " ${XQMAKESPEC}."
5473 exit 1
5477 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5478 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
5479 if [ $? != "0" ]; then
5480 echo "The SVGAlib screen driver functionality test failed!"
5481 echo " You might need to modify the include and library search paths by editing"
5482 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5483 echo " ${XQMAKESPEC}."
5484 exit 1
5488 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5489 if [ -n "$PKG_CONFIG" ]; then
5490 if $PKG_CONFIG --exists directfb 2>/dev/null; then
5491 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5492 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
5493 elif directfb-config --version >/dev/null 2>&1; then
5494 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
5495 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
5499 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5500 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
5501 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
5502 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
5504 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5505 QMakeVar set QT_DEFINES_DIRECTFB "QT3_SUPPORT"
5508 "$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
5509 if [ $? != "0" ]; then
5510 echo "The DirectFB screen driver functionality test failed!"
5511 echo " You might need to modify the include and library search paths by editing"
5512 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5513 echo " ${XQMAKESPEC}."
5514 exit 1
5518 done
5520 # mouse drivers
5521 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5522 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5523 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
5524 if [ $? != "0" ]; then
5525 echo "The tslib functionality test failed!"
5526 echo " You might need to modify the include and library search paths by editing"
5527 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5528 echo " ${XQMAKESPEC}."
5529 exit 1
5532 done
5534 CFG_QGTKSTYLE=no
5536 # sound
5537 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
5538 if [ $? != "0" ]; then
5539 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
5542 fi # QWS
5544 # freetype support
5545 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
5546 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
5547 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5548 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
5549 CFG_LIBFREETYPE=system
5550 else
5551 CFG_LIBFREETYPE=yes
5555 if [ "$CFG_ENDIAN" = "auto" ]; then
5556 if [ "$PLATFORM_MAC" = "yes" ]; then
5557 true #leave as auto
5558 else
5559 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5560 F="$?"
5561 if [ "$F" -eq 0 ]; then
5562 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5563 elif [ "$F" -eq 1 ]; then
5564 CFG_ENDIAN="Q_BIG_ENDIAN"
5565 else
5566 echo
5567 echo "The target system byte order could not be detected!"
5568 echo "Turn on verbose messaging (-v) to see the final report."
5569 echo "You can use the -little-endian or -big-endian switch to"
5570 echo "$0 to continue."
5571 exit 101
5576 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5577 if [ "$PLATFORM_MAC" = "yes" ]; then
5578 true #leave as auto
5579 else
5580 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5581 F="$?"
5582 if [ "$F" -eq 0 ]; then
5583 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
5584 elif [ "$F" -eq 1 ]; then
5585 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
5586 else
5587 echo
5588 echo "The host system byte order could not be detected!"
5589 echo "Turn on verbose messaging (-v) to see the final report."
5590 echo "You can use the -host-little-endian or -host-big-endian switch to"
5591 echo "$0 to continue."
5592 exit 101
5597 if [ "$CFG_ARMFPA" != "auto" ]; then
5598 if [ "$CFG_ARMFPA" = "yes" ]; then
5599 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5600 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5601 else
5602 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
5604 else
5605 CFG_DOUBLEFORMAT="normal"
5610 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5611 if [ "$PLATFORM_QWS" != "yes" ]; then
5612 CFG_DOUBLEFORMAT=normal
5613 else
5614 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5615 F="$?"
5616 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5617 CFG_DOUBLEFORMAT=normal
5618 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
5619 CFG_DOUBLEFORMAT=normal
5620 elif [ "$F" -eq 10 ]; then
5621 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
5622 elif [ "$F" -eq 11 ]; then
5623 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
5624 elif [ "$F" -eq 12 ]; then
5625 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5626 CFG_ARMFPA="yes"
5627 elif [ "$F" -eq 13 ]; then
5628 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
5629 CFG_ARMFPA="yes"
5630 else
5631 echo
5632 echo "The system floating point format could not be detected."
5633 echo "This may cause data to be generated in a wrong format"
5634 echo "Turn on verbose messaging (-v) to see the final report."
5635 # we do not fail on this since this is a new test, and if it fails,
5636 # the old behavior should be correct in most cases
5637 CFG_DOUBLEFORMAT=normal
5642 HAVE_STL=no
5643 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5644 HAVE_STL=yes
5647 if [ "$CFG_STL" != "no" ]; then
5648 if [ "$HAVE_STL" = "yes" ]; then
5649 CFG_STL=yes
5650 else
5651 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5652 echo "STL support cannot be enabled due to functionality tests!"
5653 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5654 echo " If you believe this message is in error you may use the continue"
5655 echo " switch (-continue) to $0 to continue."
5656 exit 101
5657 else
5658 CFG_STL=no
5663 # find if the platform supports IPv6
5664 if [ "$CFG_IPV6" != "no" ]; then
5665 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
5666 CFG_IPV6=yes
5667 else
5668 if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5669 echo "IPv6 support cannot be enabled due to functionality tests!"
5670 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5671 echo " If you believe this message is in error you may use the continue"
5672 echo " switch (-continue) to $0 to continue."
5673 exit 101
5674 else
5675 CFG_IPV6=no
5680 # detect POSIX clock_gettime()
5681 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5682 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
5683 CFG_CLOCK_GETTIME=yes
5684 else
5685 CFG_CLOCK_GETTIME=no
5689 # detect POSIX monotonic clocks
5690 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5691 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
5692 CFG_CLOCK_MONOTONIC=yes
5693 else
5694 CFG_CLOCK_MONOTONIC=no
5696 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5697 CFG_CLOCK_MONOTONIC=no
5700 # detect mremap
5701 if [ "$CFG_MREMAP" = "auto" ]; then
5702 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5703 CFG_MREMAP=yes
5704 else
5705 CFG_MREMAP=no
5709 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5710 if [ "$CFG_GETADDRINFO" != "no" ]; then
5711 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5712 CFG_GETADDRINFO=yes
5713 else
5714 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5715 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5716 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5717 echo " If you believe this message is in error you may use the continue"
5718 echo " switch (-continue) to $0 to continue."
5719 exit 101
5720 else
5721 CFG_GETADDRINFO=no
5726 # find if the platform provides inotify
5727 if [ "$CFG_INOTIFY" != "no" ]; then
5728 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5729 CFG_INOTIFY=yes
5730 else
5731 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5732 echo "inotify support cannot be enabled due to functionality tests!"
5733 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5734 echo " If you believe this message is in error you may use the continue"
5735 echo " switch (-continue) to $0 to continue."
5736 exit 101
5737 else
5738 CFG_INOTIFY=no
5743 # find if the platform provides if_nametoindex (ipv6 interface name support)
5744 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5745 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
5746 CFG_IPV6IFNAME=yes
5747 else
5748 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5749 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5750 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5751 echo " If you believe this message is in error you may use the continue"
5752 echo " switch (-continue) to $0 to continue."
5753 exit 101
5754 else
5755 CFG_IPV6IFNAME=no
5760 # find if the platform provides getifaddrs (network interface enumeration)
5761 if [ "$CFG_GETIFADDRS" != "no" ]; then
5762 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5763 CFG_GETIFADDRS=yes
5764 else
5765 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5766 echo "getifaddrs support cannot be enabled due to functionality tests!"
5767 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5768 echo " If you believe this message is in error you may use the continue"
5769 echo " switch (-continue) to $0 to continue."
5770 exit 101
5771 else
5772 CFG_GETIFADDRS=no
5777 # find if the platform supports X/Open Large File compilation environment
5778 if [ "$CFG_LARGEFILE" != "no" ]; then
5779 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
5780 CFG_LARGEFILE=yes
5781 else
5782 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5783 echo "X/Open Large File support cannot be enabled due to functionality tests!"
5784 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5785 echo " If you believe this message is in error you may use the continue"
5786 echo " switch (-continue) to $0 to continue."
5787 exit 101
5788 else
5789 CFG_LARGEFILE=no
5794 # detect OpenSSL
5795 if [ "$CFG_OPENSSL" != "no" ]; then
5796 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
5797 if [ "$CFG_OPENSSL" = "auto" ]; then
5798 CFG_OPENSSL=yes
5800 else
5801 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5802 echo "OpenSSL support cannot be enabled due to functionality tests!"
5803 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5804 echo " If you believe this message is in error you may use the continue"
5805 echo " switch (-continue) to $0 to continue."
5806 exit 101
5807 else
5808 CFG_OPENSSL=no
5813 # detect OpenVG support
5814 if [ "$CFG_OPENVG" != "no" ]; then
5815 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
5816 if [ "$CFG_OPENVG" = "auto" ]; then
5817 CFG_OPENVG=yes
5819 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
5820 if [ "$CFG_OPENVG" = "auto" ]; then
5821 CFG_OPENVG=yes
5823 CFG_OPENVG_ON_OPENGL=yes
5824 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
5825 if [ "$CFG_OPENVG" = "auto" ]; then
5826 CFG_OPENVG=yes
5828 CFG_OPENVG_LC_INCLUDES=yes
5829 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
5830 if [ "$CFG_OPENVG" = "auto" ]; then
5831 CFG_OPENVG=yes
5833 CFG_OPENVG_LC_INCLUDES=yes
5834 CFG_OPENVG_ON_OPENGL=yes
5835 else
5836 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5837 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5838 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5839 echo " If you believe this message is in error you may use the continue"
5840 echo " switch (-continue) to $0 to continue."
5841 exit 101
5842 else
5843 CFG_OPENVG=no
5846 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
5847 CFG_OPENVG_SHIVA=yes
5851 # if openvg is disabled and the user specified graphicssystem vg, disable it...
5852 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
5853 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
5854 CFG_GRAPHICS_SYSTEM=default
5857 if [ "$CFG_PTMALLOC" != "no" ]; then
5858 # build ptmalloc, copy .a file to lib/
5859 echo "Building ptmalloc. Please wait..."
5860 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
5861 mkdir "$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
5863 QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
5866 if [ "$CFG_ALSA" = "auto" ]; then
5867 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5868 CFG_ALSA=yes
5869 else
5870 CFG_ALSA=no
5874 if [ -f "$relpath/src/declarative/declarative.pro" ]; then
5875 if [ "$CFG_DECLARATIVE" = "auto" ]; then
5876 CFG_DECLARATIVE=yes
5878 else
5879 if [ "$CFG_DECLARATIVE" = "auto" ] || [ "$CFG_DECLARATIVE" = "no" ]; then
5880 CFG_DECLARATIVE=no
5881 else
5882 echo "Error: Unable to locate the qt-declarative package. Refer to the documentation on how to build the package."
5883 exit 1
5887 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5888 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
5889 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5890 if [ $? != "0" ]; then
5891 CFG_JAVASCRIPTCORE_JIT=no
5896 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5897 QMakeVar set JAVASCRIPTCORE_JIT yes
5898 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5899 QMakeVar set JAVASCRIPTCORE_JIT no
5902 #-------------------------------------------------------------------------------
5903 # ask for all that hasn't been auto-detected or specified in the arguments
5904 #-------------------------------------------------------------------------------
5906 ### fix this: user input should be validated in a loop
5907 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PLATFORM_QWS" = "yes" ]; then
5908 echo
5909 echo "Choose pixel-depths to support:"
5910 echo
5911 echo " 1. 1bpp, black/white"
5912 echo " 4. 4bpp, grayscale"
5913 echo " 8. 8bpp, paletted"
5914 echo " 12. 12bpp, rgb 4-4-4"
5915 echo " 15. 15bpp, rgb 5-5-5"
5916 echo " 16. 16bpp, rgb 5-6-5"
5917 echo " 18. 18bpp, rgb 6-6-6"
5918 echo " 24. 24bpp, rgb 8-8-8"
5919 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
5920 echo " all. All supported depths"
5921 echo
5922 echo "Your choices (default 8,16,32):"
5923 read CFG_QWS_DEPTHS
5924 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
5925 CFG_QWS_DEPTHS=8,16,32
5928 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
5929 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
5930 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
5932 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
5933 case $D in
5934 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
5935 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
5936 esac
5937 done
5940 # enable dwarf2 support on Mac
5941 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5942 QT_CONFIG="$QT_CONFIG dwarf2"
5945 # Set the default arch.
5946 # Carbon builds: 32 bit x86/ppc.
5947 # For "-cocoa" builds on snow leopard : compiler default (64-bit).
5948 # For "-cocoa" builds on leopard : compiler default (32-bit).
5949 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
5950 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
5952 if [ "$CFG_MAC_COCOA" != "yes" ]; then
5953 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
5954 CFG_MAC_ARCHS=" x86"
5955 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
5956 CFG_MAC_ARCHS=" ppc"
5957 else
5958 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
5960 else
5961 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
5964 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
5967 # enable cocoa and/or carbon on Mac
5968 if [ "$CFG_MAC_COCOA" = "yes" ]; then
5969 # -cocoa on the command line disables carbon completely (i.e. use cocoa for 32-bit as well)
5970 CFG_MAC_CARBON="no"
5971 else
5972 # check which archs are in use, enable cocoa if we find a 64-bit one
5973 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
5974 CFG_MAC_COCOA="yes";
5975 CFG_MAC_CARBON="no";
5976 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
5977 CFG_MAC_CARBON="yes";
5979 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
5980 CFG_MAC_CARBON="yes";
5982 else
5983 # no 64-bit archs found.
5984 CFG_MAC_COCOA="no"
5988 # set the global Mac deployment target. This is overridden on an arch-by-arch basis
5989 # in some cases, see code further down
5990 case "$PLATFORM,$CFG_MAC_COCOA" in
5991 macx*,yes)
5992 # Cocoa
5993 QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5
5995 macx*,no)
5996 # gcc, Carbon
5997 QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4
5999 esac
6001 # disable Qt 3 support on VxWorks
6002 case "$XPLATFORM" in
6003 unsupported/vxworks*)
6004 CFG_QT3SUPPORT="no"
6006 esac
6008 # enable Qt 3 support functionality
6009 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
6010 QT_CONFIG="$QT_CONFIG qt3support"
6013 # enable Phonon
6014 if [ "$CFG_PHONON" = "yes" ]; then
6015 QT_CONFIG="$QT_CONFIG phonon"
6016 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6017 QT_CONFIG="$QT_CONFIG phonon-backend"
6019 else
6020 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6023 # disable accessibility
6024 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6025 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6026 else
6027 QT_CONFIG="$QT_CONFIG accessibility"
6030 # enable egl
6031 if [ "$CFG_EGL" = "no" ]; then
6032 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6033 else
6034 QT_CONFIG="$QT_CONFIG egl"
6035 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6036 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6040 # enable openvg
6041 if [ "$CFG_OPENVG" = "no" ]; then
6042 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6043 else
6044 QT_CONFIG="$QT_CONFIG openvg"
6045 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6046 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6048 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6049 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6051 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6052 QT_CONFIG="$QT_CONFIG shivavg"
6053 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6057 # enable opengl
6058 if [ "$CFG_OPENGL" = "no" ]; then
6059 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6060 else
6061 QT_CONFIG="$QT_CONFIG opengl"
6064 if [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es1cl" ] || [ "$CFG_OPENGL" = "es2" ]; then
6065 if [ "$PLATFORM_QWS" = "yes" ]; then
6066 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
6067 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_USE_EGLWINDOWSURFACE"
6069 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6072 if [ "$CFG_OPENGL" = "es1" ]; then
6073 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_1"
6074 QT_CONFIG="$QT_CONFIG opengles1"
6077 if [ "$CFG_OPENGL" = "es1cl" ]; then
6078 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_1_CL"
6079 QT_CONFIG="$QT_CONFIG opengles1cl"
6082 if [ "$CFG_OPENGL" = "es2" ]; then
6083 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6084 QT_CONFIG="$QT_CONFIG opengles2"
6087 # safe execution environment
6088 if [ "$CFG_SXE" != "no" ]; then
6089 QT_CONFIG="$QT_CONFIG sxe"
6092 # build up the variables for output
6093 if [ "$CFG_DEBUG" = "yes" ]; then
6094 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6095 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6096 elif [ "$CFG_DEBUG" = "no" ]; then
6097 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6098 QMAKE_CONFIG="$QMAKE_CONFIG release"
6100 if [ "$CFG_SHARED" = "yes" ]; then
6101 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6102 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6103 elif [ "$CFG_SHARED" = "no" ]; then
6104 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6105 QMAKE_CONFIG="$QMAKE_CONFIG static"
6107 if [ "$PLATFORM_QWS" = "yes" ]; then
6108 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6109 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6110 QT_CONFIG="$QT_CONFIG embedded"
6111 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6113 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6114 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6115 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6116 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6117 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6118 if [ "$CFG_LARGEFILE" = "yes" ]; then
6119 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6121 if [ "$CFG_STL" = "no" ]; then
6122 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6123 else
6124 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6126 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6127 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6129 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6130 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6131 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6132 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6133 QMakeVar add QMAKE_CFLAGS -g
6134 QMakeVar add QMAKE_CXXFLAGS -g
6135 QMAKE_CONFIG="$QMAKE_CONFIG separate_debug_info"
6137 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6138 QMAKE_CONFIG="$QMAKE_CONFIG separate_debug_info_nocopy"
6140 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6141 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6142 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6143 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6144 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6145 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6146 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6147 if [ "$CFG_IPV6" = "yes" ]; then
6148 QT_CONFIG="$QT_CONFIG ipv6"
6150 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6151 QT_CONFIG="$QT_CONFIG clock-gettime"
6153 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6154 QT_CONFIG="$QT_CONFIG clock-monotonic"
6156 if [ "$CFG_MREMAP" = "yes" ]; then
6157 QT_CONFIG="$QT_CONFIG mremap"
6159 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6160 QT_CONFIG="$QT_CONFIG getaddrinfo"
6162 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6163 QT_CONFIG="$QT_CONFIG ipv6ifname"
6165 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6166 QT_CONFIG="$QT_CONFIG getifaddrs"
6168 if [ "$CFG_INOTIFY" = "yes" ]; then
6169 QT_CONFIG="$QT_CONFIG inotify"
6171 if [ "$CFG_LIBJPEG" = "no" ]; then
6172 CFG_JPEG="no"
6173 elif [ "$CFG_LIBJPEG" = "system" ]; then
6174 QT_CONFIG="$QT_CONFIG system-jpeg"
6176 if [ "$CFG_JPEG" = "no" ]; then
6177 QT_CONFIG="$QT_CONFIG no-jpeg"
6178 elif [ "$CFG_JPEG" = "yes" ]; then
6179 QT_CONFIG="$QT_CONFIG jpeg"
6181 if [ "$CFG_LIBMNG" = "no" ]; then
6182 CFG_MNG="no"
6183 elif [ "$CFG_LIBMNG" = "system" ]; then
6184 QT_CONFIG="$QT_CONFIG system-mng"
6186 if [ "$CFG_MNG" = "no" ]; then
6187 QT_CONFIG="$QT_CONFIG no-mng"
6188 elif [ "$CFG_MNG" = "yes" ]; then
6189 QT_CONFIG="$QT_CONFIG mng"
6191 if [ "$CFG_LIBPNG" = "no" ]; then
6192 CFG_PNG="no"
6194 if [ "$CFG_LIBPNG" = "system" ]; then
6195 QT_CONFIG="$QT_CONFIG system-png"
6197 if [ "$CFG_PNG" = "no" ]; then
6198 QT_CONFIG="$QT_CONFIG no-png"
6199 elif [ "$CFG_PNG" = "yes" ]; then
6200 QT_CONFIG="$QT_CONFIG png"
6202 if [ "$CFG_GIF" = "no" ]; then
6203 QT_CONFIG="$QT_CONFIG no-gif"
6204 elif [ "$CFG_GIF" = "yes" ]; then
6205 QT_CONFIG="$QT_CONFIG gif"
6207 if [ "$CFG_LIBTIFF" = "no" ]; then
6208 CFG_TIFF="no"
6209 elif [ "$CFG_LIBTIFF" = "system" ]; then
6210 QT_CONFIG="$QT_CONFIG system-tiff"
6212 if [ "$CFG_TIFF" = "no" ]; then
6213 QT_CONFIG="$QT_CONFIG no-tiff"
6214 elif [ "$CFG_TIFF" = "yes" ]; then
6215 QT_CONFIG="$QT_CONFIG tiff"
6217 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6218 QT_CONFIG="$QT_CONFIG no-freetype"
6219 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6220 QT_CONFIG="$QT_CONFIG system-freetype"
6221 else
6222 QT_CONFIG="$QT_CONFIG freetype"
6225 if [ "x$PLATFORM_MAC" = "xyes" ]; then
6226 #On Mac we implicitly link against libz, so we
6227 #never use the 3rdparty stuff.
6228 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6230 if [ "$CFG_ZLIB" = "yes" ]; then
6231 QT_CONFIG="$QT_CONFIG zlib"
6232 elif [ "$CFG_ZLIB" = "system" ]; then
6233 QT_CONFIG="$QT_CONFIG system-zlib"
6236 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6237 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6238 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6239 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6240 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6241 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6242 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6243 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6244 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6245 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6246 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6248 if [ "$PLATFORM_X11" = "yes" ]; then
6249 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6251 # for some reason, the following libraries are not always built shared,
6252 # so *every* program/lib (including Qt) has to link against them
6253 if [ "$CFG_XSHAPE" = "yes" ]; then
6254 QT_CONFIG="$QT_CONFIG xshape"
6256 if [ "$CFG_XSYNC" = "yes" ]; then
6257 QT_CONFIG="$QT_CONFIG xsync"
6259 if [ "$CFG_XINERAMA" = "yes" ]; then
6260 QT_CONFIG="$QT_CONFIG xinerama"
6261 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6263 if [ "$CFG_XCURSOR" = "yes" ]; then
6264 QT_CONFIG="$QT_CONFIG xcursor"
6265 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6267 if [ "$CFG_XFIXES" = "yes" ]; then
6268 QT_CONFIG="$QT_CONFIG xfixes"
6269 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6271 if [ "$CFG_XRANDR" = "yes" ]; then
6272 QT_CONFIG="$QT_CONFIG xrandr"
6273 if [ "$CFG_XRENDER" != "yes" ]; then
6274 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6275 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6276 else
6277 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6280 if [ "$CFG_XRENDER" = "yes" ]; then
6281 QT_CONFIG="$QT_CONFIG xrender"
6282 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6284 if [ "$CFG_MITSHM" = "yes" ]; then
6285 QT_CONFIG="$QT_CONFIG mitshm"
6287 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6288 QT_CONFIG="$QT_CONFIG fontconfig"
6290 if [ "$CFG_XINPUT" = "yes" ]; then
6291 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6293 if [ "$CFG_XINPUT" = "yes" ]; then
6294 QT_CONFIG="$QT_CONFIG xinput tablet"
6296 if [ "$CFG_XKB" = "yes" ]; then
6297 QT_CONFIG="$QT_CONFIG xkb"
6301 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6302 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6303 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6305 if [ "$PLATFORM_MAC" = "yes" ]; then
6306 if [ "$CFG_RPATH" = "yes" ]; then
6307 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6309 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
6310 if [ -n "$RPATH_FLAGS" ]; then
6311 echo
6312 echo "ERROR: -R cannot be used on this platform as \$QMAKE_RPATH is"
6313 echo " undefined."
6314 echo
6315 exit 1
6316 elif [ "$CFG_RPATH" = "yes" ]; then
6317 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6318 CFG_RPATH=no
6320 else
6321 if [ "$CFG_RPATH" = "yes" ]; then
6322 # set the default rpath to the library installation directory
6323 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6325 if [ -n "$RPATH_FLAGS" ]; then
6326 # add the user defined rpaths
6327 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6331 if [ '!' -z "$I_FLAGS" ]; then
6332 # add the user define include paths
6333 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6334 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6337 # turn off exceptions for the compilers that support it
6338 if [ "$PLATFORM_QWS" = "yes" ]; then
6339 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
6340 else
6341 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6343 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6344 CFG_EXCEPTIONS=no
6347 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6348 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6351 if [ "$CFG_ALSA" = "yes" ]; then
6352 QT_CONFIG="$QT_CONFIG alsa"
6356 # Some Qt modules are too advanced in C++ for some old compilers
6357 # Detect here the platforms where they are known to work.
6359 # See Qt documentation for more information on which features are
6360 # supported and on which compilers.
6362 canBuildQtXmlPatterns="yes"
6363 canBuildWebKit="$HAVE_STL"
6364 canBuildQtConcurrent="yes"
6366 # WebKit requires stdint.h
6367 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
6368 if [ $? != "0" ]; then
6369 canBuildWebKit="no"
6372 case "$XPLATFORM" in
6373 hpux-g++*)
6374 # PA-RISC's assembly is too limited
6375 # gcc 3.4 on that platform can't build QtXmlPatterns
6376 # the assembly it generates cannot be compiled
6378 # Check gcc's version
6379 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6382 3.4*)
6383 canBuildQtXmlPatterns="no"
6386 canBuildWebKit="no"
6387 canBuildQtXmlPatterns="no"
6389 esac
6391 unsupported/vxworks-*-g++*)
6392 canBuildWebKit="no"
6394 unsupported/vxworks-*-dcc*)
6395 canBuildWebKit="no"
6396 canBuildQtXmlPatterns="no"
6398 *-g++*)
6399 # Check gcc's version
6400 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6401 4*|3.4*)
6403 3.3*)
6404 canBuildWebKit="no"
6407 canBuildWebKit="no"
6408 canBuildQtXmlPatterns="no"
6410 esac
6412 solaris-cc*)
6413 # Check the compiler version
6414 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6415 5.[012345678])
6416 canBuildWebKit="no"
6417 canBuildQtXmlPatterns="no"
6418 canBuildQtConcurrent="no"
6420 5.9)
6421 canBuildWebKit="no"
6422 canBuildQtConcurrent="no"
6424 esac
6426 hpux-acc*)
6427 canBuildWebKit="no"
6428 canBuildQtXmlPatterns="no"
6429 canBuildQtConcurrent="no"
6431 hpuxi-acc*)
6432 canBuildWebKit="no"
6434 aix-xlc*)
6435 # Get the xlC version
6436 cat > xlcver.c <<EOF
6437 #include <stdio.h>
6438 int main()
6440 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6441 return 0;
6444 xlcver=
6445 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6446 xlcver=`./xlcver 2>/dev/null`
6447 rm -f ./xlcver
6449 if [ "$OPT_VERBOSE" = "yes" ]; then
6450 if [ -n "$xlcver" ]; then
6451 echo Found IBM xlC version: $xlcver.
6452 else
6453 echo Could not determine IBM xlC version, assuming oldest supported.
6457 case "$xlcver" in
6458 [123456].*)
6459 canBuildWebKit="no"
6460 canBuildQtXmlPatterns="no"
6461 canBuildQtConcurrent="no"
6464 canBuildWebKit="no"
6465 canBuildQtConcurrent="no"
6467 esac
6469 irix-cc*)
6470 canBuildWebKit="no"
6471 canBuildQtConcurrent="no"
6473 esac
6475 CFG_CONCURRENT="yes"
6476 if [ "$canBuildQtConcurrent" = "no" ]; then
6477 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6478 CFG_CONCURRENT="no"
6481 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
6482 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
6483 exit 1
6485 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
6486 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
6487 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
6488 CFG_XMLPATTERNS="no"
6490 if [ "$CFG_XMLPATTERNS" = "yes" ]; then
6491 QT_CONFIG="$QT_CONFIG xmlpatterns"
6492 else
6493 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
6496 if [ "$CFG_MULTIMEDIA" = "no" ]; then
6497 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
6498 else
6499 QT_CONFIG="$QT_CONFIG multimedia"
6502 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6503 QT_CONFIG="$QT_CONFIG audio-backend"
6506 if [ "$CFG_SVG" = "yes" ]; then
6507 QT_CONFIG="$QT_CONFIG svg"
6508 else
6509 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
6512 if [ "$CFG_DECLARATIVE" = "yes" ]; then
6513 QT_CONFIG="$QT_CONFIG declarative"
6514 else
6515 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
6518 if [ "$CFG_WEBKIT" = "auto" ]; then
6519 CFG_WEBKIT="$canBuildWebKit"
6522 if [ "$CFG_WEBKIT" = "yes" ]; then
6523 QT_CONFIG="$QT_CONFIG webkit"
6524 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
6525 CFG_WEBKIT="yes"
6526 else
6527 CFG_WEBKIT="no"
6528 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WEBKIT"
6531 if [ "$CFG_SCRIPT" = "auto" ]; then
6532 CFG_SCRIPT="yes"
6535 if [ "$CFG_SCRIPT" = "yes" ]; then
6536 QT_CONFIG="$QT_CONFIG script"
6537 else
6538 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
6541 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
6542 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
6543 exit 1
6545 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
6546 CFG_SCRIPTTOOLS="yes"
6547 elif [ "$CFG_SCRIPT" = "no" ]; then
6548 CFG_SCRIPTTOOLS="no"
6551 if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
6552 QT_CONFIG="$QT_CONFIG scripttools"
6553 else
6554 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
6557 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6558 case "$COMPILER" in
6559 g++*)
6560 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6561 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6562 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6564 cc*)
6565 case "$PLATFORM" in
6566 irix-cc*)
6567 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6568 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6569 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6571 *) ;;
6572 esac
6574 *) ;;
6575 esac
6576 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6579 # On Mac, set the minimum deployment target for the different architechtures
6580 # using the Xarch compiler option when supported (10.5 and up). On 10.4 the
6581 # deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
6582 # env. variable. "-cocoa" on the command line means Cocoa is used in 32-bit mode also,
6583 # in this case fall back on QMAKE_MACOSX_DEPLOYMENT_TARGET which will be set to 10.5.
6584 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] && [ "$COMMANDLINE_MAC_COCOA" != "yes" ]; then
6585 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
6586 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
6587 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
6588 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
6589 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
6591 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
6592 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
6593 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
6594 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
6595 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
6597 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
6598 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
6599 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
6600 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
6601 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
6603 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
6604 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
6605 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
6606 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
6607 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
6611 #-------------------------------------------------------------------------------
6612 # generate QT_BUILD_KEY
6613 #-------------------------------------------------------------------------------
6615 # some compilers generate binary incompatible code between different versions,
6616 # so we need to generate a build key that is different between these compilers
6617 case "$COMPILER" in
6618 g++*)
6619 # GNU C++
6620 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6622 case "$COMPILER_VERSION" in
6623 *.*.*)
6624 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6625 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6626 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6628 *.*)
6629 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6630 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6631 QT_GCC_PATCH_VERSION=0
6633 esac
6635 case "$COMPILER_VERSION" in
6636 2.95.*)
6637 COMPILER_VERSION="2.95.*"
6639 3.*)
6640 COMPILER_VERSION="3.*"
6642 4.*)
6643 COMPILER_VERSION="4"
6647 esac
6648 [ '!' -z "$COMPILER_VERSION" ] && COMPILER="g++-${COMPILER_VERSION}"
6653 esac
6655 # QT_CONFIG can contain the following:
6657 # Things that affect the Qt API/ABI:
6659 # Options:
6660 # minimal-config small-config medium-config large-config full-config
6662 # Different edition modules:
6663 # network canvas table xml opengl sql
6665 # Things that do not affect the Qt API/ABI:
6666 # stl
6667 # system-jpeg no-jpeg jpeg
6668 # system-mng no-mng mng
6669 # system-png no-png png
6670 # system-zlib no-zlib zlib
6671 # system-libtiff no-libtiff
6672 # no-gif gif
6673 # debug release
6674 # dll staticlib
6676 # nocrosscompiler
6677 # GNUmake
6678 # largefile
6679 # nis
6680 # nas
6681 # tablet
6682 # ipv6
6684 # X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb
6685 # Embedded: embedded freetype
6687 ALL_OPTIONS=
6688 BUILD_CONFIG=
6689 BUILD_OPTIONS=
6691 # determine the build options
6692 for config_option in $QMAKE_CONFIG $QT_CONFIG; do
6693 SKIP="yes"
6694 case "$config_option" in
6695 *-config)
6696 # take the last *-config setting. this is the highest config being used,
6697 # and is the one that we will use for tagging plugins
6698 BUILD_CONFIG="$config_option"
6701 *) # skip all other options since they don't affect the Qt API/ABI.
6703 esac
6705 if [ "$SKIP" = "no" ]; then
6706 BUILD_OPTIONS="$BUILD_OPTIONS $config_option"
6708 done
6710 # put the options that we are missing into .options
6711 rm -f .options
6712 for opt in `echo $ALL_OPTIONS`; do
6713 SKIP="no"
6714 if echo $BUILD_OPTIONS | grep $opt >/dev/null 2>&1; then
6715 SKIP="yes"
6717 if [ "$SKIP" = "no" ]; then
6718 echo "$opt" >> .options
6720 done
6722 # reconstruct BUILD_OPTIONS with a sorted negative feature list
6723 # (ie. only things that are missing are will be put into the build key)
6724 BUILD_OPTIONS=
6725 if [ -f .options ]; then
6726 for opt in `sort -f .options | uniq`; do
6727 BUILD_OPTIONS="$BUILD_OPTIONS no-$opt"
6728 done
6730 rm -f .options
6732 # QT_NO* defines affect the Qt API (and binary compatibility). they need
6733 # to be included in the build key
6734 for build_option in $D_FLAGS; do
6735 build_option=`echo $build_option | cut -d \" -f 2 -`
6736 case "$build_option" in
6737 QT_NO*)
6738 echo "$build_option" >> .options
6741 # skip all other compiler defines
6743 esac
6744 done
6746 # sort the compile time defines (helps ensure that changes in this configure
6747 # script don't affect the QT_BUILD_KEY generation)
6748 if [ -f .options ]; then
6749 for opt in `sort -f .options | uniq`; do
6750 BUILD_OPTIONS="$BUILD_OPTIONS $opt"
6751 done
6753 rm -f .options
6755 BUILD_OPTIONS="$BUILD_CONFIG $BUILD_OPTIONS"
6756 # extract the operating system from the XPLATFORM
6757 TARGET_OPERATING_SYSTEM=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
6759 # when cross-compiling, don't include build-host information (build key is target specific)
6760 QT_BUILD_KEY="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6761 if [ -n "$QT_NAMESPACE" ]; then
6762 QT_BUILD_KEY="$QT_BUILD_KEY $QT_NAMESPACE"
6764 MAC_NEED_TWO_BUILD_KEYS="no"
6765 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
6766 QT_BUILD_KEY_CARBON=$QT_BUILD_KEY
6767 TARGET_OPERATING_SYSTEM="$TARGET_OPERATING_SYSTEM-cocoa"
6768 QT_BUILD_KEY_COCOA="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6769 if [ "$CFG_MAC_CARBON" = "no" ]; then
6770 QT_BUILD_KEY=$QT_BUILD_KEY_COCOA
6771 else
6772 MAC_NEED_TWO_BUILD_KEYS="yes"
6775 # don't break loading plugins build with an older version of Qt
6776 QT_BUILD_KEY_COMPAT=
6777 if [ "$QT_CROSS_COMPILE" = "no" ]; then
6778 # previous versions of Qt used a build key built from the uname
6779 QT_BUILD_KEY_COMPAT="$CFG_USER_BUILD_KEY $UNAME_MACHINE $UNAME_SYSTEM $COMPILER $BUILD_OPTIONS"
6780 if [ -n "$QT_NAMESPACE" ]; then
6781 QT_BUILD_KEY_COMPAT="$QT_BUILD_KEY_COMPAT $QT_NAMESPACE"
6784 # strip out leading/trailing/extra whitespace
6785 QT_BUILD_KEY=`echo $QT_BUILD_KEY | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6786 QT_BUILD_KEY_COMPAT=`echo $QT_BUILD_KEY_COMPAT | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6788 #-------------------------------------------------------------------------------
6789 # part of configuration information goes into qconfig.h
6790 #-------------------------------------------------------------------------------
6792 case "$CFG_QCONFIG" in
6793 full)
6794 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6797 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6798 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6799 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6800 echo "#endif" >>"$tmpconfig"
6802 esac
6804 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6806 /* Qt Edition */
6807 #ifndef QT_EDITION
6808 # define QT_EDITION $QT_EDITION
6809 #endif
6811 /* Machine byte-order */
6812 #define Q_BIG_ENDIAN 4321
6813 #define Q_LITTLE_ENDIAN 1234
6816 if [ "$MAC_NEED_TWO_BUILD_KEYS" = "no" ]; then
6817 echo "#define QT_BUILD_KEY \"$QT_BUILD_KEY\"" \
6818 >> "$outpath/src/corelib/global/qconfig.h.new"
6819 else
6820 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6822 #define QT_BUILD_KEY_CARBON "$QT_BUILD_KEY_CARBON"
6823 #define QT_BUILD_KEY_COCOA "$QT_BUILD_KEY_COCOA"
6827 if [ -n "$QT_BUILD_KEY_COMPAT" ]; then
6828 echo "#define QT_BUILD_KEY_COMPAT \"$QT_BUILD_KEY_COMPAT\"" \
6829 >> "$outpath/src/corelib/global/qconfig.h.new"
6831 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6833 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6834 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6835 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6836 #if defined(__BIG_ENDIAN__)
6837 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6838 #elif defined(__LITTLE_ENDIAN__)
6839 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6840 #else
6841 # error "Unable to determine byte order!"
6842 #endif
6844 else
6845 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6847 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6848 if [ "$CFG_ENDIAN" = "auto" ]; then
6849 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6850 #if defined(__BIG_ENDIAN__)
6851 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6852 #elif defined(__LITTLE_ENDIAN__)
6853 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6854 #else
6855 # error "Unable to determine byte order!"
6856 #endif
6858 else
6859 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6861 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6863 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6864 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6865 /* Non-IEEE double format */
6866 #define Q_DOUBLE_LITTLE "01234567"
6867 #define Q_DOUBLE_BIG "76543210"
6868 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6869 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6870 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6873 if [ "$CFG_ARMFPA" = "yes" ]; then
6874 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6875 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6876 #ifndef QT_BOOTSTRAPPED
6877 # define QT_ARMFPA
6878 #endif
6880 else
6881 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6885 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6886 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6887 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6888 /* Machine Architecture */
6889 #ifndef QT_BOOTSTRAPPED
6890 # define QT_ARCH_${CFG_ARCH_STR}
6891 #else
6892 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6893 #endif
6896 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6897 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6899 if [ "$CFG_LARGEFILE" = "yes" ]; then
6900 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6903 # if both carbon and cocoa are specified, enable the autodetection code.
6904 if [ "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
6905 echo "#define AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6906 elif [ "$CFG_MAC_COCOA" = "yes" ]; then
6907 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6910 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6911 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6914 if [ "$PLATFORM_MAC" = "yes" ]; then
6915 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6916 #if defined(__LP64__)
6917 # define QT_POINTER_SIZE 8
6918 #else
6919 # define QT_POINTER_SIZE 4
6920 #endif
6922 else
6923 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6924 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6928 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6930 if [ "$CFG_DEV" = "yes" ]; then
6931 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6934 # Embedded compile time options
6935 if [ "$PLATFORM_QWS" = "yes" ]; then
6936 # Add QWS to config.h
6937 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
6939 # Add excluded decorations to $QCONFIG_FLAGS
6940 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
6941 for decor in $decors; do
6942 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6943 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
6944 done
6946 # Figure which embedded drivers which are turned off
6947 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
6948 for ADRIVER in $CFG_GFX_ON; do
6949 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
6950 done
6952 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
6953 # the um driver is currently not in the available list for external builds
6954 if [ "$CFG_DEV" = "no" ]; then
6955 CFG_KBD_OFF="$CFG_KBD_OFF um"
6957 for ADRIVER in $CFG_KBD_ON; do
6958 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
6959 done
6961 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
6962 for ADRIVER in $CFG_MOUSE_ON; do
6963 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
6964 done
6966 for DRIVER in $CFG_GFX_OFF; do
6967 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6968 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
6969 done
6971 for DRIVER in $CFG_KBD_OFF; do
6972 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6973 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
6974 done
6976 for DRIVER in $CFG_MOUSE_OFF; do
6977 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6978 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
6979 done
6980 fi # QWS
6982 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6983 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6986 # Add turned on SQL drivers
6987 for DRIVER in $CFG_SQL_AVAILABLE; do
6988 eval "VAL=\$CFG_SQL_$DRIVER"
6989 case "$VAL" in
6991 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6992 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6993 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6995 plugin)
6996 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6998 esac
6999 done
7002 QMakeVar set sql-drivers "$SQL_DRIVERS"
7003 QMakeVar set sql-plugins "$SQL_PLUGINS"
7005 # Add other configuration options to the qconfig.h file
7006 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7007 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7008 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7009 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7010 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7011 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7012 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7013 [ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6"
7014 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7015 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7017 if [ "$PLATFORM_QWS" != "yes" ]; then
7018 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
7019 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
7020 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
7023 # X11/Unix/Mac only configs
7024 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7025 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7026 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7027 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7028 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7029 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7030 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7031 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7032 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7033 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7034 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7035 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7036 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7037 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
7038 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7040 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7041 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7042 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7043 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7044 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7045 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7046 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7047 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7048 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7049 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7050 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7051 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7053 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7054 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7055 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7056 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7057 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7058 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7060 # sort QCONFIG_FLAGS for neatness if we can
7061 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7062 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7064 if [ -n "$QCONFIG_FLAGS" ]; then
7065 for cfg in $QCONFIG_FLAGS; do
7066 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7067 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7068 # figure out define logic, so we can output the correct
7069 # ifdefs to override the global defines in a project
7070 cfgdNeg=
7071 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7072 # QT_NO_option can be forcefully turned on by QT_option
7073 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7074 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7075 # QT_option can be forcefully turned off by QT_NO_option
7076 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7079 if [ -z $cfgdNeg ]; then
7080 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7081 #ifndef $cfgd
7082 # define $cfg
7083 #endif
7086 else
7087 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7088 #if defined($cfgd) && defined($cfgdNeg)
7089 # undef $cfgd
7090 #elif !defined($cfgd) && !defined($cfgdNeg)
7091 # define $cfg
7092 #endif
7096 done
7099 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7100 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7101 #define QT_VISIBILITY_AVAILABLE
7106 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7107 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7108 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7109 else
7110 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7111 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7112 chmod -w "$outpath/src/corelib/global/qconfig.h"
7113 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7114 if [ '!' -f "$conf" ]; then
7115 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7117 done
7120 #-------------------------------------------------------------------------------
7121 # save configuration into qconfig.pri
7122 #-------------------------------------------------------------------------------
7124 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7125 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7126 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7127 if [ "$CFG_DEBUG" = "yes" ]; then
7128 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7129 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7130 QT_CONFIG="$QT_CONFIG release"
7132 QT_CONFIG="$QT_CONFIG debug"
7133 elif [ "$CFG_DEBUG" = "no" ]; then
7134 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7135 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7136 QT_CONFIG="$QT_CONFIG debug"
7138 QT_CONFIG="$QT_CONFIG release"
7140 if [ "$CFG_STL" = "yes" ]; then
7141 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7143 if [ "$CFG_FRAMEWORK" = "no" ]; then
7144 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7145 else
7146 QT_CONFIG="$QT_CONFIG qt_framework"
7147 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7149 if [ "$PLATFORM_MAC" = "yes" ]; then
7150 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
7152 if [ "$CFG_DEV" = "yes" ]; then
7153 QT_CONFIG="$QT_CONFIG private_tests"
7156 # Make the application arch follow the Qt arch for single arch builds.
7157 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7158 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7159 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7162 cat >>"$QTCONFIG.tmp" <<EOF
7163 #configuration
7164 CONFIG += $QTCONFIG_CONFIG
7165 QT_ARCH = $CFG_ARCH
7166 QT_EDITION = $Edition
7167 QT_CONFIG += $QT_CONFIG
7169 #versioning
7170 QT_VERSION = $QT_VERSION
7171 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7172 QT_MINOR_VERSION = $QT_MINOR_VERSION
7173 QT_PATCH_VERSION = $QT_PATCH_VERSION
7175 #namespaces
7176 QT_LIBINFIX = $QT_LIBINFIX
7177 QT_NAMESPACE = $QT_NAMESPACE
7178 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7181 if [ "$CFG_RPATH" = "yes" ]; then
7182 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7184 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7185 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7186 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7187 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7189 # replace qconfig.pri if it differs from the newly created temp file
7190 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7191 rm -f "$QTCONFIG.tmp"
7192 else
7193 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7196 #-------------------------------------------------------------------------------
7197 # save configuration into .qmake.cache
7198 #-------------------------------------------------------------------------------
7200 CACHEFILE="$outpath/.qmake.cache"
7201 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7202 cat >>"$CACHEFILE.tmp" <<EOF
7203 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
7204 QT_SOURCE_TREE = \$\$quote($relpath)
7205 QT_BUILD_TREE = \$\$quote($outpath)
7206 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7207 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7208 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7210 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7211 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7212 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7213 QMAKE_UIC3 = \$\$QT_BUILD_TREE/bin/uic3
7214 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7215 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
7216 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7217 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7221 # Ensure we can link to uninistalled libraries
7222 if linkerSupportsFlag -rpath-link "$outpath/lib"; then
7223 echo "QMAKE_LFLAGS += -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp"
7226 if [ -n "$QT_CFLAGS_PSQL" ]; then
7227 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp"
7229 if [ -n "$QT_LFLAGS_PSQL" ]; then
7230 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$CACHEFILE.tmp"
7232 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7233 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7235 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7236 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7238 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7239 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7241 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7242 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7244 if [ -n "$QT_LFLAGS_ODBC" ]; then
7245 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$CACHEFILE.tmp"
7248 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7249 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
7252 #dump in the OPENSSL_LIBS info
7253 if [ '!' -z "$OPENSSL_LIBS" ]; then
7254 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp"
7255 elif [ "$CFG_OPENSSL" = "linked" ]; then
7256 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$CACHEFILE.tmp"
7259 #dump in the SDK info
7260 if [ '!' -z "$CFG_SDK" ]; then
7261 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$CACHEFILE.tmp"
7264 # mac gcc -Xarch support
7265 if [ "$CFG_MAC_XARCH" = "no" ]; then
7266 echo "QMAKE_MAC_XARCH = no" >> "$CACHEFILE.tmp"
7269 #dump the qmake spec
7270 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7271 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7272 else
7273 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7276 # cmdline args
7277 cat "$QMAKE_VARS_FILE" >> "$CACHEFILE.tmp"
7278 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
7280 # incrementals
7281 INCREMENTAL=""
7282 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
7283 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7284 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
7285 # don't need to worry about generated files
7286 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7287 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
7288 # done
7289 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7290 done
7291 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7292 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7295 # replace .qmake.cache if it differs from the newly created temp file
7296 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7297 rm -f "$CACHEFILE.tmp"
7298 else
7299 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7302 #-------------------------------------------------------------------------------
7303 # give feedback on configuration
7304 #-------------------------------------------------------------------------------
7306 case "$COMPILER" in
7307 g++*)
7308 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7309 cat <<EOF
7311 This target is using the GNU C++ compiler ($PLATFORM).
7313 Recent versions of this compiler automatically include code for
7314 exceptions, which increase both the size of the Qt libraries and
7315 the amount of memory taken by your applications.
7317 You may choose to re-run `basename $0` with the -no-exceptions
7318 option to compile Qt without exceptions. This is completely binary
7319 compatible, and existing applications will continue to work.
7324 cc*)
7325 case "$PLATFORM" in
7326 irix-cc*)
7327 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7328 cat <<EOF
7330 This target is using the MIPSpro C++ compiler ($PLATFORM).
7332 You may choose to re-run `basename $0` with the -no-exceptions
7333 option to compile Qt without exceptions. This will make the
7334 size of the Qt library smaller and reduce the amount of memory
7335 taken by your applications.
7340 *) ;;
7341 esac
7343 *) ;;
7344 esac
7346 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7347 cat <<EOF
7348 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
7349 in debug mode will run out of memory on systems with 2GB or less.
7350 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
7351 -no-webkit or -release to skip webkit debug.
7355 echo
7356 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7357 echo "Build type: $PLATFORM"
7358 else
7359 echo "Building on: $PLATFORM"
7360 echo "Building for: $XPLATFORM"
7363 if [ "$PLATFORM_MAC" = "yes" ]; then
7364 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7365 else
7366 echo "Architecture: $CFG_ARCH"
7369 if [ "$PLATFORM_QWS" = "yes" ]; then
7370 echo "Host architecture: $CFG_HOST_ARCH"
7373 if [ "$PLATFORM_MAC" = "yes" ]; then
7374 if [ "$CFG_MAC_COCOA" = "yes" ]; then
7375 if [ "$CFG_MAC_CARBON" = "yes" ]; then
7376 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
7377 else
7378 echo "Using framework: Cocoa"
7380 else
7381 echo "Using framework: Carbon"
7385 if [ -n "$PLATFORM_NOTES" ]; then
7386 echo "Platform notes:"
7387 echo "$PLATFORM_NOTES"
7388 else
7389 echo
7392 if [ "$OPT_VERBOSE" = "yes" ]; then
7393 if echo '\c' | grep '\c' >/dev/null; then
7394 echo -n "qmake vars .......... "
7395 else
7396 echo "qmake vars .......... \c"
7398 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
7399 echo "qmake switches ...... $QMAKE_SWITCHES"
7402 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ......... $INCREMENTAL"
7403 echo "Build ............... $CFG_BUILD_PARTS"
7404 echo "Configuration ....... $QMAKE_CONFIG $QT_CONFIG"
7405 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7406 echo "Debug ............... yes (combined)"
7407 if [ "$CFG_DEBUG" = "yes" ]; then
7408 echo "Default Link ........ debug"
7409 else
7410 echo "Default Link ........ release"
7412 else
7413 echo "Debug ............... $CFG_DEBUG"
7415 echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
7416 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
7417 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
7418 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
7419 echo "QtConcurrent code.... $CFG_CONCURRENT"
7420 echo "QtScript module ..... $CFG_SCRIPT"
7421 echo "QtScriptTools module $CFG_SCRIPTTOOLS"
7422 echo "QtXmlPatterns module $CFG_XMLPATTERNS"
7423 echo "Phonon module ....... $CFG_PHONON"
7424 echo "Multimedia module ... $CFG_MULTIMEDIA"
7425 echo "SVG module .......... $CFG_SVG"
7426 echo "WebKit module ....... $CFG_WEBKIT"
7427 if [ "$CFG_WEBKIT" = "yes" ]; then
7428 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7429 echo "JavaScriptCore JIT .. To be decided by JavaScriptCore"
7430 else
7431 echo "JavaScriptCore JIT .. $CFG_JAVASCRIPTCORE_JIT"
7434 echo "Declarative module .. $CFG_DECLARATIVE"
7435 echo "STL support ......... $CFG_STL"
7436 echo "PCH support ......... $CFG_PRECOMPILE"
7437 echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
7438 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
7439 echo "iWMMXt support ...... ${CFG_IWMMXT}"
7440 echo "NEON support ........ ${CFG_NEON}"
7442 [ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
7443 echo "IPv6 support ........ $CFG_IPV6"
7444 echo "IPv6 ifname support . $CFG_IPV6IFNAME"
7445 echo "getaddrinfo support . $CFG_GETADDRINFO"
7446 echo "getifaddrs support .. $CFG_GETIFADDRS"
7447 echo "Accessibility ....... $CFG_ACCESSIBILITY"
7448 echo "NIS support ......... $CFG_NIS"
7449 echo "CUPS support ........ $CFG_CUPS"
7450 echo "Iconv support ....... $CFG_ICONV"
7451 echo "Glib support ........ $CFG_GLIB"
7452 echo "GStreamer support ... $CFG_GSTREAMER"
7453 echo "Large File support .. $CFG_LARGEFILE"
7454 echo "GIF support ......... $CFG_GIF"
7455 if [ "$CFG_TIFF" = "no" ]; then
7456 echo "TIFF support ........ $CFG_TIFF"
7457 else
7458 echo "TIFF support ........ $CFG_TIFF ($CFG_LIBTIFF)"
7460 if [ "$CFG_JPEG" = "no" ]; then
7461 echo "JPEG support ........ $CFG_JPEG"
7462 else
7463 echo "JPEG support ........ $CFG_JPEG ($CFG_LIBJPEG)"
7465 if [ "$CFG_PNG" = "no" ]; then
7466 echo "PNG support ......... $CFG_PNG"
7467 else
7468 echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
7470 if [ "$CFG_MNG" = "no" ]; then
7471 echo "MNG support ......... $CFG_MNG"
7472 else
7473 echo "MNG support ......... $CFG_MNG ($CFG_LIBMNG)"
7475 echo "zlib support ........ $CFG_ZLIB"
7476 echo "Session management .. $CFG_SM"
7477 if [ "$PLATFORM_QWS" = "yes" ]; then
7478 echo "Embedded support .... $CFG_EMBEDDED"
7479 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
7480 echo "Freetype2 support ... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
7481 else
7482 echo "Freetype2 support ... $CFG_QWS_FREETYPE"
7484 # Normalize the decoration output first
7485 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
7486 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
7487 echo "Graphics (qt) ....... ${CFG_GFX_ON}"
7488 echo "Graphics (plugin) ... ${CFG_GFX_PLUGIN}"
7489 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
7490 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
7491 echo "Decorations (qt) .... $CFG_DECORATION_ON"
7492 echo "Decorations (plugin) $CFG_DECORATION_PLUGIN"
7493 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
7494 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
7495 echo "Keyboard driver (qt). ${CFG_KBD_ON}"
7496 echo "Keyboard driver (plugin) ${CFG_KBD_PLUGIN}"
7497 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
7498 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
7499 echo "Mouse driver (qt) ... $CFG_MOUSE_ON"
7500 echo "Mouse driver (plugin) $CFG_MOUSE_PLUGIN"
7502 if [ "$CFG_OPENGL" = "desktop" ]; then
7503 echo "OpenGL support ...... yes (Desktop OpenGL)"
7504 elif [ "$CFG_OPENGL" = "es1" ]; then
7505 echo "OpenGL support ...... yes (OpenGL ES 1.x Common profile)"
7506 elif [ "$CFG_OPENGL" = "es1cl" ]; then
7507 echo "OpenGL support ...... yes (OpenGL ES 1.x Common Lite profile)"
7508 elif [ "$CFG_OPENGL" = "es2" ]; then
7509 echo "OpenGL support ...... yes (OpenGL ES 2.x)"
7510 else
7511 echo "OpenGL support ...... no"
7513 if [ "$CFG_EGL" != "no" ]; then
7514 if [ "$CFG_EGL_GLES_INCLUDES" != "no" ]; then
7515 echo "EGL support ......... yes <GLES/egl.h>"
7516 else
7517 echo "EGL support ......... yes <EGL/egl.h>"
7520 if [ "$CFG_OPENVG" ]; then
7521 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7522 echo "OpenVG support ...... ShivaVG"
7523 else
7524 echo "OpenVG support ...... $CFG_OPENVG"
7527 if [ "$PLATFORM_X11" = "yes" ]; then
7528 echo "NAS sound support ... $CFG_NAS"
7529 echo "XShape support ...... $CFG_XSHAPE"
7530 echo "XSync support ....... $CFG_XSYNC"
7531 echo "Xinerama support .... $CFG_XINERAMA"
7532 echo "Xcursor support ..... $CFG_XCURSOR"
7533 echo "Xfixes support ...... $CFG_XFIXES"
7534 echo "Xrandr support ...... $CFG_XRANDR"
7535 echo "Xrender support ..... $CFG_XRENDER"
7536 echo "Xi support .......... $CFG_XINPUT"
7537 echo "MIT-SHM support ..... $CFG_MITSHM"
7538 echo "FontConfig support .. $CFG_FONTCONFIG"
7539 echo "XKB Support ......... $CFG_XKB"
7540 echo "immodule support .... $CFG_IM"
7541 echo "GTK theme support ... $CFG_QGTKSTYLE"
7543 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support ....... $CFG_SQL_mysql"
7544 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support .. $CFG_SQL_psql"
7545 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........ $CFG_SQL_odbc"
7546 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ......... $CFG_SQL_oci"
7547 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ......... $CFG_SQL_tds"
7548 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ......... $CFG_SQL_db2"
7549 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ... $CFG_SQL_ibase"
7550 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support .... $CFG_SQL_sqlite2"
7551 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ...... $CFG_SQL_sqlite ($CFG_SQLITE)"
7553 OPENSSL_LINKAGE=""
7554 if [ "$CFG_OPENSSL" = "yes" ]; then
7555 OPENSSL_LINKAGE="(run-time)"
7556 elif [ "$CFG_OPENSSL" = "linked" ]; then
7557 OPENSSL_LINKAGE="(linked)"
7559 echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
7561 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
7563 # complain about not being able to use dynamic plugins if we are using a static build
7564 if [ "$CFG_SHARED" = "no" ]; then
7565 echo
7566 echo "WARNING: Using static linking will disable the use of dynamically"
7567 echo "loaded plugins. Make sure to import all needed static plugins,"
7568 echo "or compile needed modules into the library."
7569 echo
7571 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7572 echo
7573 echo "NOTE: When linking against OpenSSL, you can override the default"
7574 echo "library names through OPENSSL_LIBS."
7575 echo "For example:"
7576 echo " ./configure -openssl-linked OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto'"
7577 echo
7579 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7580 echo
7581 echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
7582 echo
7584 echo "alsa support ........ $CFG_ALSA"
7585 echo
7587 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7588 PROCS=1
7589 EXEC=""
7592 #-------------------------------------------------------------------------------
7593 # build makefiles based on the configuration
7594 #-------------------------------------------------------------------------------
7596 echo "Finding project files. Please wait..."
7597 "$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
7598 if [ -f "${relpath}/projects.pro" ]; then
7599 mkfile="${outpath}/Makefile"
7600 [ -f "$mkfile" ] && chmod +w "$mkfile"
7601 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro" -o "$mkfile"
7604 # .projects -> projects to process
7605 # .projects.1 -> qt and moc
7606 # .projects.2 -> subdirs and libs
7607 # .projects.3 -> the rest
7608 rm -f .projects .projects.1 .projects.2 .projects.3
7610 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7611 if [ -z "$AWK" ]; then
7612 for p in `echo $QMAKE_PROJECTS`; do
7613 echo "$p" >> .projects
7614 done
7615 else
7616 cat >projects.awk <<EOF
7617 BEGIN {
7618 files = 0
7619 target_file = ""
7620 input_file = ""
7622 first = "./.projects.1.tmp"
7623 second = "./.projects.2.tmp"
7624 third = "./.projects.3.tmp"
7627 FNR == 1 {
7628 if ( input_file ) {
7629 if ( ! target_file )
7630 target_file = third
7631 print input_file >target_file
7634 matched_target = 0
7635 template_lib = 0
7636 input_file = FILENAME
7637 target_file = ""
7640 /^(TARGET.*=)/ {
7641 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7642 target_file = first
7643 matched_target = 1
7644 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
7645 target_file = second
7646 matched_target = 1
7650 matched_target == 0 && /^(TEMPLATE.*=)/ {
7651 if ( \$3 == "subdirs" )
7652 target_file = second
7653 else if ( \$3 == "lib" )
7654 template_lib = 1
7655 else
7656 target_file = third
7659 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7660 if ( \$0 ~ /plugin/ )
7661 target_file = third
7662 else
7663 target_file = second
7666 END {
7667 if ( input_file ) {
7668 if ( ! target_file )
7669 target_file = third
7670 print input_file >>target_file
7676 rm -f .projects.all
7677 for p in `echo $QMAKE_PROJECTS`; do
7678 echo "$p" >> .projects.all
7679 done
7681 # if you get errors about the length of the command line to awk, change the -l arg
7682 # to split below
7683 split -l 100 .projects.all .projects.all.
7684 for p in .projects.all.*; do
7685 "$AWK" -f projects.awk `cat $p`
7686 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
7687 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
7688 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
7689 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
7690 done
7691 rm -f .projects.all* projects.awk
7693 [ -f .projects.1 ] && cat .projects.1 >>.projects
7694 [ -f .projects.2 ] && cat .projects.2 >>.projects
7695 rm -f .projects.1 .projects.2
7696 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
7697 cat .projects.3 >>.projects
7698 rm -f .projects.3
7701 # don't sort Qt and MOC in with the other project files
7702 # also work around a segfaulting uniq(1)
7703 if [ -f .sorted.projects.2 ]; then
7704 sort .sorted.projects.2 > .sorted.projects.2.new
7705 mv -f .sorted.projects.2.new .sorted.projects.2
7706 cat .sorted.projects.2 >> .sorted.projects.1
7708 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
7709 rm -f .sorted.projects.2 .sorted.projects.1
7711 NORM_PROJECTS=0
7712 FAST_PROJECTS=0
7713 if [ -f .projects ]; then
7714 uniq .projects >.tmp
7715 mv -f .tmp .projects
7716 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
7718 if [ -f .projects.3 ]; then
7719 uniq .projects.3 >.tmp
7720 mv -f .tmp .projects.3
7721 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7723 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7724 echo
7726 PART_ROOTS=
7727 for part in $CFG_BUILD_PARTS; do
7728 case "$part" in
7729 tools) PART_ROOTS="$PART_ROOTS tools" ;;
7730 libs) PART_ROOTS="$PART_ROOTS src" ;;
7731 translations) PART_ROOTS="$PART_ROOTS tools/linguist/lrelease translations" ;;
7732 examples) PART_ROOTS="$PART_ROOTS examples demos" ;;
7733 *) ;;
7734 esac
7735 done
7737 if [ "$CFG_DEV" = "yes" ]; then
7738 PART_ROOTS="$PART_ROOTS tests"
7741 echo "Creating makefiles. Please wait..."
7742 for file in .projects .projects.3; do
7743 [ '!' -f "$file" ] && continue
7744 for a in `cat $file`; do
7745 IN_ROOT=no
7746 for r in $PART_ROOTS; do
7747 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
7748 IN_ROOT=yes
7749 break
7751 done
7752 [ "$IN_ROOT" = "no" ] && continue
7754 case $a in
7755 *winmain/winmain.pro) continue ;;
7756 *s60main/s60main.pro) continue ;;
7757 *examples/activeqt/*) continue ;;
7758 */qmake/qmake.pro) continue ;;
7759 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
7760 *) SPEC=$XQMAKESPEC ;;
7761 esac
7762 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
7763 test -d "$dir" || mkdir -p "$dir"
7764 OUTDIR="$outpath/$dir"
7765 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7766 # fast configure - the makefile exists, skip it
7767 # since the makefile exists, it was generated by qmake, which means we
7768 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7769 # file changes...
7770 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7771 continue;
7773 QMAKE_SPEC_ARGS="-spec $SPEC"
7774 if echo '\c' | grep '\c' >/dev/null; then
7775 echo -n " for $a"
7776 else
7777 echo " for $a\c"
7780 QMAKE="$outpath/bin/qmake"
7781 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7782 if [ "$file" = ".projects.3" ]; then
7783 if echo '\c' | grep '\c' >/dev/null; then
7784 echo -n " (fast)"
7785 else
7786 echo " (fast)\c"
7788 echo
7790 cat >"${OUTDIR}/Makefile" <<EOF
7791 # ${OUTDIR}/Makefile: generated by configure
7793 # WARNING: This makefile will be replaced with a real makefile.
7794 # All changes made to this file will be lost.
7796 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7798 cat >>"${OUTDIR}/Makefile" <<EOF
7799 QMAKE = "$QMAKE"
7800 all clean install qmake first Makefile: FORCE
7801 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7802 cd "$OUTDIR"
7803 \$(MAKE) \$@
7805 FORCE:
7808 else
7809 if [ "$OPT_VERBOSE" = "yes" ]; then
7810 echo " (`basename $SPEC`)"
7811 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7812 else
7813 echo
7816 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7817 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7819 done
7820 done
7821 rm -f .projects .projects.3
7823 #-------------------------------------------------------------------------------
7824 # XShape is important, DnD in the Designer doens't work without it
7825 #-------------------------------------------------------------------------------
7826 if [ "$PLATFORM_X11" = "yes" ] && [ "$CFG_XSHAPE" = "no" ]; then
7827 cat <<EOF
7829 NOTICE: Qt will not be built with XShape support.
7831 As a result, drag-and-drop in the Qt Designer will NOT
7832 work. We recommend that you enable XShape support by passing
7833 the -xshape switch to $0.
7837 #-------------------------------------------------------------------------------
7838 # check for platforms that we don't yet know about
7839 #-------------------------------------------------------------------------------
7840 if [ "$CFG_ARCH" = "generic" ]; then
7841 cat <<EOF
7843 NOTICE: Atomic operations are not yet supported for this
7844 architecture.
7846 Qt will use the 'generic' architecture instead, which uses a
7847 single pthread_mutex_t to protect all atomic operations. This
7848 implementation is the slow (but safe) fallback implementation
7849 for architectures Qt does not yet support.
7853 #-------------------------------------------------------------------------------
7854 # check if the user passed the -no-zlib option, which is no longer supported
7855 #-------------------------------------------------------------------------------
7856 if [ -n "$ZLIB_FORCED" ]; then
7857 which_zlib="supplied"
7858 if [ "$CFG_ZLIB" = "system" ]; then
7859 which_zlib="system"
7862 cat <<EOF
7864 NOTICE: The -no-zlib option was supplied but is no longer
7865 supported.
7867 Qt now requires zlib support in all builds, so the -no-zlib
7868 option was ignored. Qt will be built using the $which_zlib
7869 zlib.
7873 #-------------------------------------------------------------------------------
7874 # finally save the executed command to another script
7875 #-------------------------------------------------------------------------------
7876 if [ `basename $0` != "config.status" ]; then
7877 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7879 # add the system variables
7880 for varname in $SYSTEM_VARIABLES; do
7881 cmd=`echo \
7882 'if [ -n "\$'${varname}'" ]; then
7883 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7884 fi'`
7885 eval "$cmd"
7886 done
7888 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7890 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7891 echo "#!/bin/sh" > "$outpath/config.status"
7892 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7893 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7894 echo "else" >> "$outpath/config.status"
7895 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7896 echo "fi" >> "$outpath/config.status"
7897 chmod +x "$outpath/config.status"
7900 if [ -n "$RPATH_MESSAGE" ]; then
7901 echo
7902 echo "$RPATH_MESSAGE"
7905 MAKE=`basename "$MAKE"`
7906 echo
7907 echo Qt is now configured for building. Just run \'$MAKE\'.
7908 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7909 echo Once everything is built, Qt is installed.
7910 echo You should not run \'$MAKE install\'.
7911 else
7912 echo Once everything is built, you must run \'$MAKE install\'.
7913 echo Qt will be installed into $QT_INSTALL_PREFIX
7915 echo
7916 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.
7917 echo