Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
[qt-netbsd.git] / configure
blob19fe61360817c213f1ba74ae3dc7622ffa0e08dc
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=no
763 CFG_MAC_COCOA=yes
764 COMMANDLINE_MAC_CARBON=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|-carbon|-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 # do nothing - Cocoa is the default.
1326 carbon)
1327 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1328 CFG_MAC_CARBON="$VAL"
1329 COMMANDLINE_MAC_CARBON="$VAL"
1330 else
1331 UNKNOWN_OPT=yes
1335 framework)
1336 if [ "$PLATFORM_MAC" = "yes" ]; then
1337 CFG_FRAMEWORK="$VAL"
1338 else
1339 UNKNOWN_OPT=yes
1342 profile)
1343 if [ "$VAL" = "yes" ]; then
1344 CFG_PROFILE=yes
1345 QMakeVar add QMAKE_CFLAGS -pg
1346 QMakeVar add QMAKE_CXXFLAGS -pg
1347 QMakeVar add QMAKE_LFLAGS -pg
1348 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1349 else
1350 UNKNOWN_OPT=yes
1353 exceptions|g++-exceptions)
1354 if [ "$VAL" = "no" ]; then
1355 CFG_EXCEPTIONS=no
1356 elif [ "$VAL" = "yes" ]; then
1357 CFG_EXCEPTIONS=yes
1358 else
1359 UNKNOWN_OPT=yes
1362 platform)
1363 PLATFORM="$VAL"
1364 # keep compatibility with old platform names
1365 case $PLATFORM in
1366 aix-64)
1367 PLATFORM=aix-xlc-64
1369 hpux-o64)
1370 PLATFORM=hpux-acc-o64
1372 hpux-n64)
1373 PLATFORM=hpux-acc-64
1375 hpux-acc-n64)
1376 PLATFORM=hpux-acc-64
1378 irix-n32)
1379 PLATFORM=irix-cc
1381 irix-64)
1382 PLATFORM=irix-cc-64
1384 irix-cc-n64)
1385 PLATFORM=irix-cc-64
1387 reliant-64)
1388 PLATFORM=reliant-cds-64
1390 solaris-64)
1391 PLATFORM=solaris-cc-64
1393 solaris-64)
1394 PLATFORM=solaris-cc-64
1396 openunix-cc)
1397 PLATFORM=unixware-cc
1399 openunix-g++)
1400 PLATFORM=unixware-g++
1402 unixware7-cc)
1403 PLATFORM=unixware-cc
1405 unixware7-g++)
1406 PLATFORM=unixware-g++
1408 macx-g++-64)
1409 PLATFORM=macx-g++
1410 NATIVE_64_ARCH=
1411 case `uname -p` in
1412 i386) NATIVE_64_ARCH="x86_64" ;;
1413 powerpc) NATIVE_64_ARCH="ppc64" ;;
1414 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1415 esac
1416 if [ ! -z "$NATIVE_64_ARCH" ]; then
1417 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1418 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1421 esac
1423 xplatform)
1424 XPLATFORM="$VAL"
1426 debug-and-release)
1427 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1428 CFG_DEBUG_RELEASE="$VAL"
1429 else
1430 UNKNOWN_OPT=yes
1433 optimized-qmake)
1434 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1435 CFG_RELEASE_QMAKE="$VAL"
1436 else
1437 UNKNOWN_OPT=yes
1440 release)
1441 if [ "$VAL" = "yes" ]; then
1442 CFG_DEBUG=no
1443 elif [ "$VAL" = "no" ]; then
1444 CFG_DEBUG=yes
1445 else
1446 UNKNOWN_OPT=yes
1449 prefix-install)
1450 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1451 CFG_PREFIX_INSTALL="$VAL"
1452 else
1453 UNKNOWN_OPT=yes
1456 debug)
1457 CFG_DEBUG="$VAL"
1459 developer-build|commercial|opensource|nokia-developer)
1460 # These switches have been dealt with already
1462 static)
1463 if [ "$VAL" = "yes" ]; then
1464 CFG_SHARED=no
1465 elif [ "$VAL" = "no" ]; then
1466 CFG_SHARED=yes
1467 else
1468 UNKNOWN_OPT=yes
1471 incremental)
1472 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1473 CFG_INCREMENTAL="$VAL"
1474 else
1475 UNKNOWN_OPT=yes
1478 fatal_error)
1479 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1480 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1481 else
1482 UNKNOWN_OPT=yes
1485 feature-*)
1486 if [ "$PLATFORM_QWS" = "yes" ]; then
1487 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1488 if [ "$VAL" = "no" ]; then
1489 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1490 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1491 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1492 else
1493 UNKNOWN_OPT=yes
1495 else
1496 UNKNOWN_OPT=yes
1499 shared)
1500 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1501 CFG_SHARED="$VAL"
1502 else
1503 UNKNOWN_OPT=yes
1506 gif)
1507 [ "$VAL" = "qt" ] && VAL=yes
1508 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1509 CFG_GIF="$VAL"
1510 else
1511 UNKNOWN_OPT=yes
1515 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1516 CFG_SM="$VAL"
1517 else
1518 UNKNOWN_OPT=yes
1522 xinerama)
1523 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1524 CFG_XINERAMA="$VAL"
1525 else
1526 UNKNOWN_OPT=yes
1529 xshape)
1530 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1531 CFG_XSHAPE="$VAL"
1532 else
1533 UNKNOWN_OPT=yes
1536 xsync)
1537 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1538 CFG_XSYNC="$VAL"
1539 else
1540 UNKNOWN_OPT=yes
1543 xinput)
1544 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1545 CFG_XINPUT="$VAL"
1546 else
1547 UNKNOWN_OPT=yes
1550 stl)
1551 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1552 CFG_STL="$VAL"
1553 else
1554 UNKNOWN_OPT=yes
1557 pch)
1558 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1559 CFG_PRECOMPILE="$VAL"
1560 else
1561 UNKNOWN_OPT=yes
1564 separate-debug-info)
1565 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1566 CFG_SEPARATE_DEBUG_INFO="$VAL"
1567 elif [ "$VAL" = "nocopy" ] ; then
1568 CFG_SEPARATE_DEBUG_INFO="yes"
1569 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1570 else
1571 UNKNOWN_OPT=yes
1574 reduce-exports)
1575 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1576 CFG_REDUCE_EXPORTS="$VAL"
1577 else
1578 UNKNOWN_OPT=yes
1581 mmx)
1582 if [ "$VAL" = "no" ]; then
1583 CFG_MMX="$VAL"
1584 else
1585 UNKNOWN_OPT=yes
1588 3dnow)
1589 if [ "$VAL" = "no" ]; then
1590 CFG_3DNOW="$VAL"
1591 else
1592 UNKNOWN_OPT=yes
1595 sse)
1596 if [ "$VAL" = "no" ]; then
1597 CFG_SSE="$VAL"
1598 else
1599 UNKNOWN_OPT=yes
1602 sse2)
1603 if [ "$VAL" = "no" ]; then
1604 CFG_SSE2="$VAL"
1605 else
1606 UNKNOWN_OPT=yes
1609 iwmmxt)
1610 CFG_IWMMXT="yes"
1612 neon)
1613 if [ "$VAL" = "no" ]; then
1614 CFG_NEON="$VAL"
1615 else
1616 UNKNOWN_OPT=yes
1619 reduce-relocations)
1620 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1621 CFG_REDUCE_RELOCATIONS="$VAL"
1622 else
1623 UNKNOWN_OPT=yes
1626 freetype)
1627 [ "$VAL" = "qt" ] && VAL=yes
1628 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1629 CFG_QWS_FREETYPE="$VAL"
1630 else
1631 UNKNOWN_OPT=yes
1634 zlib)
1635 [ "$VAL" = "qt" ] && VAL=yes
1636 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1637 CFG_ZLIB="$VAL"
1638 else
1639 UNKNOWN_OPT=yes
1641 # No longer supported:
1642 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1644 sqlite)
1645 if [ "$VAL" = "system" ]; then
1646 CFG_SQLITE=system
1647 else
1648 UNKNOWN_OPT=yes
1651 libpng)
1652 [ "$VAL" = "yes" ] && VAL=qt
1653 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1654 CFG_LIBPNG="$VAL"
1655 else
1656 UNKNOWN_OPT=yes
1659 libjpeg)
1660 [ "$VAL" = "yes" ] && VAL=qt
1661 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1662 CFG_LIBJPEG="$VAL"
1663 else
1664 UNKNOWN_OPT=yes
1667 libmng)
1668 [ "$VAL" = "yes" ] && VAL=qt
1669 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1670 CFG_LIBMNG="$VAL"
1671 else
1672 UNKNOWN_OPT=yes
1675 libtiff)
1676 [ "$VAL" = "yes" ] && VAL=qt
1677 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1678 CFG_LIBTIFF="$VAL"
1679 else
1680 UNKNOWN_OPT=yes
1683 nas-sound)
1684 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1685 CFG_NAS="$VAL"
1686 else
1687 UNKNOWN_OPT=yes
1690 xcursor)
1691 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1692 CFG_XCURSOR="$VAL"
1693 else
1694 UNKNOWN_OPT=yes
1697 xfixes)
1698 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1699 CFG_XFIXES="$VAL"
1700 else
1701 UNKNOWN_OPT=yes
1704 xrandr)
1705 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1706 CFG_XRANDR="$VAL"
1707 else
1708 UNKNOWN_OPT=yes
1711 xrender)
1712 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1713 CFG_XRENDER="$VAL"
1714 else
1715 UNKNOWN_OPT=yes
1718 mitshm)
1719 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1720 CFG_MITSHM="$VAL"
1721 else
1722 UNKNOWN_OPT=yes
1725 fontconfig)
1726 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1727 CFG_FONTCONFIG="$VAL"
1728 else
1729 UNKNOWN_OPT=yes
1732 xkb)
1733 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1734 CFG_XKB="$VAL"
1735 else
1736 UNKNOWN_OPT=yes
1739 cups)
1740 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1741 CFG_CUPS="$VAL"
1742 else
1743 UNKNOWN_OPT=yes
1746 iconv)
1747 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1748 CFG_ICONV="$VAL"
1749 else
1750 UNKNOWN_OPT=yes
1753 glib)
1754 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1755 CFG_GLIB="$VAL"
1756 else
1757 UNKNOWN_OPT=yes
1760 gstreamer)
1761 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1762 CFG_GSTREAMER="$VAL"
1763 else
1764 UNKNOWN_OPT=yes
1767 gtkstyle)
1768 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1769 CFG_QGTKSTYLE="$VAL"
1770 else
1771 UNKNOWN_OPT=yes
1774 qdbus|dbus)
1775 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1776 CFG_DBUS="$VAL"
1777 elif [ "$VAL" = "runtime" ]; then
1778 CFG_DBUS="yes"
1779 else
1780 UNKNOWN_OPT=yes
1783 dbus-linked)
1784 if [ "$VAL" = "yes" ]; then
1785 CFG_DBUS="linked"
1786 else
1787 UNKNOWN_OPT=yes
1790 nis)
1791 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1792 CFG_NIS="$VAL"
1793 else
1794 UNKNOWN_OPT=yes
1797 largefile)
1798 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1799 CFG_LARGEFILE="$VAL"
1800 else
1801 UNKNOWN_OPT=yes
1804 openssl)
1805 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1806 CFG_OPENSSL="$VAL"
1807 else
1808 UNKNOWN_OPT=yes
1811 openssl-linked)
1812 if [ "$VAL" = "yes" ]; then
1813 CFG_OPENSSL="linked"
1814 else
1815 UNKNOWN_OPT=yes
1818 ptmalloc)
1819 if [ "$VAL" = "yes" ]; then
1820 CFG_PTMALLOC="yes"
1821 else
1822 UNKNOWN_OPT=yes
1826 xmlpatterns)
1827 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1828 CFG_XMLPATTERNS="yes"
1829 else
1830 if [ "$VAL" = "no" ]; then
1831 CFG_XMLPATTERNS="no"
1832 else
1833 UNKNOWN_OPT=yes
1837 script)
1838 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1839 CFG_SCRIPT="yes"
1840 else
1841 if [ "$VAL" = "no" ]; then
1842 CFG_SCRIPT="no"
1843 else
1844 UNKNOWN_OPT=yes
1848 scripttools)
1849 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1850 CFG_SCRIPTTOOLS="yes"
1851 else
1852 if [ "$VAL" = "no" ]; then
1853 CFG_SCRIPTTOOLS="no"
1854 else
1855 UNKNOWN_OPT=yes
1859 svg)
1860 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1861 CFG_SVG="yes"
1862 else
1863 if [ "$VAL" = "no" ]; then
1864 CFG_SVG="no"
1865 else
1866 UNKNOWN_OPT=yes
1870 declarative)
1871 if [ "$VAL" = "yes" ]; then
1872 CFG_DECLARATIVE="yes"
1873 else
1874 if [ "$VAL" = "no" ]; then
1875 CFG_DECLARATIVE="no"
1876 else
1877 UNKNOWN_OPT=yes
1881 webkit)
1882 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1883 CFG_WEBKIT="yes"
1884 else
1885 if [ "$VAL" = "no" ]; then
1886 CFG_WEBKIT="no"
1887 else
1888 UNKNOWN_OPT=yes
1892 javascript-jit)
1893 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1894 CFG_JAVASCRIPTCORE_JIT="$VAL"
1895 else
1896 UNKNOWN_OPT=yes
1899 confirm-license)
1900 if [ "$VAL" = "yes" ]; then
1901 OPT_CONFIRM_LICENSE="$VAL"
1902 else
1903 UNKNOWN_OPT=yes
1906 h|help)
1907 if [ "$VAL" = "yes" ]; then
1908 OPT_HELP="$VAL"
1909 else
1910 UNKNOWN_OPT=yes
1913 sql-*|gfx-*|decoration-*|kbd-*|mouse-*)
1914 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1915 # if autoconf style options were used, $VAL can be "yes" or "no"
1916 [ "$VAL" = "yes" ] && VAL=qt
1917 # now $VAL should be "no", "qt", or "plugin"... double-check
1918 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1919 UNKNOWN_OPT=yes
1921 # now $VAL is "no", "qt", or "plugin"
1922 OPT="$VAL"
1923 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1924 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1926 # Grab the available values
1927 case "$VAR" in
1928 sql)
1929 avail="$CFG_SQL_AVAILABLE"
1931 gfx)
1932 avail="$CFG_GFX_AVAILABLE"
1933 if [ "$OPT" = "plugin" ]; then
1934 avail="$CFG_GFX_PLUGIN_AVAILABLE"
1937 decoration)
1938 avail="$CFG_DECORATION_AVAILABLE"
1939 if [ "$OPT" = "plugin" ]; then
1940 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
1943 kbd)
1944 avail="$CFG_KBD_AVAILABLE"
1945 if [ "$OPT" = "plugin" ]; then
1946 avail="$CFG_KBD_PLUGIN_AVAILABLE"
1949 mouse)
1950 avail="$CFG_MOUSE_AVAILABLE"
1951 if [ "$OPT" = "plugin" ]; then
1952 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
1956 avail=""
1957 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1959 esac
1961 # Check that that user's value is available.
1962 found=no
1963 for d in $avail; do
1964 if [ "$VAL" = "$d" ]; then
1965 found=yes
1966 break
1968 done
1969 [ "$found" = yes ] || ERROR=yes
1971 if [ "$VAR" = "sql" ]; then
1972 # set the CFG_SQL_driver
1973 eval "CFG_SQL_$VAL=\$OPT"
1974 continue
1977 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1978 if [ "$OPT" = "plugin" ]; then
1979 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
1980 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
1981 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
1982 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
1983 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
1984 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
1985 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
1986 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
1987 VAR="${VAR}-${OPT}"
1988 else
1989 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
1990 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
1991 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
1992 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
1993 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
1994 VAR="${VAR}-driver"
1997 QMakeVar add "${VAR}s" "${VAL}"
1998 elif [ "$OPT" = "no" ]; then
1999 PLUG_VAR="${VAR}-plugin"
2000 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2001 IN_VAR="${VAR}-driver"
2002 else
2003 IN_VAR="${VAR}"
2005 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2006 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2007 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2008 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2009 QMakeVar del "${IN_VAR}s" "$VAL"
2010 QMakeVar del "${PLUG_VAR}s" "$VAL"
2012 if [ "$ERROR" = "yes" ]; then
2013 echo "$CURRENT_OPT: unknown argument"
2014 OPT_HELP=yes
2017 v|verbose)
2018 if [ "$VAL" = "yes" ]; then
2019 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2020 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2021 else
2022 OPT_VERBOSE=yes
2024 elif [ "$VAL" = "no" ]; then
2025 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2026 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2027 else
2028 OPT_VERBOSE=no
2030 else
2031 UNKNOWN_OPT=yes
2034 fast)
2035 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2036 OPT_FAST="$VAL"
2037 else
2038 UNKNOWN_OPT=yes
2041 rpath)
2042 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2043 CFG_RPATH="$VAL"
2044 else
2045 UNKNOWN_OPT=yes
2048 add_define)
2049 D_FLAGS="$D_FLAGS \"$VAL\""
2051 add_ipath)
2052 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2054 add_lpath)
2055 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2057 add_rpath)
2058 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2060 add_link)
2061 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2063 add_fpath)
2064 if [ "$PLATFORM_MAC" = "yes" ]; then
2065 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2066 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2067 else
2068 UNKNOWN_OPT=yes
2071 add_framework)
2072 if [ "$PLATFORM_MAC" = "yes" ]; then
2073 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2074 else
2075 UNKNOWN_OPT=yes
2078 silent)
2079 CFG_SILENT="$VAL"
2081 phonon)
2082 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2083 CFG_PHONON="$VAL"
2084 else
2085 UNKNOWN_OPT=yes
2088 phonon-backend)
2089 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2090 CFG_PHONON_BACKEND="$VAL"
2091 else
2092 UNKNOWN_OPT=yes
2095 multimedia)
2096 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2097 CFG_MULTIMEDIA="$VAL"
2098 else
2099 UNKNOWN_OPT=yes
2102 audio-backend)
2103 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2104 CFG_AUDIO_BACKEND="$VAL"
2105 else
2106 UNKNOWN_OPT=yes
2110 UNKNOWN_OPT=yes
2112 esac
2113 if [ "$UNKNOWN_OPT" = "yes" ]; then
2114 echo "${CURRENT_OPT}: invalid command-line switch"
2115 OPT_HELP=yes
2116 ERROR=yes
2118 done
2120 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2121 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2122 CFG_QT3SUPPORT="no"
2125 # update QT_CONFIG to show our current predefined configuration
2126 case "$CFG_QCONFIG" in
2127 minimal|small|medium|large|full)
2128 # these are a sequence of increasing functionality
2129 for c in minimal small medium large full; do
2130 QT_CONFIG="$QT_CONFIG $c-config"
2131 [ "$CFG_QCONFIG" = $c ] && break
2132 done
2135 # not known to be sufficient for anything
2136 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ]; then
2137 echo >&2 "Error: configuration file not found:"
2138 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2139 OPT_HELP=yes
2141 esac
2143 #-------------------------------------------------------------------------------
2144 # build tree initialization
2145 #-------------------------------------------------------------------------------
2147 # where to find which..
2148 unixtests="$relpath/config.tests/unix"
2149 mactests="$relpath/config.tests/mac"
2150 WHICH="$unixtests/which.test"
2152 PERL=`$WHICH perl 2>/dev/null`
2154 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2155 AWK=
2156 for e in gawk nawk awk; do
2157 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2158 AWK=$e
2159 break
2161 done
2163 # find perl
2164 PERL="/usr/bin/perl"
2165 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2166 PERL=`$WHICH perl`
2169 ### skip this if the user just needs help...
2170 if [ "$OPT_HELP" != "yes" ]; then
2172 # is this a shadow build?
2173 if [ "$OPT_SHADOW" = "maybe" ]; then
2174 OPT_SHADOW=no
2175 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2176 if [ -h "$outpath" ]; then
2177 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2178 else
2179 OPT_SHADOW=yes
2183 if [ "$OPT_SHADOW" = "yes" ]; then
2184 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2185 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2186 echo >&2 "Cannot proceed."
2187 exit 1
2189 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2192 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2193 echo
2194 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2195 echo "By default, Qt is built in release mode with separate debug information, so"
2196 echo "-debug-and-release is not necessary anymore"
2197 echo
2200 # detect build style
2201 if [ "$CFG_DEBUG" = "auto" ]; then
2202 if [ "$PLATFORM_MAC" = "yes" ]; then
2203 CFG_DEBUG_RELEASE=yes
2204 CFG_DEBUG=yes
2205 elif [ "$CFG_DEV" = "yes" ]; then
2206 CFG_DEBUG_RELEASE=no
2207 CFG_DEBUG=yes
2208 else
2209 CFG_DEBUG_RELEASE=no
2210 CFG_DEBUG=no
2213 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2214 QMAKE_CONFIG="$QMAKE_CONFIG build_all"
2217 if [ "$CFG_SILENT" = "yes" ]; then
2218 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2221 # if the source tree is different from the build tree,
2222 # symlink or copy part of the sources
2223 if [ "$OPT_SHADOW" = "yes" ]; then
2224 echo "Preparing build tree..."
2226 if [ -z "$PERL" ]; then
2227 echo
2228 echo "You need perl in your PATH to make a shadow build."
2229 echo "Cannot proceed."
2230 exit 1
2233 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2235 # symlink the qmake directory
2236 find "$relpath/qmake" | while read a; do
2237 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2238 if [ '!' -f "$my_a" ]; then
2239 if [ -d "$a" ]; then
2240 # directories are created...
2241 mkdir -p "$my_a"
2242 else
2243 a_dir=`dirname "$my_a"`
2244 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2245 # ... and files are symlinked
2246 case `basename "$a"` in
2247 *.o|*.d|GNUmakefile*|qmake)
2250 rm -f "$my_a"
2251 ln -s "$a" "$my_a"
2253 esac
2256 done
2258 # make a syncqt script that can be used in the shadow
2259 rm -f "$outpath/bin/syncqt"
2260 if [ -x "$relpath/bin/syncqt" ]; then
2261 mkdir -p "$outpath/bin"
2262 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2263 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
2264 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2265 chmod 755 "$outpath/bin/syncqt"
2268 # symlink the mkspecs directory
2269 mkdir -p "$outpath/mkspecs"
2270 rm -f "$outpath"/mkspecs/*
2271 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2272 rm -f "$outpath/mkspecs/default"
2274 # symlink the doc directory
2275 rm -rf "$outpath/doc"
2276 ln -s "$relpath/doc" "$outpath/doc"
2278 # make sure q3porting.xml can be found
2279 mkdir -p "$outpath/tools/porting/src"
2280 rm -f "$outpath/tools/porting/src/q3porting.xml"
2281 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2284 # symlink fonts to be able to run application from build directory
2285 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then
2286 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2287 mkdir -p "${outpath}/lib"
2288 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2292 if [ "$OPT_FAST" = "auto" ]; then
2293 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2294 OPT_FAST=yes
2295 else
2296 OPT_FAST=no
2300 # find a make command
2301 if [ -z "$MAKE" ]; then
2302 MAKE=
2303 for mk in gmake make; do
2304 if "$WHICH" $mk >/dev/null 2>&1; then
2305 MAKE=`"$WHICH" $mk`
2306 break
2308 done
2309 if [ -z "$MAKE" ]; then
2310 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2311 echo >&2 "Cannot proceed."
2312 exit 1
2314 # export MAKE, we need it later in the config.tests
2315 export MAKE
2318 fi ### help
2320 #-------------------------------------------------------------------------------
2321 # auto-detect all that hasn't been specified in the arguments
2322 #-------------------------------------------------------------------------------
2324 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2325 if [ "$CFG_EMBEDDED" != "no" ]; then
2326 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2327 Darwin:*)
2328 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2329 if [ -z "$XPLATFORM" ]; then
2330 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2331 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2334 FreeBSD:*)
2335 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2336 if [ -z "$XPLATFORM" ]; then
2337 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2338 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2341 SunOS:5*)
2342 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2343 if [ -z "$XPLATFORM" ]; then
2344 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2345 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2348 Linux:*)
2349 if [ -z "$PLATFORM" ]; then
2350 case "$UNAME_MACHINE" in
2351 *86)
2352 PLATFORM=qws/linux-x86-g++
2354 *86_64)
2355 PLATFORM=qws/linux-x86_64-g++
2358 PLATFORM=qws/linux-generic-g++
2360 esac
2362 if [ -z "$XPLATFORM" ]; then
2363 if [ "$CFG_EMBEDDED" = "auto" ]; then
2364 if [ -n "$CFG_ARCH" ]; then
2365 CFG_EMBEDDED=$CFG_ARCH
2366 else
2367 case "$UNAME_MACHINE" in
2368 *86)
2369 CFG_EMBEDDED=x86
2371 *86_64)
2372 CFG_EMBEDDED=x86_64
2375 CFG_EMBEDDED=generic
2377 esac
2380 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2383 QNX:*)
2384 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2385 if [ -z "$XPLATFORM" ]; then
2386 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2387 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2390 CYGWIN*:*)
2391 CFG_EMBEDDED=x86
2394 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2395 CFG_EMBEDDED=no
2396 PLATFORM_QWS=no
2398 esac
2400 if [ -z "$PLATFORM" ]; then
2401 PLATFORM_NOTES=
2402 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2403 Darwin:*)
2404 if [ "$PLATFORM_MAC" = "yes" ]; then
2405 PLATFORM=macx-g++
2406 # PLATFORM=macx-xcode
2407 else
2408 PLATFORM=darwin-g++
2411 AIX:*)
2412 #PLATFORM=aix-g++
2413 #PLATFORM=aix-g++-64
2414 PLATFORM=aix-xlc
2415 #PLATFORM=aix-xlc-64
2416 PLATFORM_NOTES="
2417 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2420 GNU:*)
2421 PLATFORM=hurd-g++
2423 dgux:*)
2424 PLATFORM=dgux-g++
2426 # DYNIX/ptx:4*)
2427 # PLATFORM=dynix-g++
2428 # ;;
2429 ULTRIX:*)
2430 PLATFORM=ultrix-g++
2432 FreeBSD:*)
2433 PLATFORM=freebsd-g++
2434 PLATFORM_NOTES="
2435 - Also available for FreeBSD: freebsd-icc
2438 OpenBSD:*)
2439 PLATFORM=openbsd-g++
2441 NetBSD:*)
2442 PLATFORM=netbsd-g++
2444 BSD/OS:*|BSD/386:*)
2445 PLATFORM=bsdi-g++
2447 IRIX*:*)
2448 #PLATFORM=irix-g++
2449 PLATFORM=irix-cc
2450 #PLATFORM=irix-cc-64
2451 PLATFORM_NOTES="
2452 - Also available for IRIX: irix-g++ irix-cc-64
2455 HP-UX:*)
2456 case "$UNAME_MACHINE" in
2457 ia64)
2458 #PLATFORM=hpuxi-acc-32
2459 PLATFORM=hpuxi-acc-64
2460 PLATFORM_NOTES="
2461 - Also available for HP-UXi: hpuxi-acc-32
2465 #PLATFORM=hpux-g++
2466 PLATFORM=hpux-acc
2467 #PLATFORM=hpux-acc-64
2468 #PLATFORM=hpux-cc
2469 #PLATFORM=hpux-acc-o64
2470 PLATFORM_NOTES="
2471 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2474 esac
2476 OSF1:*)
2477 #PLATFORM=tru64-g++
2478 PLATFORM=tru64-cxx
2479 PLATFORM_NOTES="
2480 - Also available for Tru64: tru64-g++
2483 Linux:*)
2484 case "$UNAME_MACHINE" in
2485 x86_64|s390x|ppc64)
2486 PLATFORM=linux-g++-64
2489 PLATFORM=linux-g++
2491 esac
2492 PLATFORM_NOTES="
2493 - Also available for Linux: linux-kcc linux-icc linux-cxx
2496 SunOS:5*)
2497 #PLATFORM=solaris-g++
2498 PLATFORM=solaris-cc
2499 #PLATFORM=solaris-cc64
2500 PLATFORM_NOTES="
2501 - Also available for Solaris: solaris-g++ solaris-cc-64
2504 ReliantUNIX-*:*|SINIX-*:*)
2505 PLATFORM=reliant-cds
2506 #PLATFORM=reliant-cds-64
2507 PLATFORM_NOTES="
2508 - Also available for Reliant UNIX: reliant-cds-64
2511 CYGWIN*:*)
2512 PLATFORM=cygwin-g++
2514 LynxOS*:*)
2515 PLATFORM=lynxos-g++
2517 OpenUNIX:*)
2518 #PLATFORM=unixware-g++
2519 PLATFORM=unixware-cc
2520 PLATFORM_NOTES="
2521 - Also available for OpenUNIX: unixware-g++
2524 UnixWare:*)
2525 #PLATFORM=unixware-g++
2526 PLATFORM=unixware-cc
2527 PLATFORM_NOTES="
2528 - Also available for UnixWare: unixware-g++
2531 SCO_SV:*)
2532 #PLATFORM=sco-g++
2533 PLATFORM=sco-cc
2534 PLATFORM_NOTES="
2535 - Also available for SCO OpenServer: sco-g++
2538 UNIX_SV:*)
2539 PLATFORM=unixware-g++
2541 QNX:*)
2542 PLATFORM=unsupported/qnx-g++
2545 if [ "$OPT_HELP" != "yes" ]; then
2546 echo
2547 for p in $PLATFORMS; do
2548 echo " $relconf $* -platform $p"
2549 done
2550 echo >&2
2551 echo " The build script does not currently recognize all" >&2
2552 echo " platforms supported by Qt." >&2
2553 echo " Rerun this script with a -platform option listed to" >&2
2554 echo " set the system/compiler combination you use." >&2
2555 echo >&2
2556 exit 2
2558 esac
2561 if [ "$PLATFORM_QWS" = "yes" ]; then
2562 CFG_SM=no
2563 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2564 else
2565 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2568 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2569 if [ -d "$PLATFORM" ]; then
2570 QMAKESPEC="$PLATFORM"
2571 else
2572 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2574 if [ -d "$XPLATFORM" ]; then
2575 XQMAKESPEC="$XPLATFORM"
2576 else
2577 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2579 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2580 QT_CROSS_COMPILE=yes
2581 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2584 if [ "$PLATFORM_MAC" = "yes" ]; then
2585 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2586 echo >&2
2587 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2588 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2589 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2590 echo " built with 'macx-g++'" >&2
2591 echo >&2
2592 exit 2
2596 # check specified platforms are supported
2597 if [ '!' -d "$QMAKESPEC" ]; then
2598 echo
2599 echo " The specified system/compiler is not supported:"
2600 echo
2601 echo " $QMAKESPEC"
2602 echo
2603 echo " Please see the README file for a complete list."
2604 echo
2605 exit 2
2607 if [ '!' -d "$XQMAKESPEC" ]; then
2608 echo
2609 echo " The specified system/compiler is not supported:"
2610 echo
2611 echo " $XQMAKESPEC"
2612 echo
2613 echo " Please see the README file for a complete list."
2614 echo
2615 exit 2
2617 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2618 echo
2619 echo " The specified system/compiler port is not complete:"
2620 echo
2621 echo " $XQMAKESPEC/qplatformdefs.h"
2622 echo
2623 echo " Please contact qt-bugs@trolltech.com."
2624 echo
2625 exit 2
2628 # now look at the configs and figure out what platform we are config'd for
2629 [ "$CFG_EMBEDDED" = "no" ] \
2630 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2631 && PLATFORM_X11=yes
2632 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2634 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2635 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2636 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2637 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2638 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2642 #-------------------------------------------------------------------------------
2643 # determine the system architecture
2644 #-------------------------------------------------------------------------------
2645 if [ "$OPT_VERBOSE" = "yes" ]; then
2646 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2649 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2650 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2651 echo ""
2652 echo "You have specified a target architecture with -embedded and -arch."
2653 echo "The two architectures you have specified are different, so we can"
2654 echo "not proceed. Either set both to be the same, or only use -embedded."
2655 echo ""
2656 exit 1
2660 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2661 case `basename "$XPLATFORM"` in
2662 qnx-* | vxworks-*)
2663 echo ""
2664 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2665 echo ""
2666 echo "Please contact qt-info@nokia.com to upgrade your license to"
2667 echo "include this platform, or install the Qt Open Source Edition"
2668 echo "if you intend to develop free software."
2669 exit 1
2671 esac
2674 if [ -z "${CFG_HOST_ARCH}" ]; then
2675 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2676 IRIX*:*:*)
2677 CFG_HOST_ARCH=`uname -p`
2678 if [ "$OPT_VERBOSE" = "yes" ]; then
2679 echo " SGI ($CFG_HOST_ARCH)"
2682 SunOS:5*:*)
2683 case "$UNAME_MACHINE" in
2684 sun4u*|sun4v*)
2685 if [ "$OPT_VERBOSE" = "yes" ]; then
2686 echo " Sun SPARC (sparc)"
2688 CFG_HOST_ARCH=sparc
2690 i86pc)
2691 case "$PLATFORM" in
2692 *-64)
2693 if [ "$OPT_VERBOSE" = "yes" ]; then
2694 echo " 64-bit AMD 80x86 (x86_64)"
2696 CFG_HOST_ARCH=x86_64
2699 if [ "$OPT_VERBOSE" = "yes" ]; then
2700 echo " 32-bit Intel 80x86 (i386)"
2702 CFG_HOST_ARCH=i386
2704 esac
2705 esac
2707 Darwin:*:*)
2708 case "$UNAME_MACHINE" in
2709 Power?Macintosh)
2710 if [ "$OPT_VERBOSE" = "yes" ]; then
2711 echo " 32-bit Apple PowerPC (powerpc)"
2714 x86)
2715 if [ "$OPT_VERBOSE" = "yes" ]; then
2716 echo " 32-bit Intel 80x86 (i386)"
2719 esac
2720 CFG_HOST_ARCH=macosx
2722 AIX:*:00????????00)
2723 if [ "$OPT_VERBOSE" = "yes" ]; then
2724 echo " 64-bit IBM PowerPC (powerpc)"
2726 CFG_HOST_ARCH=powerpc
2728 HP-UX:*:9000*)
2729 if [ "$OPT_VERBOSE" = "yes" ]; then
2730 echo " HP PA-RISC (parisc)"
2732 CFG_HOST_ARCH=parisc
2734 *:*:i?86)
2735 if [ "$OPT_VERBOSE" = "yes" ]; then
2736 echo " 32-bit Intel 80x86 (i386)"
2738 CFG_HOST_ARCH=i386
2740 *:*:x86_64|*:*:amd64)
2741 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2742 if [ "$OPT_VERBOSE" = "yes" ]; then
2743 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2745 CFG_HOST_ARCH=i386
2746 else
2747 if [ "$OPT_VERBOSE" = "yes" ]; then
2748 echo " 64-bit AMD 80x86 (x86_64)"
2750 CFG_HOST_ARCH=x86_64
2753 *:*:ppc)
2754 if [ "$OPT_VERBOSE" = "yes" ]; then
2755 echo " 32-bit PowerPC (powerpc)"
2757 CFG_HOST_ARCH=powerpc
2759 *:*:ppc64)
2760 if [ "$OPT_VERBOSE" = "yes" ]; then
2761 echo " 64-bit PowerPC (powerpc)"
2763 CFG_HOST_ARCH=powerpc
2765 *:*:s390*)
2766 if [ "$OPT_VERBOSE" = "yes" ]; then
2767 echo " IBM S/390 (s390)"
2769 CFG_HOST_ARCH=s390
2771 *:*:arm*)
2772 if [ "$OPT_VERBOSE" = "yes" ]; then
2773 echo " ARM (arm)"
2775 CFG_HOST_ARCH=arm
2777 Linux:*:sparc*)
2778 if [ "$OPT_VERBOSE" = "yes" ]; then
2779 echo " Linux on SPARC"
2781 CFG_HOST_ARCH=sparc
2783 QNX:*:*)
2784 case "$UNAME_MACHINE" in
2785 x86pc)
2786 if [ "$OPT_VERBOSE" = "yes" ]; then
2787 echo " QNX on Intel 80x86 (i386)"
2789 CFG_HOST_ARCH=i386
2791 esac
2793 *:*:*)
2794 if [ "$OPT_VERBOSE" = "yes" ]; then
2795 echo " Trying '$UNAME_MACHINE'..."
2797 CFG_HOST_ARCH="$UNAME_MACHINE"
2799 esac
2802 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2803 if [ -n "$CFG_ARCH" ]; then
2804 CFG_EMBEDDED=$CFG_ARCH
2807 case "$CFG_EMBEDDED" in
2808 x86)
2809 CFG_ARCH=i386
2811 x86_64)
2812 CFG_ARCH=x86_64
2814 ipaq|sharp)
2815 CFG_ARCH=arm
2817 dm7000)
2818 CFG_ARCH=powerpc
2820 dm800)
2821 CFG_ARCH=mips
2823 sh4al)
2824 CFG_ARCH=sh4a
2827 CFG_ARCH="$CFG_EMBEDDED"
2829 esac
2830 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2831 CFG_ARCH=$CFG_HOST_ARCH
2834 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
2835 if [ "$OPT_VERBOSE" = "yes" ]; then
2836 echo " '$CFG_ARCH' is supported"
2838 else
2839 if [ "$OPT_VERBOSE" = "yes" ]; then
2840 echo " '$CFG_ARCH' is unsupported, using 'generic'"
2842 CFG_ARCH=generic
2844 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
2845 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
2846 if [ "$OPT_VERBOSE" = "yes" ]; then
2847 echo " '$CFG_HOST_ARCH' is supported"
2849 else
2850 if [ "$OPT_VERBOSE" = "yes" ]; then
2851 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
2853 CFG_HOST_ARCH=generic
2857 if [ "$OPT_VERBOSE" = "yes" ]; then
2858 echo "System architecture: '$CFG_ARCH'"
2859 if [ "$PLATFORM_QWS" = "yes" ]; then
2860 echo "Host architecture: '$CFG_HOST_ARCH'"
2864 #-------------------------------------------------------------------------------
2865 # tests that don't need qmake (must be run before displaying help)
2866 #-------------------------------------------------------------------------------
2868 if [ -z "$PKG_CONFIG" ]; then
2869 # See if PKG_CONFIG is set in the mkspec:
2870 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
2872 if [ -z "$PKG_CONFIG" ]; then
2873 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2876 # Work out if we can use pkg-config
2877 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2878 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2879 echo >&2 ""
2880 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2881 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2882 echo >&2 "environment!"
2883 echo >&2 ""
2884 if [ -z "$PKG_CONFIG_PATH" ]; then
2885 echo >&2 ""
2886 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2887 echo >&2 "the host compiler's .pc files will be used. This is probably"
2888 echo >&2 "not what you want."
2889 echo >&2 ""
2890 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2891 echo >&2 ""
2892 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2893 echo >&2 "been set. This means your toolchain's .pc files must contain"
2894 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2895 echo >&2 "tests are failing, please check these files."
2896 echo >&2 ""
2898 else
2899 echo >&2 ""
2900 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2901 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2902 echo >&2 "dependencies"
2903 echo >&2 ""
2904 PKG_CONFIG=""
2908 # process CFG_MAC_ARCHS
2909 if [ "$PLATFORM_MAC" = "yes" ]; then
2910 # check -arch arguments for validity.
2911 ALLOWED="x86 ppc x86_64 ppc64 i386"
2912 # Save the list so we can re-write it using only valid values
2913 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
2914 CFG_MAC_ARCHS=
2915 for i in $CFG_MAC_ARCHS_IN
2917 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
2918 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
2919 exit 2;
2921 if [ "$i" = "i386" -o "$i" = "x86" ]; then
2922 # These are synonymous values
2923 # CFG_MAC_ARCHS requires x86 while GCC requires i386
2924 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
2925 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
2926 else
2927 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
2928 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
2930 done
2933 # pass on $CFG_SDK to the configure tests.
2934 if [ '!' -z "$CFG_SDK" ]; then
2935 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2938 # find the default framework value
2939 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2940 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2941 CFG_FRAMEWORK="$CFG_SHARED"
2942 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2943 echo
2944 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2945 echo
2946 CFG_FRAMEWORK="no"
2948 else
2949 CFG_FRAMEWORK=no
2952 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
2953 TEST_COMPILER="$CC"
2954 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
2955 if [ -z "$TEST_COMPILER" ]; then
2956 echo "ERROR: Cannot set the compiler for the configuration tests"
2957 exit 1
2960 # auto-detect precompiled header support
2961 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2962 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2963 CFG_PRECOMPILE=no
2964 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2965 CFG_PRECOMPILE=no
2966 else
2967 CFG_PRECOMPILE=yes
2969 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2970 echo
2971 echo "WARNING: Using universal binaries disables precompiled headers."
2972 echo
2973 CFG_PRECOMPILE=no
2976 #auto-detect DWARF2 on the mac
2977 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2978 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2979 CFG_MAC_DWARF2=no
2980 else
2981 CFG_MAC_DWARF2=yes
2985 # auto-detect support for -Xarch on the mac
2986 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
2987 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2988 CFG_MAC_XARCH=no
2989 else
2990 CFG_MAC_XARCH=yes
2994 # don't autodetect support for separate debug info on objcopy when
2995 # cross-compiling as lots of toolchains seems to have problems with this
2996 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2997 CFG_SEPARATE_DEBUG_INFO="no"
3000 # auto-detect support for separate debug info in objcopy
3001 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3002 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_].*=%%p' | tr '\n' ' '`
3003 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_].*=%%p' | tr '\n' ' '`
3004 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3005 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3006 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3007 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3008 CFG_SEPARATE_DEBUG_INFO=no
3009 else
3010 case "$PLATFORM" in
3011 hpux-*)
3012 # binutils on HP-UX is buggy; default to no.
3013 CFG_SEPARATE_DEBUG_INFO=no
3016 CFG_SEPARATE_DEBUG_INFO=yes
3018 esac
3022 # auto-detect -fvisibility support
3023 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3024 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3025 CFG_REDUCE_EXPORTS=no
3026 else
3027 CFG_REDUCE_EXPORTS=yes
3031 # detect the availability of the -Bsymbolic-functions linker optimization
3032 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3033 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3034 CFG_REDUCE_RELOCATIONS=no
3035 else
3036 CFG_REDUCE_RELOCATIONS=yes
3040 # auto-detect GNU make support
3041 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3042 CFG_USE_GNUMAKE=yes
3045 # If -opengl wasn't specified, don't try to auto-detect
3046 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3047 CFG_OPENGL=no
3050 # mac
3051 if [ "$PLATFORM_MAC" = "yes" ]; then
3052 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3053 CFG_OPENGL=desktop
3057 # find the default framework value
3058 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
3059 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3060 CFG_FRAMEWORK="$CFG_SHARED"
3061 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3062 echo
3063 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3064 echo
3065 CFG_FRAMEWORK="no"
3067 else
3068 CFG_FRAMEWORK=no
3071 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3072 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3073 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3074 # get the darwin version. 10.0.0 and up means snow leopard.
3075 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3076 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3077 echo
3078 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3079 echo
3083 # x11 tests are done after qmake is built
3086 #setup the build parts
3087 if [ -z "$CFG_BUILD_PARTS" ]; then
3088 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3090 # don't build tools by default when cross-compiling
3091 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3092 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3095 for nobuild in $CFG_NOBUILD_PARTS; do
3096 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3097 done
3098 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3099 # echo
3100 # echo "WARNING: libs is a required part of the build."
3101 # echo
3102 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3105 #-------------------------------------------------------------------------------
3106 # post process QT_INSTALL_* variables
3107 #-------------------------------------------------------------------------------
3109 #prefix
3110 if [ -z "$QT_INSTALL_PREFIX" ]; then
3111 if [ "$CFG_DEV" = "yes" ]; then
3112 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3113 elif [ "$PLATFORM_QWS" = "yes" ]; then
3114 QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
3115 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3116 QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
3118 else
3119 QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
3122 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3124 #docs
3125 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3126 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3127 if [ "$PLATFORM_MAC" = "yes" ]; then
3128 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3131 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3134 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3136 #headers
3137 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3138 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3139 if [ "$PLATFORM_MAC" = "yes" ]; then
3140 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3141 QT_INSTALL_HEADERS=
3145 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3148 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3150 #libs
3151 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3152 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3153 if [ "$PLATFORM_MAC" = "yes" ]; then
3154 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3155 QT_INSTALL_LIBS="/Libraries/Frameworks"
3159 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3161 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3163 #bins
3164 if [ -z "$QT_INSTALL_BINS" ]; then #default
3165 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3166 if [ "$PLATFORM_MAC" = "yes" ]; then
3167 QT_INSTALL_BINS="/Developer/Applications/Qt"
3170 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3173 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3175 #plugins
3176 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3177 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3178 if [ "$PLATFORM_MAC" = "yes" ]; then
3179 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3182 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3184 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3186 #data
3187 if [ -z "$QT_INSTALL_DATA" ]; then #default
3188 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3190 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3192 #translations
3193 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3194 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3196 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3198 #settings
3199 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3200 if [ "$PLATFORM_MAC" = "yes" ]; then
3201 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3202 else
3203 QT_INSTALL_SETTINGS=/etc/xdg
3206 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3208 #examples
3209 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3210 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3211 if [ "$PLATFORM_MAC" = "yes" ]; then
3212 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3215 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3217 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3219 #demos
3220 if [ -z "$QT_INSTALL_DEMOS" ]; then #default
3221 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3222 if [ "$PLATFORM_MAC" = "yes" ]; then
3223 QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos"
3226 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos"
3228 QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
3230 #-------------------------------------------------------------------------------
3231 # help - interactive parts of the script _after_ this section please
3232 #-------------------------------------------------------------------------------
3234 # next, emit a usage message if something failed.
3235 if [ "$OPT_HELP" = "yes" ]; then
3236 [ "x$ERROR" = "xyes" ] && echo
3237 if [ "$CFG_NIS" = "no" ]; then
3238 NSY=" "
3239 NSN="*"
3240 else
3241 NSY="*"
3242 NSN=" "
3244 if [ "$CFG_CUPS" = "no" ]; then
3245 CUY=" "
3246 CUN="*"
3247 else
3248 CUY="*"
3249 CUN=" "
3251 if [ "$CFG_ICONV" = "no" ]; then
3252 CIY=" "
3253 CIN="*"
3254 else
3255 CIY="*"
3256 CIN=" "
3258 if [ "$CFG_LARGEFILE" = "no" ]; then
3259 LFSY=" "
3260 LFSN="*"
3261 else
3262 LFSY="*"
3263 LFSN=" "
3265 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3266 SHY="*"
3267 SHN=" "
3268 else
3269 SHY=" "
3270 SHN="*"
3272 if [ "$CFG_IPV6" = "auto" ]; then
3273 I6Y="*"
3274 I6N=" "
3276 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3277 PHY=" "
3278 PHN="*"
3279 else
3280 PHY="*"
3281 PHN=" "
3284 cat <<EOF
3285 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3286 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
3287 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3288 [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
3289 [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3290 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3291 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3292 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3293 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3294 [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3295 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3296 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3297 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3298 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3299 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
3300 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3301 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3302 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3303 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3304 [-no-audio-backend] [-audio-backend] [-no-openssl] [-openssl] [-openssl-linked]
3305 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
3306 [-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative]
3308 [additional platform specific options (see below)]
3311 Installation options:
3313 These are optional, but you may specify install directories.
3315 -prefix <dir> ...... This will install everything relative to <dir>
3316 (default $QT_INSTALL_PREFIX)
3318 if [ "$PLATFORM_QWS" = "yes" ]; then
3319 cat <<EOF
3321 -hostprefix [dir] .. Tools and libraries needed when developing
3322 applications are installed in [dir]. If [dir] is
3323 not given, the current build directory will be used.
3326 cat <<EOF
3328 * -prefix-install .... Force a sandboxed "local" installation of
3329 Qt. This will install into
3330 $QT_INSTALL_PREFIX, if this option is
3331 disabled then some platforms will attempt a
3332 "system" install by placing default values to
3333 be placed in a system location other than
3334 PREFIX.
3336 You may use these to separate different parts of the install:
3338 -bindir <dir> ......... Executables will be installed to <dir>
3339 (default PREFIX/bin)
3340 -libdir <dir> ......... Libraries will be installed to <dir>
3341 (default PREFIX/lib)
3342 -docdir <dir> ......... Documentation will be installed to <dir>
3343 (default PREFIX/doc)
3344 -headerdir <dir> ...... Headers will be installed to <dir>
3345 (default PREFIX/include)
3346 -plugindir <dir> ...... Plugins will be installed to <dir>
3347 (default PREFIX/plugins)
3348 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3349 (default PREFIX)
3350 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3351 (default PREFIX/translations)
3352 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3353 (default PREFIX/etc/settings)
3354 -examplesdir <dir> .... Examples will be installed to <dir>
3355 (default PREFIX/examples)
3356 -demosdir <dir> ....... Demos will be installed to <dir>
3357 (default PREFIX/demos)
3359 You may use these options to turn on strict plugin loading.
3361 -buildkey <key> .... Build the Qt library and plugins using the specified
3362 <key>. When the library loads plugins, it will only
3363 load those that have a matching key.
3365 Configure options:
3367 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3368 that needs to be evaluated. If the evaluation succeeds, the feature is
3369 included. Here is a short explanation of each option:
3371 * -release ........... Compile and link Qt with debugging turned off.
3372 -debug ............. Compile and link Qt with debugging turned on.
3373 -debug-and-release . Compile and link two versions of Qt, with and without
3374 debugging turned on (Mac only).
3376 -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting)
3378 -opensource......... Compile and link the Open-Source Edition of Qt.
3379 -commercial......... Compile and link the Commercial Edition of Qt.
3382 * -shared ............ Create and use shared Qt libraries.
3383 -static ............ Create and use static Qt libraries.
3385 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3386 project files.
3387 -fast .............. Configure Qt quickly by generating Makefiles only for
3388 library and subdirectory targets. All other Makefiles
3389 are created as wrappers, which will in turn run qmake.
3391 -no-largefile ...... Disables large file support.
3392 + -largefile ......... Enables Qt to access files larger than 4 GB.
3395 if [ "$PLATFORM_QWS" = "yes" ]; then
3396 EXCN="*"
3397 EXCY=" "
3398 else
3399 EXCN=" "
3400 EXCY="*"
3402 if [ "$CFG_DBUS" = "no" ]; then
3403 DBY=" "
3404 DBN="+"
3405 else
3406 DBY="+"
3407 DBN=" "
3410 cat << EOF
3411 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3412 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3414 -no-accessibility .. Do not compile Accessibility support.
3415 * -accessibility ..... Compile Accessibility support.
3417 $SHN -no-stl ............ Do not compile STL support.
3418 $SHY -stl ............... Compile STL support.
3420 -no-sql-<driver> ... Disable SQL <driver> entirely.
3421 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3422 none are turned on.
3423 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3424 at run time.
3426 Possible values for <driver>:
3427 [ $CFG_SQL_AVAILABLE ]
3429 -system-sqlite ..... Use sqlite from the operating system.
3431 -no-qt3support ..... Disables the Qt 3 support functionality.
3432 * -qt3support ........ Enables the Qt 3 support functionality.
3434 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3435 + -xmlpatterns ....... Build the QtXmlPatterns module.
3436 QtXmlPatterns is built if a decent C++ compiler
3437 is used and exceptions are enabled.
3439 -no-multimedia ..... Do not build the QtMultimedia module.
3440 + -multimedia ........ Build the QtMultimedia module.
3442 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3443 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3445 -no-phonon ......... Do not build the Phonon module.
3446 + -phonon ............ Build the Phonon module.
3447 Phonon is built if a decent C++ compiler is used.
3448 -no-phonon-backend.. Do not build the platform phonon plugin.
3449 + -phonon-backend..... Build the platform phonon plugin.
3451 -no-svg ............ Do not build the SVG module.
3452 + -svg ............... Build the SVG module.
3454 -no-webkit ......... Do not build the WebKit module.
3455 + -webkit ............ Build the WebKit module.
3456 WebKit is built if a decent C++ compiler is used.
3458 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3459 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3461 -no-script ......... Do not build the QtScript module.
3462 + -script ............ Build the QtScript module.
3464 -no-scripttools .... Do not build the QtScriptTools module.
3465 + -scripttools ....... Build the QtScriptTools module.
3467 + -no-declarative .....Do not build the declarative module.
3468 -declarative ....... Build the declarative module.
3470 -platform target ... The operating system and compiler you are building
3471 on ($PLATFORM).
3473 See the README file for a list of supported
3474 operating systems and compilers.
3476 if [ "${PLATFORM_QWS}" != "yes" ]; then
3477 cat << EOF
3478 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3479 raster - Software rasterizer
3480 opengl - Rendering via OpenGL, Experimental!
3483 cat << EOF
3485 -no-mmx ............ Do not compile with use of MMX instructions.
3486 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3487 -no-sse ............ Do not compile with use of SSE instructions.
3488 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3490 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3491 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3493 -D <string> ........ Add an explicit define to the preprocessor.
3494 -I <string> ........ Add an explicit include path.
3495 -L <string> ........ Add an explicit library path.
3497 -help, -h .......... Display this information.
3499 Third Party Libraries:
3501 -qt-zlib ........... Use the zlib bundled with Qt.
3502 + -system-zlib ....... Use zlib from the operating system.
3503 See http://www.gzip.org/zlib
3505 -no-gif ............ Do not compile the plugin for GIF reading support.
3506 * -qt-gif ............ Compile the plugin for GIF reading support.
3507 See also src/plugins/imageformats/gif/qgifhandler.h
3509 -no-libtiff ........ Do not compile the plugin for TIFF support.
3510 -qt-libtiff ........ Use the libtiff bundled with Qt.
3511 + -system-libtiff .... Use libtiff from the operating system.
3512 See http://www.libtiff.org
3514 -no-libpng ......... Do not compile in PNG support.
3515 -qt-libpng ......... Use the libpng bundled with Qt.
3516 + -system-libpng ..... Use libpng from the operating system.
3517 See http://www.libpng.org/pub/png
3519 -no-libmng ......... Do not compile the plugin for MNG support.
3520 -qt-libmng ......... Use the libmng bundled with Qt.
3521 + -system-libmng ..... Use libmng from the operating system.
3522 See http://www.libmng.com
3524 -no-libjpeg ........ Do not compile the plugin for JPEG support.
3525 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3526 + -system-libjpeg .... Use libjpeg from the operating system.
3527 See http://www.ijg.org
3529 -no-openssl ........ Do not compile support for OpenSSL.
3530 + -openssl ........... Enable run-time OpenSSL support.
3531 -openssl-linked .... Enabled linked OpenSSL support.
3533 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3534 (Experimental.)
3536 Additional options:
3538 -make <part> ....... Add part to the list of parts to be built at make time.
3539 ($QT_DEFAULT_BUILD_PARTS)
3540 -nomake <part> ..... Exclude part from the list of parts to be built.
3542 -R <string> ........ Add an explicit runtime library path to the Qt
3543 libraries.
3544 -l <string> ........ Add an explicit library.
3546 -no-rpath .......... Do not use the library install path as a runtime
3547 library path.
3548 + -rpath ............. Link Qt libraries and executables using the library
3549 install path as a runtime library path. Equivalent
3550 to -R install_libpath
3552 -continue .......... Continue as far as possible if an error occurs.
3554 -verbose, -v ....... Print verbose information about each step of the
3555 configure process.
3557 -silent ............ Reduce the build output so that warnings and errors
3558 can be seen more easily.
3560 * -no-optimized-qmake ... Do not build qmake optimized.
3561 -optimized-qmake ...... Build qmake optimized.
3563 $NSN -no-nis ............ Do not compile NIS support.
3564 $NSY -nis ............... Compile NIS support.
3566 $CUN -no-cups ........... Do not compile CUPS support.
3567 $CUY -cups .............. Compile CUPS support.
3568 Requires cups/cups.h and libcups.so.2.
3570 $CIN -no-iconv .......... Do not compile support for iconv(3).
3571 $CIY -iconv ............. Compile support for iconv(3).
3573 $PHN -no-pch ............ Do not use precompiled header support.
3574 $PHY -pch ............... Use precompiled header support.
3576 $DBN -no-dbus ........... Do not compile the QtDBus module.
3577 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3578 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3580 -reduce-relocations ..... Reduce relocations in the libraries through extra
3581 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3582 experimental; needs GNU ld >= 2.18).
3585 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3586 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3587 SBY=""
3588 SBN="*"
3589 else
3590 SBY="*"
3591 SBN=" "
3593 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3594 SBY="*"
3595 SBN=" "
3596 else
3597 SBY=" "
3598 SBN="*"
3601 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
3603 cat << EOF
3605 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3606 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3610 fi # X11/QWS
3612 if [ "$PLATFORM_X11" = "yes" ]; then
3613 if [ "$CFG_SM" = "no" ]; then
3614 SMY=" "
3615 SMN="*"
3616 else
3617 SMY="*"
3618 SMN=" "
3620 if [ "$CFG_XSHAPE" = "no" ]; then
3621 SHY=" "
3622 SHN="*"
3623 else
3624 SHY="*"
3625 SHN=" "
3627 if [ "$CFG_XINERAMA" = "no" ]; then
3628 XAY=" "
3629 XAN="*"
3630 else
3631 XAY="*"
3632 XAN=" "
3634 if [ "$CFG_FONTCONFIG" = "no" ]; then
3635 FCGY=" "
3636 FCGN="*"
3637 else
3638 FCGY="*"
3639 FCGN=" "
3641 if [ "$CFG_XCURSOR" = "no" ]; then
3642 XCY=" "
3643 XCN="*"
3644 else
3645 XCY="*"
3646 XCN=" "
3648 if [ "$CFG_XFIXES" = "no" ]; then
3649 XFY=" "
3650 XFN="*"
3651 else
3652 XFY="*"
3653 XFN=" "
3655 if [ "$CFG_XRANDR" = "no" ]; then
3656 XZY=" "
3657 XZN="*"
3658 else
3659 XZY="*"
3660 XZN=" "
3662 if [ "$CFG_XRENDER" = "no" ]; then
3663 XRY=" "
3664 XRN="*"
3665 else
3666 XRY="*"
3667 XRN=" "
3669 if [ "$CFG_MITSHM" = "no" ]; then
3670 XMY=" "
3671 XMN="*"
3672 else
3673 XMY="*"
3674 XMN=" "
3676 if [ "$CFG_XINPUT" = "no" ]; then
3677 XIY=" "
3678 XIN="*"
3679 else
3680 XIY="*"
3681 XIN=" "
3683 if [ "$CFG_XKB" = "no" ]; then
3684 XKY=" "
3685 XKN="*"
3686 else
3687 XKY="*"
3688 XKN=" "
3690 if [ "$CFG_IM" = "no" ]; then
3691 IMY=" "
3692 IMN="*"
3693 else
3694 IMY="*"
3695 IMN=" "
3697 cat << EOF
3699 Qt/X11 only:
3701 -no-gtkstyle ....... Do not build the GTK theme integration.
3702 + -gtkstyle .......... Build the GTK theme integration.
3704 * -no-nas-sound ...... Do not compile in NAS sound support.
3705 -system-nas-sound .. Use NAS libaudio from the operating system.
3706 See http://radscan.com/nas.html
3708 -no-opengl ......... Do not support OpenGL.
3709 + -opengl <api> ...... Enable OpenGL support.
3710 With no parameter, this will auto-detect the "best"
3711 OpenGL API to use. If desktop OpenGL is available, it
3712 will be used. Use desktop, es1, es1cl or es2 for <api>
3713 to force the use of the Desktop (OpenGL 1.x or 2.x),
3714 OpenGL ES 1.x Common profile, 1.x Common Lite profile
3715 or 2.x APIs instead. On X11, the EGL API will be used
3716 to manage GL contexts in the case of OpenGL ES
3718 -no-openvg ........ Do not support OpenVG.
3719 + -openvg ........... Enable OpenVG support.
3720 Requires EGL support, typically supplied by an OpenGL
3721 or other graphics implementation.
3723 $SMN -no-sm ............. Do not support X Session Management.
3724 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3726 $SHN -no-xshape ......... Do not compile XShape support.
3727 $SHY -xshape ............ Compile XShape support.
3728 Requires X11/extensions/shape.h.
3730 $SHN -no-xsync .......... Do not compile XSync support.
3731 $SHY -xsync ............. Compile XSync support.
3732 Requires X11/extensions/sync.h.
3734 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3735 $XAY -xinerama .......... Compile Xinerama support.
3736 Requires X11/extensions/Xinerama.h and libXinerama.
3737 By default, Xinerama support will be compiled if
3738 available and the shared libraries are dynamically
3739 loaded at runtime.
3741 $XCN -no-xcursor ........ Do not compile Xcursor support.
3742 $XCY -xcursor ........... Compile Xcursor support.
3743 Requires X11/Xcursor/Xcursor.h and libXcursor.
3744 By default, Xcursor support will be compiled if
3745 available and the shared libraries are dynamically
3746 loaded at runtime.
3748 $XFN -no-xfixes ......... Do not compile Xfixes support.
3749 $XFY -xfixes ............ Compile Xfixes support.
3750 Requires X11/extensions/Xfixes.h and libXfixes.
3751 By default, Xfixes support will be compiled if
3752 available and the shared libraries are dynamically
3753 loaded at runtime.
3755 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3756 $XZY -xrandr ............ Compile Xrandr support.
3757 Requires X11/extensions/Xrandr.h and libXrandr.
3759 $XRN -no-xrender ........ Do not compile Xrender support.
3760 $XRY -xrender ........... Compile Xrender support.
3761 Requires X11/extensions/Xrender.h and libXrender.
3763 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3764 $XMY -mitshm ............ Compile MIT-SHM support.
3765 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3767 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3768 $FCGY -fontconfig ........ Compile FontConfig support.
3769 Requires fontconfig/fontconfig.h, libfontconfig,
3770 freetype.h and libfreetype.
3772 $XIN -no-xinput.......... Do not compile Xinput support.
3773 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3774 which requires IRIX with wacom.h and libXi or
3775 XFree86 with X11/extensions/XInput.h and libXi.
3777 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3778 $XKY -xkb ............... Compile XKB support.
3783 if [ "$PLATFORM_MAC" = "yes" ]; then
3784 cat << EOF
3786 Qt/Mac only:
3788 -Fstring ........... Add an explicit framework path.
3789 -fw string ......... Add an explicit framework.
3791 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
3793 -carbon .............Build the Carbon version of Qt. 64-bit archs
3794 are not supported by carbon and will be built
3795 with cocoa
3797 * -framework ......... Build Qt as a series of frameworks and
3798 link tools against those frameworks.
3799 -no-framework ...... Do not build Qt as a series of frameworks.
3801 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3802 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3804 -universal ......... Equivalent to -arch "ppc x86"
3806 -arch <arch> ....... Build Qt for <arch>
3807 Example values for <arch>: x86 ppc x86_64 ppc64
3808 Multiple -arch arguments can be specified.
3810 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3811 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3816 if [ "$PLATFORM_QWS" = "yes" ]; then
3817 cat << EOF
3819 Qt for Embedded Linux only:
3821 -xplatform target ... The target platform when cross-compiling.
3823 -no-feature-<feature> Do not compile in <feature>.
3824 -feature-<feature> .. Compile in <feature>. The available features
3825 are described in src/corelib/global/qfeatures.txt
3827 -embedded <arch> .... This will enable the embedded build, you must have a
3828 proper license for this switch to work.
3829 Example values for <arch>: arm mips x86 generic
3831 -armfpa ............. Target platform uses the ARM-FPA floating point format.
3832 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3834 The floating point format is usually autodetected by configure. Use this
3835 to override the detected value.
3837 -little-endian ...... Target platform is little endian (LSB first).
3838 -big-endian ......... Target platform is big endian (MSB first).
3840 -host-little-endian . Host platform is little endian (LSB first).
3841 -host-big-endian .... Host platform is big endian (MSB first).
3843 You only need to specify the endianness when
3844 cross-compiling, otherwise the host
3845 endianness will be used.
3847 -no-freetype ........ Do not compile in Freetype2 support.
3848 -qt-freetype ........ Use the libfreetype bundled with Qt.
3849 * -system-freetype .... Use libfreetype from the operating system.
3850 See http://www.freetype.org/
3852 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3853 default ($CFG_QCONFIG).
3855 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3856 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3858 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3859 by default all available decorations are on.
3860 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3861 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3862 linked to at run time.
3863 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3864 -no-decoration-<style> ....Disable decoration <style> entirely.
3865 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3867 -no-opengl .......... Do not support OpenGL.
3868 -opengl <api> ....... Enable OpenGL ES support
3869 With no parameter, this will attempt to auto-detect OpenGL ES 1.x
3870 or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection.
3872 NOTE: A QGLScreen driver for the hardware is required to support
3873 OpenGL ES on Qt for Embedded Linux.
3875 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3876 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3877 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3878 linked to at run time.
3879 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3880 -no-gfx-<driver> ... Disable graphics <driver> entirely.
3881 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3883 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
3884 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3886 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
3887 at runtime.
3888 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
3890 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
3891 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3893 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
3894 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3895 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
3896 at runtime.
3897 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
3898 -no-mouse-<driver> ... Disable mouse <driver> entirely.
3899 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3901 -iwmmxt ............ Compile using the iWMMXt instruction set
3902 (available on some XScale CPUs).
3904 -no-neon ........... Do not compile with use of NEON instructions.
3909 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3910 if [ "$CFG_GLIB" = "no" ]; then
3911 GBY=" "
3912 GBN="+"
3913 else
3914 GBY="+"
3915 GBN=" "
3917 cat << EOF
3918 $GBN -no-glib ........... Do not compile Glib support.
3919 $GBY -glib .............. Compile Glib support.
3924 [ "x$ERROR" = "xyes" ] && exit 1
3925 exit 0
3926 fi # Help
3929 # -----------------------------------------------------------------------------
3930 # LICENSING, INTERACTIVE PART
3931 # -----------------------------------------------------------------------------
3933 if [ "$PLATFORM_QWS" = "yes" ]; then
3934 Platform="Qt for Embedded Linux"
3935 elif [ "$PLATFORM_MAC" = "yes" ]; then
3936 Platform="Qt for Mac OS X"
3937 else
3938 PLATFORM_X11=yes
3939 Platform="Qt for Linux/X11"
3942 echo
3943 echo "This is the $Platform ${EditionString} Edition."
3944 echo
3946 if [ "$Edition" = "NokiaInternalBuild" ]; then
3947 echo "Detected -nokia-developer option"
3948 echo "Nokia employees and agents are allowed to use this software under"
3949 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
3950 elif [ "$Edition" = "OpenSource" ]; then
3951 while true; do
3952 echo "You are licensed to use this software under the terms of"
3953 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3954 if [ -f "$relpath/LICENSE.GPL3" ]; then
3955 echo "You are also licensed to use this software under the terms of"
3956 echo "the GNU General Public License (GPL) versions 3."
3957 affix="either"
3958 else
3959 affix="the"
3961 echo
3962 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3963 echo "You have already accepted the terms of the $LicenseType license."
3964 acceptance=yes
3965 else
3966 if [ -f "$relpath/LICENSE.GPL3" ]; then
3967 echo "Type '3' to view the GNU General Public License version 3."
3969 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3970 echo "Type 'yes' to accept this license offer."
3971 echo "Type 'no' to decline this license offer."
3972 echo
3973 if echo '\c' | grep '\c' >/dev/null; then
3974 echo -n "Do you accept the terms of $affix license? "
3975 else
3976 echo "Do you accept the terms of $affix license? \c"
3978 read acceptance
3980 echo
3981 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3982 break
3983 elif [ "$acceptance" = "no" ]; then
3984 echo "You are not licensed to use this software."
3985 echo
3986 exit 1
3987 elif [ "$acceptance" = "3" ]; then
3988 more "$relpath/LICENSE.GPL3"
3989 elif [ "$acceptance" = "L" ]; then
3990 more "$relpath/LICENSE.LGPL"
3992 done
3993 elif [ "$Edition" = "Preview" ]; then
3994 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3995 while true; do
3997 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3998 echo "You have already accepted the terms of the $LicenseType license."
3999 acceptance=yes
4000 else
4001 echo "You are licensed to use this software under the terms of"
4002 echo "the $TheLicense"
4003 echo
4004 echo "Type '?' to read the Preview License."
4005 echo "Type 'yes' to accept this license offer."
4006 echo "Type 'no' to decline this license offer."
4007 echo
4008 if echo '\c' | grep '\c' >/dev/null; then
4009 echo -n "Do you accept the terms of the license? "
4010 else
4011 echo "Do you accept the terms of the license? \c"
4013 read acceptance
4015 echo
4016 if [ "$acceptance" = "yes" ]; then
4017 break
4018 elif [ "$acceptance" = "no" ] ;then
4019 echo "You are not licensed to use this software."
4020 echo
4021 exit 0
4022 elif [ "$acceptance" = "?" ]; then
4023 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4025 done
4026 elif [ "$Edition" != "OpenSource" ]; then
4027 if [ -n "$ExpiryDate" ]; then
4028 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4029 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4030 Today=`date +%Y%m%d`
4031 if [ "$Today" -gt "$ExpiryDate" ]; then
4032 case "$LicenseType" in
4033 Commercial|Academic|Educational)
4034 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4035 echo
4036 echo "NOTICE NOTICE NOTICE NOTICE"
4037 echo
4038 echo " Your support and upgrade period has expired."
4039 echo
4040 echo " You are no longer licensed to use this version of Qt."
4041 echo " Please contact qt-info@nokia.com to renew your support"
4042 echo " and upgrades for this license."
4043 echo
4044 echo "NOTICE NOTICE NOTICE NOTICE"
4045 echo
4046 exit 1
4047 else
4048 echo
4049 echo "WARNING WARNING WARNING WARNING"
4050 echo
4051 echo " Your support and upgrade period has expired."
4052 echo
4053 echo " You may continue to use your last licensed release"
4054 echo " of Qt under the terms of your existing license"
4055 echo " agreement. But you are not entitled to technical"
4056 echo " support, nor are you entitled to use any more recent"
4057 echo " Qt releases."
4058 echo
4059 echo " Please contact qt-info@nokia.com to renew your"
4060 echo " support and upgrades for this license."
4061 echo
4062 echo "WARNING WARNING WARNING WARNING"
4063 echo
4064 sleep 3
4067 Evaluation|*)
4068 echo
4069 echo "NOTICE NOTICE NOTICE NOTICE"
4070 echo
4071 echo " Your Evaluation license has expired."
4072 echo
4073 echo " You are no longer licensed to use this software. Please"
4074 echo " contact qt-info@nokia.com to purchase license, or install"
4075 echo " the Qt Open Source Edition if you intend to develop free"
4076 echo " software."
4077 echo
4078 echo "NOTICE NOTICE NOTICE NOTICE"
4079 echo
4080 exit 1
4082 esac
4085 TheLicense=`head -n 1 "$outpath/LICENSE"`
4086 while true; do
4087 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4088 echo "You have already accepted the terms of the $TheLicense."
4089 acceptance=yes
4090 else
4091 echo "You are licensed to use this software under the terms of"
4092 echo "the $TheLicense."
4093 echo
4094 echo "Type '?' to view the $TheLicense."
4095 echo "Type 'yes' to accept this license offer."
4096 echo "Type 'no' to decline this license offer."
4097 echo
4098 if echo '\c' | grep '\c' >/dev/null; then
4099 echo -n "Do you accept the terms of the $TheLicense? "
4100 else
4101 echo "Do you accept the terms of the $TheLicense? \c"
4103 read acceptance
4105 echo
4106 if [ "$acceptance" = "yes" ]; then
4107 break
4108 elif [ "$acceptance" = "no" ]; then
4109 echo "You are not licensed to use this software."
4110 echo
4111 exit 1
4112 else [ "$acceptance" = "?" ]
4113 more "$outpath/LICENSE"
4115 done
4118 # this should be moved somewhere else
4119 case "$PLATFORM" in
4120 aix-*)
4121 AIX_VERSION=`uname -v`
4122 if [ "$AIX_VERSION" -lt "5" ]; then
4123 QMakeVar add QMAKE_LIBS_X11 -lbind
4128 esac
4130 #-------------------------------------------------------------------------------
4131 # generate qconfig.cpp
4132 #-------------------------------------------------------------------------------
4133 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4135 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4136 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4137 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4138 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4139 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4140 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4141 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4142 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4143 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4144 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4145 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4146 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4147 DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4149 TODAY=`date +%Y-%m-%d`
4150 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4151 /* License Info */
4152 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4153 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4155 /* Installation date */
4156 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4160 if [ ! -z "$QT_HOST_PREFIX" ]; then
4161 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4162 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4163 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4164 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4165 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4166 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4167 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4168 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4169 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4170 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4171 HOSTDEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4173 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4175 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4176 /* Installation Info */
4177 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4178 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4179 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4180 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4181 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4182 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4183 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4184 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4185 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4186 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4187 static const char qt_configure_demos_path_str [256 + 12] = "$HOSTDEMOS_PATH_STR";
4188 #else // QT_BOOTSTRAPPED
4192 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4193 /* Installation Info */
4194 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4195 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4196 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4197 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4198 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4199 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4200 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4201 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4202 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4203 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4204 static const char qt_configure_demos_path_str [256 + 12] = "$DEMOS_PATH_STR";
4207 if [ ! -z "$QT_HOST_PREFIX" ]; then
4208 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4209 #endif // QT_BOOTSTRAPPED
4214 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4215 /* strlen( "qt_lcnsxxxx" ) == 12 */
4216 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4217 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4218 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4219 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4220 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4221 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4222 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4223 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4224 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4225 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4226 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4227 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4228 #define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;
4231 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4232 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4233 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4234 else
4235 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4236 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4237 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4240 # -----------------------------------------------------------------------------
4241 if [ "$LicenseType" = "Evaluation" ]; then
4242 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4243 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4244 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4247 if [ -n "$EVALKEY" ]; then
4248 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4249 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4250 /* Evaluation license key */
4251 static const char qt_eval_key_data [512 + 12] = "$EVALKEY";
4253 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4257 # -----------------------------------------------------------------------------
4258 # build qmake
4259 # -----------------------------------------------------------------------------
4261 # symlink includes
4262 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4263 SYNCQT_OPTS=
4264 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4265 if [ "$OPT_SHADOW" = "yes" ]; then
4266 "$outpath/bin/syncqt" $SYNCQT_OPTS
4267 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ]; then
4268 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS
4272 # $1: variable name
4273 # $2: optional transformation
4274 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4275 # is where the resulting variable is written to
4276 setBootstrapVariable()
4278 variableRegExp="^$1[^_A-Z0-9]"
4279 getQMakeConf | grep "$variableRegExp" | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4281 varLength = index($0, "=") - 1
4282 valStart = varLength + 2
4283 if (substr($0, varLength, 1) == "+") {
4284 varLength = varLength - 1
4285 valStart = valStart + 1
4287 var = substr($0, 0, varLength)
4288 gsub("[ \t]+", "", var)
4289 val = substr($0, valStart)
4290 printf "%s_%s = %s\n", var, NR, val
4292 END {
4293 if (length(var) > 0) {
4294 printf "%s =", var
4295 for (i = 1; i <= NR; ++i)
4296 printf " $(%s_%s)", var, i
4297 printf "\n"
4299 }' >> "$mkfile"
4302 # build qmake
4303 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4304 echo "Creating qmake. Please wait..."
4306 OLD_QCONFIG_H=
4307 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4308 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4309 if [ -f "$QCONFIG_H" ]; then
4310 OLD_QCONFIG_H=$QCONFIG_H
4311 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4314 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4315 # when building qmake, we use #defines for the install paths,
4316 # however they are real functions in the library
4317 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4318 mkdir -p "$outpath/src/corelib/global"
4319 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4320 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4323 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4324 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
4325 if [ '!' -f "$conf" ]; then
4326 ln -s "$QCONFIG_H" "$conf"
4328 done
4330 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4331 rm -f mkspecs/default
4332 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4333 # fix makefiles
4334 for mkfile in GNUmakefile Makefile; do
4335 EXTRA_LFLAGS=
4336 EXTRA_CFLAGS=
4337 in_mkfile="${mkfile}.in"
4338 if [ "$mkfile" = "Makefile" ]; then
4339 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4340 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4341 # fi
4342 in_mkfile="${mkfile}.unix"
4344 in_mkfile="$relpath/qmake/$in_mkfile"
4345 mkfile="$outpath/qmake/$mkfile"
4346 if [ -f "$mkfile" ]; then
4347 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4348 rm -f "$mkfile"
4350 [ -f "$in_mkfile" ] || continue
4352 echo "########################################################################" > "$mkfile"
4353 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4354 echo "########################################################################" >> "$mkfile"
4355 EXTRA_OBJS=
4356 EXTRA_SRCS=
4357 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4358 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4359 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4361 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4362 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4365 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4366 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4367 if [ "$CFG_SILENT" = "yes" ]; then
4368 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4369 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4370 else
4371 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4372 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4374 setBootstrapVariable QMAKE_CFLAGS
4375 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4376 setBootstrapVariable QMAKE_LFLAGS
4378 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4379 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4380 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4382 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4383 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4384 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4385 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4386 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4387 elif [ "$CFG_DEBUG" = "yes" ]; then
4388 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4389 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4390 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4391 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4394 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
4395 setBootstrapVariable QMAKE_RPATH 's,\$\$LITERAL_WHITESPACE, ,'
4396 for rpath in $RPATH_FLAGS; do
4397 EXTRA_LFLAGS="\$(QMAKE_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4398 done
4400 if [ "$PLATFORM_MAC" = "yes" ]; then
4401 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4402 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4403 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4404 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4405 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4406 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4407 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4408 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4409 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4410 X86_CFLAGS="-arch i386"
4411 X86_LFLAGS="-arch i386"
4412 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4413 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4414 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4416 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4417 PPC_CFLAGS="-arch ppc"
4418 PPC_LFLAGS="-arch ppc"
4419 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4420 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4421 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4423 if [ '!' -z "$CFG_SDK" ]; then
4424 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4425 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4426 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4427 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4428 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4431 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4432 if [ '!' -z "$D_FLAGS" ]; then
4433 for DEF in $D_FLAGS; do
4434 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4435 done
4437 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4438 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4439 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4440 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4441 echo >>"$mkfile"
4442 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4443 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4444 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4445 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4446 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4447 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4448 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4449 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4450 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4451 -e "s,@QMAKESPEC@,$adjqmakespec,g" "$in_mkfile" >>"$mkfile"
4453 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4454 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4455 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4456 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4457 rm "$mkfile.tmp"
4459 done
4461 QMAKE_BUILD_ERROR=no
4462 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4463 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4464 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4465 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4466 fi # Build qmake
4468 #-------------------------------------------------------------------------------
4469 # tests that need qmake
4470 #-------------------------------------------------------------------------------
4472 # detect availability of float math.h functions
4473 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4474 CFG_USE_FLOATMATH=yes
4475 else
4476 CFG_USE_FLOATMATH=no
4479 # detect mmx support
4480 if [ "${CFG_MMX}" = "auto" ]; then
4481 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4482 CFG_MMX=yes
4483 else
4484 CFG_MMX=no
4488 # detect 3dnow support
4489 if [ "${CFG_3DNOW}" = "auto" ]; then
4490 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4491 CFG_3DNOW=yes
4492 else
4493 CFG_3DNOW=no
4497 # detect sse support
4498 if [ "${CFG_SSE}" = "auto" ]; then
4499 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4500 CFG_SSE=yes
4501 else
4502 CFG_SSE=no
4506 # detect sse2 support
4507 if [ "${CFG_SSE2}" = "auto" ]; then
4508 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4509 CFG_SSE2=yes
4510 else
4511 CFG_SSE2=no
4515 # check iWMMXt support
4516 if [ "$CFG_IWMMXT" = "yes" ]; then
4517 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4518 if [ $? != "0" ]; then
4519 echo "The iWMMXt functionality test failed!"
4520 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4521 exit 1
4525 # detect neon support
4526 if ([ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]) && [ "${CFG_NEON}" = "auto" ]; then
4527 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
4528 CFG_NEON=yes
4529 else
4530 CFG_NEON=no
4534 # detect zlib
4535 if [ "$CFG_ZLIB" = "no" ]; then
4536 # Note: Qt no longer support builds without zlib
4537 # So we force a "no" to be "auto" here.
4538 # If you REALLY really need no zlib support, you can still disable
4539 # it by doing the following:
4540 # add "no-zlib" to mkspecs/qconfig.pri
4541 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4543 # There's no guarantee that Qt will build under those conditions
4545 CFG_ZLIB=auto
4546 ZLIB_FORCED=yes
4548 if [ "$CFG_ZLIB" = "auto" ]; then
4549 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
4550 CFG_ZLIB=system
4551 else
4552 CFG_ZLIB=yes
4556 # detect how jpeg should be built
4557 if [ "$CFG_JPEG" = "auto" ]; then
4558 if [ "$CFG_SHARED" = "yes" ]; then
4559 CFG_JPEG=plugin
4560 else
4561 CFG_JPEG=yes
4564 # detect jpeg
4565 if [ "$CFG_LIBJPEG" = "auto" ]; then
4566 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
4567 CFG_LIBJPEG=system
4568 else
4569 CFG_LIBJPEG=qt
4573 # detect how gif should be built
4574 if [ "$CFG_GIF" = "auto" ]; then
4575 if [ "$CFG_SHARED" = "yes" ]; then
4576 CFG_GIF=plugin
4577 else
4578 CFG_GIF=yes
4582 # detect how tiff should be built
4583 if [ "$CFG_TIFF" = "auto" ]; then
4584 if [ "$CFG_SHARED" = "yes" ]; then
4585 CFG_TIFF=plugin
4586 else
4587 CFG_TIFF=yes
4591 # detect tiff
4592 if [ "$CFG_LIBTIFF" = "auto" ]; then
4593 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
4594 CFG_LIBTIFF=system
4595 else
4596 CFG_LIBTIFF=qt
4600 # detect how mng should be built
4601 if [ "$CFG_MNG" = "auto" ]; then
4602 if [ "$CFG_SHARED" = "yes" ]; then
4603 CFG_MNG=plugin
4604 else
4605 CFG_MNG=yes
4608 # detect mng
4609 if [ "$CFG_LIBMNG" = "auto" ]; then
4610 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
4611 CFG_LIBMNG=system
4612 else
4613 CFG_LIBMNG=qt
4617 # detect png
4618 if [ "$CFG_LIBPNG" = "auto" ]; then
4619 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
4620 CFG_LIBPNG=system
4621 else
4622 CFG_LIBPNG=qt
4626 # detect accessibility
4627 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4628 CFG_ACCESSIBILITY=yes
4631 # auto-detect SQL-modules support
4632 for _SQLDR in $CFG_SQL_AVAILABLE; do
4633 case $_SQLDR in
4634 mysql)
4635 if [ "$CFG_SQL_mysql" != "no" ]; then
4636 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4637 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4638 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4639 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4640 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4641 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4642 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4644 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4645 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4646 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4647 echo " You need MySql 4 or higher."
4648 echo " If you believe this message is in error you may use the continue"
4649 echo " switch (-continue) to $0 to continue."
4650 exit 101
4651 else
4652 CFG_SQL_mysql="no"
4653 QT_LFLAGS_MYSQL=""
4654 QT_LFLAGS_MYSQL_R=""
4655 QT_CFLAGS_MYSQL=""
4657 else
4658 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
4659 QMakeVar add CONFIG use_libmysqlclient_r
4660 if [ "$CFG_SQL_mysql" = "auto" ]; then
4661 CFG_SQL_mysql=plugin
4663 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4664 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
4665 if [ "$CFG_SQL_mysql" = "auto" ]; then
4666 CFG_SQL_mysql=plugin
4668 else
4669 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4670 echo "MySQL support cannot be enabled due to functionality tests!"
4671 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4672 echo " If you believe this message is in error you may use the continue"
4673 echo " switch (-continue) to $0 to continue."
4674 exit 101
4675 else
4676 CFG_SQL_mysql=no
4677 QT_LFLAGS_MYSQL=""
4678 QT_LFLAGS_MYSQL_R=""
4679 QT_CFLAGS_MYSQL=""
4685 psql)
4686 if [ "$CFG_SQL_psql" != "no" ]; then
4687 if "$WHICH" pg_config >/dev/null 2>&1; then
4688 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4689 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4691 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4692 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4693 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
4694 if [ "$CFG_SQL_psql" = "auto" ]; then
4695 CFG_SQL_psql=plugin
4697 else
4698 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4699 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4700 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4701 echo " If you believe this message is in error you may use the continue"
4702 echo " switch (-continue) to $0 to continue."
4703 exit 101
4704 else
4705 CFG_SQL_psql=no
4706 QT_CFLAGS_PSQL=""
4707 QT_LFLAGS_PSQL=""
4712 odbc)
4713 if [ "$CFG_SQL_odbc" != "no" ]; then
4714 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
4715 if [ "$CFG_SQL_odbc" = "auto" ]; then
4716 CFG_SQL_odbc=plugin
4718 else
4719 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
4720 QT_LFLAGS_ODBC="-liodbc"
4721 if [ "$CFG_SQL_odbc" = "auto" ]; then
4722 CFG_SQL_odbc=plugin
4724 else
4725 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4726 echo "ODBC support cannot be enabled due to functionality tests!"
4727 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4728 echo " If you believe this message is in error you may use the continue"
4729 echo " switch (-continue) to $0 to continue."
4730 exit 101
4731 else
4732 CFG_SQL_odbc=no
4738 oci)
4739 if [ "$CFG_SQL_oci" != "no" ]; then
4740 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
4741 if [ "$CFG_SQL_oci" = "auto" ]; then
4742 CFG_SQL_oci=plugin
4744 else
4745 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4746 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4747 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4748 echo " If you believe this message is in error you may use the continue"
4749 echo " switch (-continue) to $0 to continue."
4750 exit 101
4751 else
4752 CFG_SQL_oci=no
4757 tds)
4758 if [ "$CFG_SQL_tds" != "no" ]; then
4759 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
4760 if [ "$CFG_SQL_tds" = "auto" ]; then
4761 CFG_SQL_tds=plugin
4763 else
4764 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4765 echo "TDS support cannot be enabled due to functionality tests!"
4766 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4767 echo " If you believe this message is in error you may use the continue"
4768 echo " switch (-continue) to $0 to continue."
4769 exit 101
4770 else
4771 CFG_SQL_tds=no
4776 db2)
4777 if [ "$CFG_SQL_db2" != "no" ]; then
4778 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
4779 if [ "$CFG_SQL_db2" = "auto" ]; then
4780 CFG_SQL_db2=plugin
4782 else
4783 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4784 echo "ODBC support cannot be enabled due to functionality tests!"
4785 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4786 echo " If you believe this message is in error you may use the continue"
4787 echo " switch (-continue) to $0 to continue."
4788 exit 101
4789 else
4790 CFG_SQL_db2=no
4795 ibase)
4796 if [ "$CFG_SQL_ibase" != "no" ]; then
4797 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
4798 if [ "$CFG_SQL_ibase" = "auto" ]; then
4799 CFG_SQL_ibase=plugin
4801 else
4802 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4803 echo "InterBase support cannot be enabled due to functionality tests!"
4804 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4805 echo " If you believe this message is in error you may use the continue"
4806 echo " switch (-continue) to $0 to continue."
4807 exit 101
4808 else
4809 CFG_SQL_ibase=no
4814 sqlite2)
4815 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4816 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
4817 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4818 CFG_SQL_sqlite2=plugin
4820 else
4821 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4822 echo "SQLite2 support cannot be enabled due to functionality tests!"
4823 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4824 echo " If you believe this message is in error you may use the continue"
4825 echo " switch (-continue) to $0 to continue."
4826 exit 101
4827 else
4828 CFG_SQL_sqlite2=no
4833 sqlite)
4834 if [ "$CFG_SQL_sqlite" != "no" ]; then
4835 SQLITE_AUTODETECT_FAILED="no"
4836 if [ "$CFG_SQLITE" = "system" ]; then
4837 if [ -n "$PKG_CONFIG" ]; then
4838 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4839 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4841 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
4842 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4843 CFG_SQL_sqlite=plugin
4845 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4846 else
4847 SQLITE_AUTODETECT_FAILED="yes"
4848 CFG_SQL_sqlite=no
4850 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4851 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4852 CFG_SQL_sqlite=plugin
4854 else
4855 SQLITE_AUTODETECT_FAILED="yes"
4856 CFG_SQL_sqlite=no
4859 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4860 echo "SQLite support cannot be enabled due to functionality tests!"
4861 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4862 echo " If you believe this message is in error you may use the continue"
4863 echo " switch (-continue) to $0 to continue."
4864 exit 101
4869 if [ "$OPT_VERBOSE" = "yes" ]; then
4870 echo "unknown SQL driver: $_SQLDR"
4873 esac
4874 done
4876 # auto-detect NIS support
4877 if [ "$CFG_NIS" != "no" ]; then
4878 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
4879 CFG_NIS=yes
4880 else
4881 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4882 echo "NIS support cannot be enabled due to functionality tests!"
4883 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4884 echo " If you believe this message is in error you may use the continue"
4885 echo " switch (-continue) to $0 to continue."
4886 exit 101
4887 else
4888 CFG_NIS=no
4893 # auto-detect CUPS support
4894 if [ "$CFG_CUPS" != "no" ]; then
4895 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
4896 CFG_CUPS=yes
4897 else
4898 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4899 echo "Cups support cannot be enabled due to functionality tests!"
4900 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4901 echo " If you believe this message is in error you may use the continue"
4902 echo " switch (-continue) to $0 to continue."
4903 exit 101
4904 else
4905 CFG_CUPS=no
4910 # auto-detect iconv(3) support
4911 if [ "$CFG_ICONV" != "no" ]; then
4912 if [ "$PLATFORM_QWS" = "yes" ]; then
4913 CFG_ICONV=no
4914 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
4915 CFG_ICONV=yes
4916 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
4917 CFG_ICONV=gnu
4918 else
4919 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4920 echo "Iconv support cannot be enabled due to functionality tests!"
4921 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4922 echo " If you believe this message is in error you may use the continue"
4923 echo " switch (-continue) to $0 to continue."
4924 exit 101
4925 else
4926 CFG_ICONV=no
4931 # auto-detect libdbus-1 support
4932 if [ "$CFG_DBUS" != "no" ]; then
4933 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4934 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4935 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4937 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
4938 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4939 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4940 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4941 else
4942 if [ "$CFG_DBUS" = "auto" ]; then
4943 CFG_DBUS=no
4944 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4945 # CFG_DBUS is "yes" or "linked" here
4947 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4948 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4949 echo " If you believe this message is in error you may use the continue"
4950 echo " switch (-continue) to $0 to continue."
4951 exit 101
4956 # Generate a CRC of the namespace for using in constants for the Carbon port.
4957 # This should mean that you really *can* load two Qt's and have our custom
4958 # Carbon events work.
4959 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
4960 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`
4963 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
4965 # detect EGL support
4966 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
4967 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
4968 CFG_EGL=yes
4969 CFG_EGL_GLES_INCLUDES=no
4970 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
4971 # EGL specified by QMAKE_*_EGL, included with <GLES/egl.h>
4972 CFG_EGL=yes
4973 CFG_EGL_GLES_INCLUDES=yes
4975 if ( [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es1cl" ] || [ "$CFG_OPENGL" = "es2" ] ) && [ "$CFG_EGL" != "yes" ]; then
4976 echo "The EGL functionality test failed!"
4977 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
4978 echo " You might need to modify the include and library search paths by editing"
4979 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
4980 echo " ${XQMAKESPEC}."
4981 exit 1
4985 # auto-detect Glib support
4986 if [ "$CFG_GLIB" != "no" ]; then
4987 if [ -n "$PKG_CONFIG" ]; then
4988 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4989 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4991 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
4992 CFG_GLIB=yes
4993 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4994 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4995 else
4996 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4997 echo "Glib support cannot be enabled due to functionality tests!"
4998 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4999 echo " If you believe this message is in error you may use the continue"
5000 echo " switch (-continue) to $0 to continue."
5001 exit 101
5002 else
5003 CFG_GLIB=no
5008 if [ "$CFG_PHONON" != "no" ]; then
5009 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5010 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5011 if [ -n "$PKG_CONFIG" ]; then
5012 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5013 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5015 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
5016 CFG_GSTREAMER=yes
5017 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5018 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5019 else
5020 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5021 echo "Gstreamer support cannot be enabled due to functionality tests!"
5022 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5023 echo " If you believe this message is in error you may use the continue"
5024 echo " switch (-continue) to $0 to continue."
5025 exit 101
5026 else
5027 CFG_GSTREAMER=no
5030 elif [ "$CFG_GLIB" = "no" ]; then
5031 CFG_GSTREAMER=no
5034 if [ "$CFG_GSTREAMER" = "yes" ]; then
5035 CFG_PHONON=yes
5036 else
5037 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5038 echo "Phonon support cannot be enabled due to functionality tests!"
5039 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5040 echo " If you believe this message is in error you may use the continue"
5041 echo " switch (-continue) to $0 to continue."
5042 exit 101
5043 else
5044 CFG_PHONON=no
5047 else
5048 CFG_PHONON=yes
5051 fi # X11/QWS
5053 # x11
5054 if [ "$PLATFORM_X11" = "yes" ]; then
5055 x11tests="$relpath/config.tests/x11"
5056 X11TESTS_FLAGS=
5058 # work around broken X11 headers when using GCC 2.95 or later
5059 NOTYPE=no
5060 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5061 if [ $NOTYPE = "yes" ]; then
5062 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5063 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5066 # Check we actually have X11 :-)
5067 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5068 if [ $? != "0" ]; then
5069 echo "Basic XLib functionality test failed!"
5070 echo " You might need to modify the include and library search paths by editing"
5071 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5072 exit 1
5075 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5076 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5077 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
5078 CFG_OPENGL=desktop
5079 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
5080 CFG_OPENGL=es2
5081 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
5082 CFG_OPENGL=es1
5083 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
5084 CFG_OPENGL=es1cl
5085 else
5086 if [ "$CFG_OPENGL" = "yes" ]; then
5087 echo "All the OpenGL functionality tests failed!"
5088 echo " You might need to modify the include and library search paths by editing"
5089 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5090 echo " ${XQMAKESPEC}."
5091 exit 1
5093 CFG_OPENGL=no
5095 case "$PLATFORM" in
5096 hpux*)
5097 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5098 if [ "$CFG_OPENGL" = "desktop" ]; then
5099 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5100 if [ $? != "0" ]; then
5101 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5107 esac
5108 elif [ "$CFG_OPENGL" = "es1cl" ]; then
5109 # OpenGL ES 1.x common lite
5110 "$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
5111 if [ $? != "0" ]; then
5112 echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
5113 echo " You might need to modify the include and library search paths by editing"
5114 echo " QMAKE_INCDIR_OPENGL_ES1CL, QMAKE_LIBDIR_OPENGL_ES1CL and QMAKE_LIBS_OPENGL_ES1CL in"
5115 echo " ${XQMAKESPEC}."
5116 exit 1
5118 elif [ "$CFG_OPENGL" = "es1" ]; then
5119 # OpenGL ES 1.x
5120 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5121 if [ $? != "0" ]; then
5122 echo "The OpenGL ES 1.x functionality test failed!"
5123 echo " You might need to modify the include and library search paths by editing"
5124 echo " QMAKE_INCDIR_OPENGL_ES1, QMAKE_LIBDIR_OPENGL_ES1 and QMAKE_LIBS_OPENGL_ES1 in"
5125 echo " ${XQMAKESPEC}."
5126 exit 1
5128 elif [ "$CFG_OPENGL" = "es2" ]; then
5129 #OpenGL ES 2.x
5130 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5131 if [ $? != "0" ]; then
5132 echo "The OpenGL ES 2.0 functionality test failed!"
5133 echo " You might need to modify the include and library search paths by editing"
5134 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5135 echo " ${XQMAKESPEC}."
5136 exit 1
5138 elif [ "$CFG_OPENGL" = "desktop" ]; then
5139 # Desktop OpenGL support
5140 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5141 if [ $? != "0" ]; then
5142 echo "The OpenGL functionality test failed!"
5143 echo " You might need to modify the include and library search paths by editing"
5144 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5145 echo " ${XQMAKESPEC}."
5146 exit 1
5148 case "$PLATFORM" in
5149 hpux*)
5150 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5151 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5152 if [ $? != "0" ]; then
5153 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5158 esac
5161 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5162 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5163 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5164 CFG_GRAPHICS_SYSTEM=default
5167 # auto-detect Xcursor support
5168 if [ "$CFG_XCURSOR" != "no" ]; then
5169 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
5170 if [ "$CFG_XCURSOR" != "runtime" ]; then
5171 CFG_XCURSOR=yes;
5173 else
5174 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5175 echo "Xcursor support cannot be enabled due to functionality tests!"
5176 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5177 echo " If you believe this message is in error you may use the continue"
5178 echo " switch (-continue) to $0 to continue."
5179 exit 101
5180 else
5181 CFG_XCURSOR=no
5186 # auto-detect Xfixes support
5187 if [ "$CFG_XFIXES" != "no" ]; then
5188 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5189 if [ "$CFG_XFIXES" != "runtime" ]; then
5190 CFG_XFIXES=yes;
5192 else
5193 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5194 echo "Xfixes support cannot be enabled due to functionality tests!"
5195 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5196 echo " If you believe this message is in error you may use the continue"
5197 echo " switch (-continue) to $0 to continue."
5198 exit 101
5199 else
5200 CFG_XFIXES=no
5205 # auto-detect Xrandr support (resize and rotate extension)
5206 if [ "$CFG_XRANDR" != "no" ]; then
5207 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
5208 if [ "$CFG_XRANDR" != "runtime" ]; then
5209 CFG_XRANDR=yes
5211 else
5212 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5213 echo "Xrandr support cannot be enabled due to functionality tests!"
5214 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5215 echo " If you believe this message is in error you may use the continue"
5216 echo " switch (-continue) to $0 to continue."
5217 exit 101
5218 else
5219 CFG_XRANDR=no
5224 # auto-detect Xrender support
5225 if [ "$CFG_XRENDER" != "no" ]; then
5226 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
5227 CFG_XRENDER=yes
5228 else
5229 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5230 echo "Xrender support cannot be enabled due to functionality tests!"
5231 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5232 echo " If you believe this message is in error you may use the continue"
5233 echo " switch (-continue) to $0 to continue."
5234 exit 101
5235 else
5236 CFG_XRENDER=no
5241 # auto-detect MIT-SHM support
5242 if [ "$CFG_MITSHM" != "no" ]; then
5243 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
5244 CFG_MITSHM=yes
5245 else
5246 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5247 echo "MITSHM support cannot be enabled due to functionality tests!"
5248 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5249 echo " If you believe this message is in error you may use the continue"
5250 echo " switch (-continue) to $0 to continue."
5251 exit 101
5252 else
5253 CFG_MITSHM=no
5258 # auto-detect FontConfig support
5259 if [ "$CFG_FONTCONFIG" != "no" ]; then
5260 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5261 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5262 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5263 else
5264 QT_CFLAGS_FONTCONFIG=
5265 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5267 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
5268 CFG_FONTCONFIG=yes
5269 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5270 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5271 CFG_LIBFREETYPE=system
5272 else
5273 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5274 echo "FontConfig support cannot be enabled due to functionality tests!"
5275 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5276 echo " If you believe this message is in error you may use the continue"
5277 echo " switch (-continue) to $0 to continue."
5278 exit 101
5279 else
5280 CFG_FONTCONFIG=no
5285 # auto-detect Session Management support
5286 if [ "$CFG_SM" = "auto" ]; then
5287 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
5288 CFG_SM=yes
5289 else
5290 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5291 echo "Session Management support cannot be enabled due to functionality tests!"
5292 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5293 echo " If you believe this message is in error you may use the continue"
5294 echo " switch (-continue) to $0 to continue."
5295 exit 101
5296 else
5297 CFG_SM=no
5302 # auto-detect SHAPE support
5303 if [ "$CFG_XSHAPE" != "no" ]; then
5304 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
5305 CFG_XSHAPE=yes
5306 else
5307 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5308 echo "XShape support cannot be enabled due to functionality tests!"
5309 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5310 echo " If you believe this message is in error you may use the continue"
5311 echo " switch (-continue) to $0 to continue."
5312 exit 101
5313 else
5314 CFG_XSHAPE=no
5319 # auto-detect XSync support
5320 if [ "$CFG_XSYNC" != "no" ]; then
5321 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
5322 CFG_XSYNC=yes
5323 else
5324 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5325 echo "XSync support cannot be enabled due to functionality tests!"
5326 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5327 echo " If you believe this message is in error you may use the continue"
5328 echo " switch (-continue) to $0 to continue."
5329 exit 101
5330 else
5331 CFG_XSYNC=no
5336 # auto-detect Xinerama support
5337 if [ "$CFG_XINERAMA" != "no" ]; then
5338 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
5339 if [ "$CFG_XINERAMA" != "runtime" ]; then
5340 CFG_XINERAMA=yes
5342 else
5343 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5344 echo "Xinerama support cannot be enabled due to functionality tests!"
5345 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5346 echo " If you believe this message is in error you may use the continue"
5347 echo " switch (-continue) to $0 to continue."
5348 exit 101
5349 else
5350 CFG_XINERAMA=no
5355 # auto-detect Xinput support
5356 if [ "$CFG_XINPUT" != "no" ]; then
5357 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
5358 if [ "$CFG_XINPUT" != "runtime" ]; then
5359 CFG_XINPUT=yes
5361 else
5362 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5363 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5364 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5365 echo " If you believe this message is in error you may use the continue"
5366 echo " switch (-continue) to $0 to continue."
5367 exit 101
5368 else
5369 CFG_XINPUT=no
5374 # auto-detect XKB support
5375 if [ "$CFG_XKB" != "no" ]; then
5376 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
5377 CFG_XKB=yes
5378 else
5379 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5380 echo "XKB support cannot be enabled due to functionality tests!"
5381 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5382 echo " If you believe this message is in error you may use the continue"
5383 echo " switch (-continue) to $0 to continue."
5384 exit 101
5385 else
5386 CFG_XKB=no
5391 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5392 if [ -n "$PKG_CONFIG" ]; then
5393 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5394 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5396 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5397 CFG_QGTKSTYLE=yes
5398 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5399 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5400 else
5401 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5402 echo "Gtk theme support cannot be enabled due to functionality tests!"
5403 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5404 echo " If you believe this message is in error you may use the continue"
5405 echo " switch (-continue) to $0 to continue."
5406 exit 101
5407 else
5408 CFG_QGTKSTYLE=no
5411 elif [ "$CFG_GLIB" = "no" ]; then
5412 CFG_QGTKSTYLE=no
5414 fi # X11
5417 if [ "$PLATFORM_MAC" = "yes" ]; then
5418 if [ "$CFG_PHONON" != "no" ]; then
5419 # Always enable Phonon (unless it was explicitly disabled)
5420 CFG_PHONON=yes
5424 # QWS
5425 if [ "$PLATFORM_QWS" = "yes" ]; then
5427 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5428 if [ "$CFG_OPENGL" = "yes" ]; then
5429 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
5430 CFG_OPENGL=es2
5431 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
5432 CFG_OPENGL=es1
5433 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
5434 CFG_OPENGL=es1cl
5435 else
5436 echo "All the OpenGL ES functionality tests failed!"
5437 echo " You might need to modify the include and library search paths by editing"
5438 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5439 echo " ${XQMAKESPEC}."
5440 exit 1
5442 elif [ "$CFG_OPENGL" = "es1" ]; then
5443 # OpenGL ES 1.x
5444 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5445 if [ $? != "0" ]; then
5446 echo "The OpenGL ES 1.x functionality test failed!"
5447 echo " You might need to modify the include and library search paths by editing"
5448 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5449 echo " ${XQMAKESPEC}."
5450 exit 1
5452 elif [ "$CFG_OPENGL" = "es2" ]; then
5453 #OpenGL ES 2.x
5454 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5455 if [ $? != "0" ]; then
5456 echo "The OpenGL ES 2.0 functionality test failed!"
5457 echo " You might need to modify the include and library search paths by editing"
5458 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5459 echo " ${XQMAKESPEC}."
5460 exit 1
5462 elif [ "$CFG_OPENGL" = "desktop" ]; then
5463 # Desktop OpenGL support
5464 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5465 exit 1
5468 # screen drivers
5469 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5470 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5471 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
5472 if [ $? != "0" ]; then
5473 echo "The Ahi screen driver functionality test failed!"
5474 echo " You might need to modify the include and library search paths by editing"
5475 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5476 echo " ${XQMAKESPEC}."
5477 exit 1
5481 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5482 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
5483 if [ $? != "0" ]; then
5484 echo "The SVGAlib screen driver functionality test failed!"
5485 echo " You might need to modify the include and library search paths by editing"
5486 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5487 echo " ${XQMAKESPEC}."
5488 exit 1
5492 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5493 if [ -n "$PKG_CONFIG" ]; then
5494 if $PKG_CONFIG --exists directfb 2>/dev/null; then
5495 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5496 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
5497 elif directfb-config --version >/dev/null 2>&1; then
5498 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
5499 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
5503 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5504 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
5505 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
5506 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
5508 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5509 QMakeVar set QT_DEFINES_DIRECTFB "QT3_SUPPORT"
5512 "$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
5513 if [ $? != "0" ]; then
5514 echo "The DirectFB screen driver functionality test failed!"
5515 echo " You might need to modify the include and library search paths by editing"
5516 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5517 echo " ${XQMAKESPEC}."
5518 exit 1
5522 done
5524 # mouse drivers
5525 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5526 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5527 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
5528 if [ $? != "0" ]; then
5529 echo "The tslib functionality test failed!"
5530 echo " You might need to modify the include and library search paths by editing"
5531 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5532 echo " ${XQMAKESPEC}."
5533 exit 1
5536 done
5538 CFG_QGTKSTYLE=no
5540 # sound
5541 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
5542 if [ $? != "0" ]; then
5543 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
5546 fi # QWS
5548 # freetype support
5549 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
5550 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
5551 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5552 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
5553 CFG_LIBFREETYPE=system
5554 else
5555 CFG_LIBFREETYPE=yes
5559 if [ "$CFG_ENDIAN" = "auto" ]; then
5560 if [ "$PLATFORM_MAC" = "yes" ]; then
5561 true #leave as auto
5562 else
5563 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5564 F="$?"
5565 if [ "$F" -eq 0 ]; then
5566 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5567 elif [ "$F" -eq 1 ]; then
5568 CFG_ENDIAN="Q_BIG_ENDIAN"
5569 else
5570 echo
5571 echo "The target system byte order could not be detected!"
5572 echo "Turn on verbose messaging (-v) to see the final report."
5573 echo "You can use the -little-endian or -big-endian switch to"
5574 echo "$0 to continue."
5575 exit 101
5580 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5581 if [ "$PLATFORM_MAC" = "yes" ]; then
5582 true #leave as auto
5583 else
5584 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5585 F="$?"
5586 if [ "$F" -eq 0 ]; then
5587 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
5588 elif [ "$F" -eq 1 ]; then
5589 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
5590 else
5591 echo
5592 echo "The host system byte order could not be detected!"
5593 echo "Turn on verbose messaging (-v) to see the final report."
5594 echo "You can use the -host-little-endian or -host-big-endian switch to"
5595 echo "$0 to continue."
5596 exit 101
5601 if [ "$CFG_ARMFPA" != "auto" ]; then
5602 if [ "$CFG_ARMFPA" = "yes" ]; then
5603 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5604 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5605 else
5606 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
5608 else
5609 CFG_DOUBLEFORMAT="normal"
5614 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5615 if [ "$PLATFORM_QWS" != "yes" ]; then
5616 CFG_DOUBLEFORMAT=normal
5617 else
5618 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5619 F="$?"
5620 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5621 CFG_DOUBLEFORMAT=normal
5622 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
5623 CFG_DOUBLEFORMAT=normal
5624 elif [ "$F" -eq 10 ]; then
5625 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
5626 elif [ "$F" -eq 11 ]; then
5627 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
5628 elif [ "$F" -eq 12 ]; then
5629 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5630 CFG_ARMFPA="yes"
5631 elif [ "$F" -eq 13 ]; then
5632 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
5633 CFG_ARMFPA="yes"
5634 else
5635 echo
5636 echo "The system floating point format could not be detected."
5637 echo "This may cause data to be generated in a wrong format"
5638 echo "Turn on verbose messaging (-v) to see the final report."
5639 # we do not fail on this since this is a new test, and if it fails,
5640 # the old behavior should be correct in most cases
5641 CFG_DOUBLEFORMAT=normal
5646 HAVE_STL=no
5647 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5648 HAVE_STL=yes
5651 if [ "$CFG_STL" != "no" ]; then
5652 if [ "$HAVE_STL" = "yes" ]; then
5653 CFG_STL=yes
5654 else
5655 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5656 echo "STL support cannot be enabled due to functionality tests!"
5657 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5658 echo " If you believe this message is in error you may use the continue"
5659 echo " switch (-continue) to $0 to continue."
5660 exit 101
5661 else
5662 CFG_STL=no
5667 # find if the platform supports IPv6
5668 if [ "$CFG_IPV6" != "no" ]; then
5669 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
5670 CFG_IPV6=yes
5671 else
5672 if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5673 echo "IPv6 support cannot be enabled due to functionality tests!"
5674 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5675 echo " If you believe this message is in error you may use the continue"
5676 echo " switch (-continue) to $0 to continue."
5677 exit 101
5678 else
5679 CFG_IPV6=no
5684 # detect POSIX clock_gettime()
5685 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5686 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
5687 CFG_CLOCK_GETTIME=yes
5688 else
5689 CFG_CLOCK_GETTIME=no
5693 # detect POSIX monotonic clocks
5694 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5695 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
5696 CFG_CLOCK_MONOTONIC=yes
5697 else
5698 CFG_CLOCK_MONOTONIC=no
5700 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5701 CFG_CLOCK_MONOTONIC=no
5704 # detect mremap
5705 if [ "$CFG_MREMAP" = "auto" ]; then
5706 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5707 CFG_MREMAP=yes
5708 else
5709 CFG_MREMAP=no
5713 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5714 if [ "$CFG_GETADDRINFO" != "no" ]; then
5715 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5716 CFG_GETADDRINFO=yes
5717 else
5718 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5719 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5720 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5721 echo " If you believe this message is in error you may use the continue"
5722 echo " switch (-continue) to $0 to continue."
5723 exit 101
5724 else
5725 CFG_GETADDRINFO=no
5730 # find if the platform provides inotify
5731 if [ "$CFG_INOTIFY" != "no" ]; then
5732 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5733 CFG_INOTIFY=yes
5734 else
5735 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5736 echo "inotify support cannot be enabled due to functionality tests!"
5737 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5738 echo " If you believe this message is in error you may use the continue"
5739 echo " switch (-continue) to $0 to continue."
5740 exit 101
5741 else
5742 CFG_INOTIFY=no
5747 # find if the platform provides if_nametoindex (ipv6 interface name support)
5748 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5749 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
5750 CFG_IPV6IFNAME=yes
5751 else
5752 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5753 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5754 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5755 echo " If you believe this message is in error you may use the continue"
5756 echo " switch (-continue) to $0 to continue."
5757 exit 101
5758 else
5759 CFG_IPV6IFNAME=no
5764 # find if the platform provides getifaddrs (network interface enumeration)
5765 if [ "$CFG_GETIFADDRS" != "no" ]; then
5766 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5767 CFG_GETIFADDRS=yes
5768 else
5769 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5770 echo "getifaddrs support cannot be enabled due to functionality tests!"
5771 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5772 echo " If you believe this message is in error you may use the continue"
5773 echo " switch (-continue) to $0 to continue."
5774 exit 101
5775 else
5776 CFG_GETIFADDRS=no
5781 # find if the platform supports X/Open Large File compilation environment
5782 if [ "$CFG_LARGEFILE" != "no" ]; then
5783 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
5784 CFG_LARGEFILE=yes
5785 else
5786 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5787 echo "X/Open Large File support cannot be enabled due to functionality tests!"
5788 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5789 echo " If you believe this message is in error you may use the continue"
5790 echo " switch (-continue) to $0 to continue."
5791 exit 101
5792 else
5793 CFG_LARGEFILE=no
5798 # detect OpenSSL
5799 if [ "$CFG_OPENSSL" != "no" ]; then
5800 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
5801 if [ "$CFG_OPENSSL" = "auto" ]; then
5802 CFG_OPENSSL=yes
5804 else
5805 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5806 echo "OpenSSL support cannot be enabled due to functionality tests!"
5807 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5808 echo " If you believe this message is in error you may use the continue"
5809 echo " switch (-continue) to $0 to continue."
5810 exit 101
5811 else
5812 CFG_OPENSSL=no
5817 # detect OpenVG support
5818 if [ "$CFG_OPENVG" != "no" ]; then
5819 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
5820 if [ "$CFG_OPENVG" = "auto" ]; then
5821 CFG_OPENVG=yes
5823 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
5824 if [ "$CFG_OPENVG" = "auto" ]; then
5825 CFG_OPENVG=yes
5827 CFG_OPENVG_ON_OPENGL=yes
5828 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
5829 if [ "$CFG_OPENVG" = "auto" ]; then
5830 CFG_OPENVG=yes
5832 CFG_OPENVG_LC_INCLUDES=yes
5833 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
5834 if [ "$CFG_OPENVG" = "auto" ]; then
5835 CFG_OPENVG=yes
5837 CFG_OPENVG_LC_INCLUDES=yes
5838 CFG_OPENVG_ON_OPENGL=yes
5839 else
5840 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5841 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5842 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5843 echo " If you believe this message is in error you may use the continue"
5844 echo " switch (-continue) to $0 to continue."
5845 exit 101
5846 else
5847 CFG_OPENVG=no
5850 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
5851 CFG_OPENVG_SHIVA=yes
5855 # if openvg is disabled and the user specified graphicssystem vg, disable it...
5856 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
5857 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
5858 CFG_GRAPHICS_SYSTEM=default
5861 if [ "$CFG_PTMALLOC" != "no" ]; then
5862 # build ptmalloc, copy .a file to lib/
5863 echo "Building ptmalloc. Please wait..."
5864 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
5865 mkdir "$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
5867 QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
5870 if [ "$CFG_ALSA" = "auto" ]; then
5871 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5872 CFG_ALSA=yes
5873 else
5874 CFG_ALSA=no
5878 if [ -f "$relpath/src/declarative/declarative.pro" ]; then
5879 if [ "$CFG_DECLARATIVE" = "auto" ]; then
5880 CFG_DECLARATIVE=yes
5882 else
5883 if [ "$CFG_DECLARATIVE" = "auto" ] || [ "$CFG_DECLARATIVE" = "no" ]; then
5884 CFG_DECLARATIVE=no
5885 else
5886 echo "Error: Unable to locate the qt-declarative package. Refer to the documentation on how to build the package."
5887 exit 1
5891 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5892 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
5893 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5894 if [ $? != "0" ]; then
5895 CFG_JAVASCRIPTCORE_JIT=no
5900 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5901 QMakeVar set JAVASCRIPTCORE_JIT yes
5902 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5903 QMakeVar set JAVASCRIPTCORE_JIT no
5906 #-------------------------------------------------------------------------------
5907 # ask for all that hasn't been auto-detected or specified in the arguments
5908 #-------------------------------------------------------------------------------
5910 ### fix this: user input should be validated in a loop
5911 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PLATFORM_QWS" = "yes" ]; then
5912 echo
5913 echo "Choose pixel-depths to support:"
5914 echo
5915 echo " 1. 1bpp, black/white"
5916 echo " 4. 4bpp, grayscale"
5917 echo " 8. 8bpp, paletted"
5918 echo " 12. 12bpp, rgb 4-4-4"
5919 echo " 15. 15bpp, rgb 5-5-5"
5920 echo " 16. 16bpp, rgb 5-6-5"
5921 echo " 18. 18bpp, rgb 6-6-6"
5922 echo " 24. 24bpp, rgb 8-8-8"
5923 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
5924 echo " all. All supported depths"
5925 echo
5926 echo "Your choices (default 8,16,32):"
5927 read CFG_QWS_DEPTHS
5928 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
5929 CFG_QWS_DEPTHS=8,16,32
5932 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
5933 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
5934 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
5936 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
5937 case $D in
5938 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
5939 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
5940 esac
5941 done
5944 # enable dwarf2 support on Mac
5945 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5946 QT_CONFIG="$QT_CONFIG dwarf2"
5949 # Set the default arch if there are no "-arch" arguments on the configure line
5950 # For "-carbon" builds: 32 bit x86/ppc.
5951 # For builds on snow leopard : compiler default (64-bit).
5952 # For builds on leopard : compiler default (32-bit).
5953 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
5954 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
5956 if [ "$CFG_MAC_CARBON" = "yes" ]; then
5957 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
5958 CFG_MAC_ARCHS=" x86"
5959 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
5960 CFG_MAC_ARCHS=" ppc"
5961 else
5962 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
5964 else
5965 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
5968 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
5971 # enable Cocoa and/or Carbon on Mac
5972 # -carbon on the command line disables Cocoa, except for 64-bit archs
5973 if [ "$CFG_MAC_CARBON" = "yes" ]; then
5974 CFG_MAC_CARBON="YES"
5975 CFG_MAC_COCOA="NO"
5977 # check which archs are in use, enable cocoa if we find a 64-bit one
5978 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
5979 CFG_MAC_COCOA="yes";
5980 CFG_MAC_CARBON="no";
5981 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
5982 CFG_MAC_CARBON="yes";
5984 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
5985 CFG_MAC_CARBON="yes";
5990 # select Carbon on 10.4 Tiger.
5991 if [ "$PLATFORM_MAC" = "yes" ]; then
5992 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
5993 if [ "$VERSION" == 8 ]; then
5994 CFG_MAC_COCOA="no";
5995 CFG_MAC_CARBON="yes";
5999 # set the global Mac deployment target. This is overridden on an arch-by-arch basis
6000 # in some cases, see code further down
6001 case "$PLATFORM,$CFG_MAC_COCOA" in
6002 macx*,yes)
6003 # Cocoa
6004 QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5
6006 macx*,no)
6007 # gcc, Carbon
6008 QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4
6010 esac
6012 # disable Qt 3 support on VxWorks
6013 case "$XPLATFORM" in
6014 unsupported/vxworks*)
6015 CFG_QT3SUPPORT="no"
6017 esac
6019 # enable Qt 3 support functionality
6020 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
6021 QT_CONFIG="$QT_CONFIG qt3support"
6024 # enable Phonon
6025 if [ "$CFG_PHONON" = "yes" ]; then
6026 QT_CONFIG="$QT_CONFIG phonon"
6027 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6028 QT_CONFIG="$QT_CONFIG phonon-backend"
6030 else
6031 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6034 # disable accessibility
6035 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6036 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6037 else
6038 QT_CONFIG="$QT_CONFIG accessibility"
6041 # enable egl
6042 if [ "$CFG_EGL" = "no" ]; then
6043 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6044 else
6045 QT_CONFIG="$QT_CONFIG egl"
6046 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6047 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6051 # enable openvg
6052 if [ "$CFG_OPENVG" = "no" ]; then
6053 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6054 else
6055 QT_CONFIG="$QT_CONFIG openvg"
6056 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6057 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6059 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6060 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6062 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6063 QT_CONFIG="$QT_CONFIG shivavg"
6064 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6068 # enable opengl
6069 if [ "$CFG_OPENGL" = "no" ]; then
6070 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6071 else
6072 QT_CONFIG="$QT_CONFIG opengl"
6075 if [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es1cl" ] || [ "$CFG_OPENGL" = "es2" ]; then
6076 if [ "$PLATFORM_QWS" = "yes" ]; then
6077 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
6078 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_USE_EGLWINDOWSURFACE"
6080 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6083 if [ "$CFG_OPENGL" = "es1" ]; then
6084 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_1"
6085 QT_CONFIG="$QT_CONFIG opengles1"
6088 if [ "$CFG_OPENGL" = "es1cl" ]; then
6089 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_1_CL"
6090 QT_CONFIG="$QT_CONFIG opengles1cl"
6093 if [ "$CFG_OPENGL" = "es2" ]; then
6094 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6095 QT_CONFIG="$QT_CONFIG opengles2"
6098 # safe execution environment
6099 if [ "$CFG_SXE" != "no" ]; then
6100 QT_CONFIG="$QT_CONFIG sxe"
6103 # build up the variables for output
6104 if [ "$CFG_DEBUG" = "yes" ]; then
6105 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6106 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6107 elif [ "$CFG_DEBUG" = "no" ]; then
6108 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6109 QMAKE_CONFIG="$QMAKE_CONFIG release"
6111 if [ "$CFG_SHARED" = "yes" ]; then
6112 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6113 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6114 elif [ "$CFG_SHARED" = "no" ]; then
6115 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6116 QMAKE_CONFIG="$QMAKE_CONFIG static"
6118 if [ "$PLATFORM_QWS" = "yes" ]; then
6119 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6120 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6121 QT_CONFIG="$QT_CONFIG embedded"
6122 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6124 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6125 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6126 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6127 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6128 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6129 if [ "$CFG_LARGEFILE" = "yes" ]; then
6130 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6132 if [ "$CFG_STL" = "no" ]; then
6133 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6134 else
6135 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6137 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6138 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6140 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6141 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6142 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6143 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6144 QMakeVar add QMAKE_CFLAGS -g
6145 QMakeVar add QMAKE_CXXFLAGS -g
6146 QMAKE_CONFIG="$QMAKE_CONFIG separate_debug_info"
6148 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6149 QMAKE_CONFIG="$QMAKE_CONFIG separate_debug_info_nocopy"
6151 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6152 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6153 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6154 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6155 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6156 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6157 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6158 if [ "$CFG_IPV6" = "yes" ]; then
6159 QT_CONFIG="$QT_CONFIG ipv6"
6161 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6162 QT_CONFIG="$QT_CONFIG clock-gettime"
6164 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6165 QT_CONFIG="$QT_CONFIG clock-monotonic"
6167 if [ "$CFG_MREMAP" = "yes" ]; then
6168 QT_CONFIG="$QT_CONFIG mremap"
6170 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6171 QT_CONFIG="$QT_CONFIG getaddrinfo"
6173 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6174 QT_CONFIG="$QT_CONFIG ipv6ifname"
6176 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6177 QT_CONFIG="$QT_CONFIG getifaddrs"
6179 if [ "$CFG_INOTIFY" = "yes" ]; then
6180 QT_CONFIG="$QT_CONFIG inotify"
6182 if [ "$CFG_LIBJPEG" = "no" ]; then
6183 CFG_JPEG="no"
6184 elif [ "$CFG_LIBJPEG" = "system" ]; then
6185 QT_CONFIG="$QT_CONFIG system-jpeg"
6187 if [ "$CFG_JPEG" = "no" ]; then
6188 QT_CONFIG="$QT_CONFIG no-jpeg"
6189 elif [ "$CFG_JPEG" = "yes" ]; then
6190 QT_CONFIG="$QT_CONFIG jpeg"
6192 if [ "$CFG_LIBMNG" = "no" ]; then
6193 CFG_MNG="no"
6194 elif [ "$CFG_LIBMNG" = "system" ]; then
6195 QT_CONFIG="$QT_CONFIG system-mng"
6197 if [ "$CFG_MNG" = "no" ]; then
6198 QT_CONFIG="$QT_CONFIG no-mng"
6199 elif [ "$CFG_MNG" = "yes" ]; then
6200 QT_CONFIG="$QT_CONFIG mng"
6202 if [ "$CFG_LIBPNG" = "no" ]; then
6203 CFG_PNG="no"
6205 if [ "$CFG_LIBPNG" = "system" ]; then
6206 QT_CONFIG="$QT_CONFIG system-png"
6208 if [ "$CFG_PNG" = "no" ]; then
6209 QT_CONFIG="$QT_CONFIG no-png"
6210 elif [ "$CFG_PNG" = "yes" ]; then
6211 QT_CONFIG="$QT_CONFIG png"
6213 if [ "$CFG_GIF" = "no" ]; then
6214 QT_CONFIG="$QT_CONFIG no-gif"
6215 elif [ "$CFG_GIF" = "yes" ]; then
6216 QT_CONFIG="$QT_CONFIG gif"
6218 if [ "$CFG_LIBTIFF" = "no" ]; then
6219 CFG_TIFF="no"
6220 elif [ "$CFG_LIBTIFF" = "system" ]; then
6221 QT_CONFIG="$QT_CONFIG system-tiff"
6223 if [ "$CFG_TIFF" = "no" ]; then
6224 QT_CONFIG="$QT_CONFIG no-tiff"
6225 elif [ "$CFG_TIFF" = "yes" ]; then
6226 QT_CONFIG="$QT_CONFIG tiff"
6228 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6229 QT_CONFIG="$QT_CONFIG no-freetype"
6230 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6231 QT_CONFIG="$QT_CONFIG system-freetype"
6232 else
6233 QT_CONFIG="$QT_CONFIG freetype"
6236 if [ "x$PLATFORM_MAC" = "xyes" ]; then
6237 #On Mac we implicitly link against libz, so we
6238 #never use the 3rdparty stuff.
6239 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6241 if [ "$CFG_ZLIB" = "yes" ]; then
6242 QT_CONFIG="$QT_CONFIG zlib"
6243 elif [ "$CFG_ZLIB" = "system" ]; then
6244 QT_CONFIG="$QT_CONFIG system-zlib"
6247 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6248 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6249 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6250 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6251 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6252 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6253 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6254 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6255 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6256 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6257 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6259 if [ "$PLATFORM_X11" = "yes" ]; then
6260 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6262 # for some reason, the following libraries are not always built shared,
6263 # so *every* program/lib (including Qt) has to link against them
6264 if [ "$CFG_XSHAPE" = "yes" ]; then
6265 QT_CONFIG="$QT_CONFIG xshape"
6267 if [ "$CFG_XSYNC" = "yes" ]; then
6268 QT_CONFIG="$QT_CONFIG xsync"
6270 if [ "$CFG_XINERAMA" = "yes" ]; then
6271 QT_CONFIG="$QT_CONFIG xinerama"
6272 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6274 if [ "$CFG_XCURSOR" = "yes" ]; then
6275 QT_CONFIG="$QT_CONFIG xcursor"
6276 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6278 if [ "$CFG_XFIXES" = "yes" ]; then
6279 QT_CONFIG="$QT_CONFIG xfixes"
6280 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6282 if [ "$CFG_XRANDR" = "yes" ]; then
6283 QT_CONFIG="$QT_CONFIG xrandr"
6284 if [ "$CFG_XRENDER" != "yes" ]; then
6285 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6286 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6287 else
6288 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6291 if [ "$CFG_XRENDER" = "yes" ]; then
6292 QT_CONFIG="$QT_CONFIG xrender"
6293 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6295 if [ "$CFG_MITSHM" = "yes" ]; then
6296 QT_CONFIG="$QT_CONFIG mitshm"
6298 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6299 QT_CONFIG="$QT_CONFIG fontconfig"
6301 if [ "$CFG_XINPUT" = "yes" ]; then
6302 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6304 if [ "$CFG_XINPUT" = "yes" ]; then
6305 QT_CONFIG="$QT_CONFIG xinput tablet"
6307 if [ "$CFG_XKB" = "yes" ]; then
6308 QT_CONFIG="$QT_CONFIG xkb"
6312 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6313 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6314 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6316 if [ "$PLATFORM_MAC" = "yes" ]; then
6317 if [ "$CFG_RPATH" = "yes" ]; then
6318 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6320 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
6321 if [ -n "$RPATH_FLAGS" ]; then
6322 echo
6323 echo "ERROR: -R cannot be used on this platform as \$QMAKE_RPATH is"
6324 echo " undefined."
6325 echo
6326 exit 1
6327 elif [ "$CFG_RPATH" = "yes" ]; then
6328 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6329 CFG_RPATH=no
6331 else
6332 if [ "$CFG_RPATH" = "yes" ]; then
6333 # set the default rpath to the library installation directory
6334 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6336 if [ -n "$RPATH_FLAGS" ]; then
6337 # add the user defined rpaths
6338 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6342 if [ '!' -z "$I_FLAGS" ]; then
6343 # add the user define include paths
6344 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6345 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6348 # turn off exceptions for the compilers that support it
6349 if [ "$PLATFORM_QWS" = "yes" ]; then
6350 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
6351 else
6352 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6354 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6355 CFG_EXCEPTIONS=no
6358 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6359 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6362 if [ "$CFG_ALSA" = "yes" ]; then
6363 QT_CONFIG="$QT_CONFIG alsa"
6367 # Some Qt modules are too advanced in C++ for some old compilers
6368 # Detect here the platforms where they are known to work.
6370 # See Qt documentation for more information on which features are
6371 # supported and on which compilers.
6373 canBuildQtXmlPatterns="yes"
6374 canBuildWebKit="$HAVE_STL"
6375 canBuildQtConcurrent="yes"
6377 # WebKit requires stdint.h
6378 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
6379 if [ $? != "0" ]; then
6380 canBuildWebKit="no"
6383 case "$XPLATFORM" in
6384 hpux-g++*)
6385 # PA-RISC's assembly is too limited
6386 # gcc 3.4 on that platform can't build QtXmlPatterns
6387 # the assembly it generates cannot be compiled
6389 # Check gcc's version
6390 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6393 3.4*)
6394 canBuildQtXmlPatterns="no"
6397 canBuildWebKit="no"
6398 canBuildQtXmlPatterns="no"
6400 esac
6402 unsupported/vxworks-*-g++*)
6403 canBuildWebKit="no"
6405 unsupported/vxworks-*-dcc*)
6406 canBuildWebKit="no"
6407 canBuildQtXmlPatterns="no"
6409 *-g++*)
6410 # Check gcc's version
6411 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6412 4*|3.4*)
6414 3.3*)
6415 canBuildWebKit="no"
6418 canBuildWebKit="no"
6419 canBuildQtXmlPatterns="no"
6421 esac
6423 solaris-cc*)
6424 # Check the compiler version
6425 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6426 5.[012345678])
6427 canBuildWebKit="no"
6428 canBuildQtXmlPatterns="no"
6429 canBuildQtConcurrent="no"
6431 5.9)
6432 canBuildWebKit="no"
6433 canBuildQtConcurrent="no"
6435 esac
6437 hpux-acc*)
6438 canBuildWebKit="no"
6439 canBuildQtXmlPatterns="no"
6440 canBuildQtConcurrent="no"
6442 hpuxi-acc*)
6443 canBuildWebKit="no"
6445 aix-xlc*)
6446 # Get the xlC version
6447 cat > xlcver.c <<EOF
6448 #include <stdio.h>
6449 int main()
6451 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6452 return 0;
6455 xlcver=
6456 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6457 xlcver=`./xlcver 2>/dev/null`
6458 rm -f ./xlcver
6460 if [ "$OPT_VERBOSE" = "yes" ]; then
6461 if [ -n "$xlcver" ]; then
6462 echo Found IBM xlC version: $xlcver.
6463 else
6464 echo Could not determine IBM xlC version, assuming oldest supported.
6468 case "$xlcver" in
6469 [123456].*)
6470 canBuildWebKit="no"
6471 canBuildQtXmlPatterns="no"
6472 canBuildQtConcurrent="no"
6475 canBuildWebKit="no"
6476 canBuildQtConcurrent="no"
6478 esac
6480 irix-cc*)
6481 canBuildWebKit="no"
6482 canBuildQtConcurrent="no"
6484 esac
6486 CFG_CONCURRENT="yes"
6487 if [ "$canBuildQtConcurrent" = "no" ]; then
6488 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6489 CFG_CONCURRENT="no"
6492 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
6493 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
6494 exit 1
6496 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
6497 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
6498 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
6499 CFG_XMLPATTERNS="no"
6501 if [ "$CFG_XMLPATTERNS" = "yes" ]; then
6502 QT_CONFIG="$QT_CONFIG xmlpatterns"
6503 else
6504 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
6507 if [ "$CFG_MULTIMEDIA" = "no" ]; then
6508 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
6509 else
6510 QT_CONFIG="$QT_CONFIG multimedia"
6513 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6514 QT_CONFIG="$QT_CONFIG audio-backend"
6517 if [ "$CFG_SVG" = "yes" ]; then
6518 QT_CONFIG="$QT_CONFIG svg"
6519 else
6520 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
6523 if [ "$CFG_DECLARATIVE" = "yes" ]; then
6524 QT_CONFIG="$QT_CONFIG declarative"
6525 else
6526 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
6529 if [ "$CFG_WEBKIT" = "auto" ]; then
6530 CFG_WEBKIT="$canBuildWebKit"
6533 if [ "$CFG_WEBKIT" = "yes" ]; then
6534 QT_CONFIG="$QT_CONFIG webkit"
6535 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
6536 CFG_WEBKIT="yes"
6537 else
6538 CFG_WEBKIT="no"
6539 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WEBKIT"
6542 if [ "$CFG_SCRIPT" = "auto" ]; then
6543 CFG_SCRIPT="yes"
6546 if [ "$CFG_SCRIPT" = "yes" ]; then
6547 QT_CONFIG="$QT_CONFIG script"
6548 else
6549 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
6552 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
6553 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
6554 exit 1
6556 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
6557 CFG_SCRIPTTOOLS="yes"
6558 elif [ "$CFG_SCRIPT" = "no" ]; then
6559 CFG_SCRIPTTOOLS="no"
6562 if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
6563 QT_CONFIG="$QT_CONFIG scripttools"
6564 else
6565 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
6568 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6569 case "$COMPILER" in
6570 g++*)
6571 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6572 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6573 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6575 cc*)
6576 case "$PLATFORM" in
6577 irix-cc*)
6578 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6579 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6580 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6582 *) ;;
6583 esac
6585 *) ;;
6586 esac
6587 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6590 # On Mac, set the minimum deployment target for the different architechtures
6591 # using the Xarch compiler option when supported (10.5 and up). On 10.4 the
6592 # deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
6593 # env. variable.
6594 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
6595 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
6596 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
6597 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
6598 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
6599 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
6601 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
6602 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
6603 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
6604 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
6605 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
6607 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
6608 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
6609 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
6610 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
6611 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
6613 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
6614 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
6615 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
6616 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
6617 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
6621 #-------------------------------------------------------------------------------
6622 # generate QT_BUILD_KEY
6623 #-------------------------------------------------------------------------------
6625 # some compilers generate binary incompatible code between different versions,
6626 # so we need to generate a build key that is different between these compilers
6627 case "$COMPILER" in
6628 g++*)
6629 # GNU C++
6630 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6632 case "$COMPILER_VERSION" in
6633 *.*.*)
6634 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6635 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6636 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6638 *.*)
6639 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6640 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6641 QT_GCC_PATCH_VERSION=0
6643 esac
6645 case "$COMPILER_VERSION" in
6646 2.95.*)
6647 COMPILER_VERSION="2.95.*"
6649 3.*)
6650 COMPILER_VERSION="3.*"
6652 4.*)
6653 COMPILER_VERSION="4"
6657 esac
6658 [ '!' -z "$COMPILER_VERSION" ] && COMPILER="g++-${COMPILER_VERSION}"
6663 esac
6665 # QT_CONFIG can contain the following:
6667 # Things that affect the Qt API/ABI:
6669 # Options:
6670 # minimal-config small-config medium-config large-config full-config
6672 # Different edition modules:
6673 # network canvas table xml opengl sql
6675 # Things that do not affect the Qt API/ABI:
6676 # stl
6677 # system-jpeg no-jpeg jpeg
6678 # system-mng no-mng mng
6679 # system-png no-png png
6680 # system-zlib no-zlib zlib
6681 # system-libtiff no-libtiff
6682 # no-gif gif
6683 # debug release
6684 # dll staticlib
6686 # nocrosscompiler
6687 # GNUmake
6688 # largefile
6689 # nis
6690 # nas
6691 # tablet
6692 # ipv6
6694 # X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb
6695 # Embedded: embedded freetype
6697 ALL_OPTIONS=
6698 BUILD_CONFIG=
6699 BUILD_OPTIONS=
6701 # determine the build options
6702 for config_option in $QMAKE_CONFIG $QT_CONFIG; do
6703 SKIP="yes"
6704 case "$config_option" in
6705 *-config)
6706 # take the last *-config setting. this is the highest config being used,
6707 # and is the one that we will use for tagging plugins
6708 BUILD_CONFIG="$config_option"
6711 *) # skip all other options since they don't affect the Qt API/ABI.
6713 esac
6715 if [ "$SKIP" = "no" ]; then
6716 BUILD_OPTIONS="$BUILD_OPTIONS $config_option"
6718 done
6720 # put the options that we are missing into .options
6721 rm -f .options
6722 for opt in `echo $ALL_OPTIONS`; do
6723 SKIP="no"
6724 if echo $BUILD_OPTIONS | grep $opt >/dev/null 2>&1; then
6725 SKIP="yes"
6727 if [ "$SKIP" = "no" ]; then
6728 echo "$opt" >> .options
6730 done
6732 # reconstruct BUILD_OPTIONS with a sorted negative feature list
6733 # (ie. only things that are missing are will be put into the build key)
6734 BUILD_OPTIONS=
6735 if [ -f .options ]; then
6736 for opt in `sort -f .options | uniq`; do
6737 BUILD_OPTIONS="$BUILD_OPTIONS no-$opt"
6738 done
6740 rm -f .options
6742 # QT_NO* defines affect the Qt API (and binary compatibility). they need
6743 # to be included in the build key
6744 for build_option in $D_FLAGS; do
6745 build_option=`echo $build_option | cut -d \" -f 2 -`
6746 case "$build_option" in
6747 QT_NO*)
6748 echo "$build_option" >> .options
6751 # skip all other compiler defines
6753 esac
6754 done
6756 # sort the compile time defines (helps ensure that changes in this configure
6757 # script don't affect the QT_BUILD_KEY generation)
6758 if [ -f .options ]; then
6759 for opt in `sort -f .options | uniq`; do
6760 BUILD_OPTIONS="$BUILD_OPTIONS $opt"
6761 done
6763 rm -f .options
6765 BUILD_OPTIONS="$BUILD_CONFIG $BUILD_OPTIONS"
6766 # extract the operating system from the XPLATFORM
6767 TARGET_OPERATING_SYSTEM=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
6769 # when cross-compiling, don't include build-host information (build key is target specific)
6770 QT_BUILD_KEY="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6771 if [ -n "$QT_NAMESPACE" ]; then
6772 QT_BUILD_KEY="$QT_BUILD_KEY $QT_NAMESPACE"
6774 MAC_NEED_TWO_BUILD_KEYS="no"
6775 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
6776 QT_BUILD_KEY_CARBON=$QT_BUILD_KEY
6777 TARGET_OPERATING_SYSTEM="$TARGET_OPERATING_SYSTEM-cocoa"
6778 QT_BUILD_KEY_COCOA="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6779 if [ "$CFG_MAC_CARBON" = "no" ]; then
6780 QT_BUILD_KEY=$QT_BUILD_KEY_COCOA
6781 else
6782 MAC_NEED_TWO_BUILD_KEYS="yes"
6785 # don't break loading plugins build with an older version of Qt
6786 QT_BUILD_KEY_COMPAT=
6787 if [ "$QT_CROSS_COMPILE" = "no" ]; then
6788 # previous versions of Qt used a build key built from the uname
6789 QT_BUILD_KEY_COMPAT="$CFG_USER_BUILD_KEY $UNAME_MACHINE $UNAME_SYSTEM $COMPILER $BUILD_OPTIONS"
6790 if [ -n "$QT_NAMESPACE" ]; then
6791 QT_BUILD_KEY_COMPAT="$QT_BUILD_KEY_COMPAT $QT_NAMESPACE"
6794 # strip out leading/trailing/extra whitespace
6795 QT_BUILD_KEY=`echo $QT_BUILD_KEY | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6796 QT_BUILD_KEY_COMPAT=`echo $QT_BUILD_KEY_COMPAT | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6798 #-------------------------------------------------------------------------------
6799 # part of configuration information goes into qconfig.h
6800 #-------------------------------------------------------------------------------
6802 case "$CFG_QCONFIG" in
6803 full)
6804 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6807 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6808 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6809 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6810 echo "#endif" >>"$tmpconfig"
6812 esac
6814 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6816 /* Qt Edition */
6817 #ifndef QT_EDITION
6818 # define QT_EDITION $QT_EDITION
6819 #endif
6821 /* Machine byte-order */
6822 #define Q_BIG_ENDIAN 4321
6823 #define Q_LITTLE_ENDIAN 1234
6826 if [ "$MAC_NEED_TWO_BUILD_KEYS" = "no" ]; then
6827 echo "#define QT_BUILD_KEY \"$QT_BUILD_KEY\"" \
6828 >> "$outpath/src/corelib/global/qconfig.h.new"
6829 else
6830 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6832 #define QT_BUILD_KEY_CARBON "$QT_BUILD_KEY_CARBON"
6833 #define QT_BUILD_KEY_COCOA "$QT_BUILD_KEY_COCOA"
6837 if [ -n "$QT_BUILD_KEY_COMPAT" ]; then
6838 echo "#define QT_BUILD_KEY_COMPAT \"$QT_BUILD_KEY_COMPAT\"" \
6839 >> "$outpath/src/corelib/global/qconfig.h.new"
6841 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6843 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6844 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6845 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6846 #if defined(__BIG_ENDIAN__)
6847 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6848 #elif defined(__LITTLE_ENDIAN__)
6849 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6850 #else
6851 # error "Unable to determine byte order!"
6852 #endif
6854 else
6855 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6857 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6858 if [ "$CFG_ENDIAN" = "auto" ]; then
6859 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6860 #if defined(__BIG_ENDIAN__)
6861 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6862 #elif defined(__LITTLE_ENDIAN__)
6863 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6864 #else
6865 # error "Unable to determine byte order!"
6866 #endif
6868 else
6869 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6871 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6873 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6874 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6875 /* Non-IEEE double format */
6876 #define Q_DOUBLE_LITTLE "01234567"
6877 #define Q_DOUBLE_BIG "76543210"
6878 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6879 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6880 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6883 if [ "$CFG_ARMFPA" = "yes" ]; then
6884 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6885 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6886 #ifndef QT_BOOTSTRAPPED
6887 # define QT_ARMFPA
6888 #endif
6890 else
6891 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6895 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6896 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6897 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6898 /* Machine Architecture */
6899 #ifndef QT_BOOTSTRAPPED
6900 # define QT_ARCH_${CFG_ARCH_STR}
6901 #else
6902 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6903 #endif
6906 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6907 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6909 if [ "$CFG_LARGEFILE" = "yes" ]; then
6910 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6913 # if both carbon and cocoa are specified, enable the autodetection code.
6914 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
6915 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6916 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
6917 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6920 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6921 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6924 if [ "$PLATFORM_MAC" = "yes" ]; then
6925 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6926 #if defined(__LP64__)
6927 # define QT_POINTER_SIZE 8
6928 #else
6929 # define QT_POINTER_SIZE 4
6930 #endif
6932 else
6933 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6934 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6938 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6940 if [ "$CFG_DEV" = "yes" ]; then
6941 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6944 # Embedded compile time options
6945 if [ "$PLATFORM_QWS" = "yes" ]; then
6946 # Add QWS to config.h
6947 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
6949 # Add excluded decorations to $QCONFIG_FLAGS
6950 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
6951 for decor in $decors; do
6952 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6953 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
6954 done
6956 # Figure which embedded drivers which are turned off
6957 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
6958 for ADRIVER in $CFG_GFX_ON; do
6959 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
6960 done
6962 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
6963 # the um driver is currently not in the available list for external builds
6964 if [ "$CFG_DEV" = "no" ]; then
6965 CFG_KBD_OFF="$CFG_KBD_OFF um"
6967 for ADRIVER in $CFG_KBD_ON; do
6968 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
6969 done
6971 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
6972 for ADRIVER in $CFG_MOUSE_ON; do
6973 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
6974 done
6976 for DRIVER in $CFG_GFX_OFF; do
6977 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6978 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
6979 done
6981 for DRIVER in $CFG_KBD_OFF; do
6982 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6983 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
6984 done
6986 for DRIVER in $CFG_MOUSE_OFF; do
6987 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6988 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
6989 done
6990 fi # QWS
6992 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6993 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6996 # Add turned on SQL drivers
6997 for DRIVER in $CFG_SQL_AVAILABLE; do
6998 eval "VAL=\$CFG_SQL_$DRIVER"
6999 case "$VAL" in
7001 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7002 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7003 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7005 plugin)
7006 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7008 esac
7009 done
7012 QMakeVar set sql-drivers "$SQL_DRIVERS"
7013 QMakeVar set sql-plugins "$SQL_PLUGINS"
7015 # Add other configuration options to the qconfig.h file
7016 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7017 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7018 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7019 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7020 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7021 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7022 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7023 [ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6"
7024 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7025 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7027 if [ "$PLATFORM_QWS" != "yes" ]; then
7028 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
7029 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
7030 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
7033 # X11/Unix/Mac only configs
7034 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7035 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7036 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7037 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7038 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7039 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7040 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7041 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7042 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7043 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7044 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7045 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7046 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7047 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
7048 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7050 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7051 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7052 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7053 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7054 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7055 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7056 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7057 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7058 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7059 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7060 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7061 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7063 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7064 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7065 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7066 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7067 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7068 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7070 # sort QCONFIG_FLAGS for neatness if we can
7071 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7072 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7074 if [ -n "$QCONFIG_FLAGS" ]; then
7075 for cfg in $QCONFIG_FLAGS; do
7076 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7077 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7078 # figure out define logic, so we can output the correct
7079 # ifdefs to override the global defines in a project
7080 cfgdNeg=
7081 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7082 # QT_NO_option can be forcefully turned on by QT_option
7083 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7084 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7085 # QT_option can be forcefully turned off by QT_NO_option
7086 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7089 if [ -z $cfgdNeg ]; then
7090 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7091 #ifndef $cfgd
7092 # define $cfg
7093 #endif
7096 else
7097 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7098 #if defined($cfgd) && defined($cfgdNeg)
7099 # undef $cfgd
7100 #elif !defined($cfgd) && !defined($cfgdNeg)
7101 # define $cfg
7102 #endif
7106 done
7109 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7110 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7111 #define QT_VISIBILITY_AVAILABLE
7116 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7117 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7118 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7119 else
7120 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7121 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7122 chmod -w "$outpath/src/corelib/global/qconfig.h"
7123 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7124 if [ '!' -f "$conf" ]; then
7125 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7127 done
7130 #-------------------------------------------------------------------------------
7131 # save configuration into qconfig.pri
7132 #-------------------------------------------------------------------------------
7134 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7135 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7136 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7137 if [ "$CFG_DEBUG" = "yes" ]; then
7138 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7139 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7140 QT_CONFIG="$QT_CONFIG release"
7142 QT_CONFIG="$QT_CONFIG debug"
7143 elif [ "$CFG_DEBUG" = "no" ]; then
7144 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7145 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7146 QT_CONFIG="$QT_CONFIG debug"
7148 QT_CONFIG="$QT_CONFIG release"
7150 if [ "$CFG_STL" = "yes" ]; then
7151 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7153 if [ "$CFG_FRAMEWORK" = "no" ]; then
7154 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7155 else
7156 QT_CONFIG="$QT_CONFIG qt_framework"
7157 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7159 if [ "$PLATFORM_MAC" = "yes" ]; then
7160 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
7162 if [ "$CFG_DEV" = "yes" ]; then
7163 QT_CONFIG="$QT_CONFIG private_tests"
7166 # Make the application arch follow the Qt arch for single arch builds.
7167 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7168 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7169 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7172 cat >>"$QTCONFIG.tmp" <<EOF
7173 #configuration
7174 CONFIG += $QTCONFIG_CONFIG
7175 QT_ARCH = $CFG_ARCH
7176 QT_EDITION = $Edition
7177 QT_CONFIG += $QT_CONFIG
7179 #versioning
7180 QT_VERSION = $QT_VERSION
7181 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7182 QT_MINOR_VERSION = $QT_MINOR_VERSION
7183 QT_PATCH_VERSION = $QT_PATCH_VERSION
7185 #namespaces
7186 QT_LIBINFIX = $QT_LIBINFIX
7187 QT_NAMESPACE = $QT_NAMESPACE
7188 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7191 if [ "$CFG_RPATH" = "yes" ]; then
7192 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7194 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7195 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7196 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7197 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7199 # replace qconfig.pri if it differs from the newly created temp file
7200 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7201 rm -f "$QTCONFIG.tmp"
7202 else
7203 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7206 #-------------------------------------------------------------------------------
7207 # save configuration into .qmake.cache
7208 #-------------------------------------------------------------------------------
7210 CACHEFILE="$outpath/.qmake.cache"
7211 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7212 cat >>"$CACHEFILE.tmp" <<EOF
7213 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
7214 QT_SOURCE_TREE = \$\$quote($relpath)
7215 QT_BUILD_TREE = \$\$quote($outpath)
7216 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7217 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7218 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7220 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7221 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7222 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7223 QMAKE_UIC3 = \$\$QT_BUILD_TREE/bin/uic3
7224 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7225 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
7226 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7227 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7231 # Ensure we can link to uninistalled libraries
7232 if linkerSupportsFlag -rpath-link "$outpath/lib"; then
7233 echo "QMAKE_LFLAGS += -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp"
7236 if [ -n "$QT_CFLAGS_PSQL" ]; then
7237 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp"
7239 if [ -n "$QT_LFLAGS_PSQL" ]; then
7240 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$CACHEFILE.tmp"
7242 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7243 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7245 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7246 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7248 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7249 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7251 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7252 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7254 if [ -n "$QT_LFLAGS_ODBC" ]; then
7255 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$CACHEFILE.tmp"
7258 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7259 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
7262 #dump in the OPENSSL_LIBS info
7263 if [ '!' -z "$OPENSSL_LIBS" ]; then
7264 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp"
7265 elif [ "$CFG_OPENSSL" = "linked" ]; then
7266 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$CACHEFILE.tmp"
7269 #dump in the SDK info
7270 if [ '!' -z "$CFG_SDK" ]; then
7271 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$CACHEFILE.tmp"
7274 # mac gcc -Xarch support
7275 if [ "$CFG_MAC_XARCH" = "no" ]; then
7276 echo "QMAKE_MAC_XARCH = no" >> "$CACHEFILE.tmp"
7279 #dump the qmake spec
7280 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7281 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7282 else
7283 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7286 # cmdline args
7287 cat "$QMAKE_VARS_FILE" >> "$CACHEFILE.tmp"
7288 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
7290 # incrementals
7291 INCREMENTAL=""
7292 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
7293 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7294 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
7295 # don't need to worry about generated files
7296 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7297 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
7298 # done
7299 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7300 done
7301 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7302 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7305 # replace .qmake.cache if it differs from the newly created temp file
7306 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7307 rm -f "$CACHEFILE.tmp"
7308 else
7309 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7312 #-------------------------------------------------------------------------------
7313 # give feedback on configuration
7314 #-------------------------------------------------------------------------------
7316 case "$COMPILER" in
7317 g++*)
7318 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7319 cat <<EOF
7321 This target is using the GNU C++ compiler ($PLATFORM).
7323 Recent versions of this compiler automatically include code for
7324 exceptions, which increase both the size of the Qt libraries and
7325 the amount of memory taken by your applications.
7327 You may choose to re-run `basename $0` with the -no-exceptions
7328 option to compile Qt without exceptions. This is completely binary
7329 compatible, and existing applications will continue to work.
7334 cc*)
7335 case "$PLATFORM" in
7336 irix-cc*)
7337 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7338 cat <<EOF
7340 This target is using the MIPSpro C++ compiler ($PLATFORM).
7342 You may choose to re-run `basename $0` with the -no-exceptions
7343 option to compile Qt without exceptions. This will make the
7344 size of the Qt library smaller and reduce the amount of memory
7345 taken by your applications.
7350 *) ;;
7351 esac
7353 *) ;;
7354 esac
7356 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7357 cat <<EOF
7358 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
7359 in debug mode will run out of memory on systems with 2GB or less.
7360 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
7361 -no-webkit or -release to skip webkit debug.
7365 echo
7366 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7367 echo "Build type: $PLATFORM"
7368 else
7369 echo "Building on: $PLATFORM"
7370 echo "Building for: $XPLATFORM"
7373 if [ "$PLATFORM_MAC" = "yes" ]; then
7374 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7375 else
7376 echo "Architecture: $CFG_ARCH"
7379 if [ "$PLATFORM_QWS" = "yes" ]; then
7380 echo "Host architecture: $CFG_HOST_ARCH"
7383 if [ "$PLATFORM_MAC" = "yes" ]; then
7384 if [ "$CFG_MAC_COCOA" = "yes" ]; then
7385 if [ "$CFG_MAC_CARBON" = "yes" ]; then
7386 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
7387 else
7388 echo "Using framework: Cocoa"
7390 else
7391 echo "Using framework: Carbon"
7395 if [ -n "$PLATFORM_NOTES" ]; then
7396 echo "Platform notes:"
7397 echo "$PLATFORM_NOTES"
7398 else
7399 echo
7402 if [ "$OPT_VERBOSE" = "yes" ]; then
7403 if echo '\c' | grep '\c' >/dev/null; then
7404 echo -n "qmake vars .......... "
7405 else
7406 echo "qmake vars .......... \c"
7408 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
7409 echo "qmake switches ...... $QMAKE_SWITCHES"
7412 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ......... $INCREMENTAL"
7413 echo "Build ............... $CFG_BUILD_PARTS"
7414 echo "Configuration ....... $QMAKE_CONFIG $QT_CONFIG"
7415 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7416 echo "Debug ............... yes (combined)"
7417 if [ "$CFG_DEBUG" = "yes" ]; then
7418 echo "Default Link ........ debug"
7419 else
7420 echo "Default Link ........ release"
7422 else
7423 echo "Debug ............... $CFG_DEBUG"
7425 echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
7426 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
7427 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
7428 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
7429 echo "QtConcurrent code.... $CFG_CONCURRENT"
7430 echo "QtScript module ..... $CFG_SCRIPT"
7431 echo "QtScriptTools module $CFG_SCRIPTTOOLS"
7432 echo "QtXmlPatterns module $CFG_XMLPATTERNS"
7433 echo "Phonon module ....... $CFG_PHONON"
7434 echo "Multimedia module ... $CFG_MULTIMEDIA"
7435 echo "SVG module .......... $CFG_SVG"
7436 echo "WebKit module ....... $CFG_WEBKIT"
7437 if [ "$CFG_WEBKIT" = "yes" ]; then
7438 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7439 echo "JavaScriptCore JIT .. To be decided by JavaScriptCore"
7440 else
7441 echo "JavaScriptCore JIT .. $CFG_JAVASCRIPTCORE_JIT"
7444 echo "Declarative module .. $CFG_DECLARATIVE"
7445 echo "STL support ......... $CFG_STL"
7446 echo "PCH support ......... $CFG_PRECOMPILE"
7447 echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
7448 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
7449 echo "iWMMXt support ...... ${CFG_IWMMXT}"
7450 echo "NEON support ........ ${CFG_NEON}"
7452 [ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
7453 echo "IPv6 support ........ $CFG_IPV6"
7454 echo "IPv6 ifname support . $CFG_IPV6IFNAME"
7455 echo "getaddrinfo support . $CFG_GETADDRINFO"
7456 echo "getifaddrs support .. $CFG_GETIFADDRS"
7457 echo "Accessibility ....... $CFG_ACCESSIBILITY"
7458 echo "NIS support ......... $CFG_NIS"
7459 echo "CUPS support ........ $CFG_CUPS"
7460 echo "Iconv support ....... $CFG_ICONV"
7461 echo "Glib support ........ $CFG_GLIB"
7462 echo "GStreamer support ... $CFG_GSTREAMER"
7463 echo "Large File support .. $CFG_LARGEFILE"
7464 echo "GIF support ......... $CFG_GIF"
7465 if [ "$CFG_TIFF" = "no" ]; then
7466 echo "TIFF support ........ $CFG_TIFF"
7467 else
7468 echo "TIFF support ........ $CFG_TIFF ($CFG_LIBTIFF)"
7470 if [ "$CFG_JPEG" = "no" ]; then
7471 echo "JPEG support ........ $CFG_JPEG"
7472 else
7473 echo "JPEG support ........ $CFG_JPEG ($CFG_LIBJPEG)"
7475 if [ "$CFG_PNG" = "no" ]; then
7476 echo "PNG support ......... $CFG_PNG"
7477 else
7478 echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
7480 if [ "$CFG_MNG" = "no" ]; then
7481 echo "MNG support ......... $CFG_MNG"
7482 else
7483 echo "MNG support ......... $CFG_MNG ($CFG_LIBMNG)"
7485 echo "zlib support ........ $CFG_ZLIB"
7486 echo "Session management .. $CFG_SM"
7487 if [ "$PLATFORM_QWS" = "yes" ]; then
7488 echo "Embedded support .... $CFG_EMBEDDED"
7489 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
7490 echo "Freetype2 support ... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
7491 else
7492 echo "Freetype2 support ... $CFG_QWS_FREETYPE"
7494 # Normalize the decoration output first
7495 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
7496 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
7497 echo "Graphics (qt) ....... ${CFG_GFX_ON}"
7498 echo "Graphics (plugin) ... ${CFG_GFX_PLUGIN}"
7499 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
7500 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
7501 echo "Decorations (qt) .... $CFG_DECORATION_ON"
7502 echo "Decorations (plugin) $CFG_DECORATION_PLUGIN"
7503 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
7504 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
7505 echo "Keyboard driver (qt). ${CFG_KBD_ON}"
7506 echo "Keyboard driver (plugin) ${CFG_KBD_PLUGIN}"
7507 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
7508 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
7509 echo "Mouse driver (qt) ... $CFG_MOUSE_ON"
7510 echo "Mouse driver (plugin) $CFG_MOUSE_PLUGIN"
7512 if [ "$CFG_OPENGL" = "desktop" ]; then
7513 echo "OpenGL support ...... yes (Desktop OpenGL)"
7514 elif [ "$CFG_OPENGL" = "es1" ]; then
7515 echo "OpenGL support ...... yes (OpenGL ES 1.x Common profile)"
7516 elif [ "$CFG_OPENGL" = "es1cl" ]; then
7517 echo "OpenGL support ...... yes (OpenGL ES 1.x Common Lite profile)"
7518 elif [ "$CFG_OPENGL" = "es2" ]; then
7519 echo "OpenGL support ...... yes (OpenGL ES 2.x)"
7520 else
7521 echo "OpenGL support ...... no"
7523 if [ "$CFG_EGL" != "no" ]; then
7524 if [ "$CFG_EGL_GLES_INCLUDES" != "no" ]; then
7525 echo "EGL support ......... yes <GLES/egl.h>"
7526 else
7527 echo "EGL support ......... yes <EGL/egl.h>"
7530 if [ "$CFG_OPENVG" ]; then
7531 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7532 echo "OpenVG support ...... ShivaVG"
7533 else
7534 echo "OpenVG support ...... $CFG_OPENVG"
7537 if [ "$PLATFORM_X11" = "yes" ]; then
7538 echo "NAS sound support ... $CFG_NAS"
7539 echo "XShape support ...... $CFG_XSHAPE"
7540 echo "XSync support ....... $CFG_XSYNC"
7541 echo "Xinerama support .... $CFG_XINERAMA"
7542 echo "Xcursor support ..... $CFG_XCURSOR"
7543 echo "Xfixes support ...... $CFG_XFIXES"
7544 echo "Xrandr support ...... $CFG_XRANDR"
7545 echo "Xrender support ..... $CFG_XRENDER"
7546 echo "Xi support .......... $CFG_XINPUT"
7547 echo "MIT-SHM support ..... $CFG_MITSHM"
7548 echo "FontConfig support .. $CFG_FONTCONFIG"
7549 echo "XKB Support ......... $CFG_XKB"
7550 echo "immodule support .... $CFG_IM"
7551 echo "GTK theme support ... $CFG_QGTKSTYLE"
7553 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support ....... $CFG_SQL_mysql"
7554 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support .. $CFG_SQL_psql"
7555 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........ $CFG_SQL_odbc"
7556 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ......... $CFG_SQL_oci"
7557 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ......... $CFG_SQL_tds"
7558 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ......... $CFG_SQL_db2"
7559 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ... $CFG_SQL_ibase"
7560 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support .... $CFG_SQL_sqlite2"
7561 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ...... $CFG_SQL_sqlite ($CFG_SQLITE)"
7563 OPENSSL_LINKAGE=""
7564 if [ "$CFG_OPENSSL" = "yes" ]; then
7565 OPENSSL_LINKAGE="(run-time)"
7566 elif [ "$CFG_OPENSSL" = "linked" ]; then
7567 OPENSSL_LINKAGE="(linked)"
7569 echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
7571 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
7573 # complain about not being able to use dynamic plugins if we are using a static build
7574 if [ "$CFG_SHARED" = "no" ]; then
7575 echo
7576 echo "WARNING: Using static linking will disable the use of dynamically"
7577 echo "loaded plugins. Make sure to import all needed static plugins,"
7578 echo "or compile needed modules into the library."
7579 echo
7581 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7582 echo
7583 echo "NOTE: When linking against OpenSSL, you can override the default"
7584 echo "library names through OPENSSL_LIBS."
7585 echo "For example:"
7586 echo " ./configure -openssl-linked OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto'"
7587 echo
7589 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7590 echo
7591 echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
7592 echo
7594 echo "alsa support ........ $CFG_ALSA"
7595 echo
7597 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7598 PROCS=1
7599 EXEC=""
7602 #-------------------------------------------------------------------------------
7603 # build makefiles based on the configuration
7604 #-------------------------------------------------------------------------------
7606 echo "Finding project files. Please wait..."
7607 "$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
7608 if [ -f "${relpath}/projects.pro" ]; then
7609 mkfile="${outpath}/Makefile"
7610 [ -f "$mkfile" ] && chmod +w "$mkfile"
7611 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro" -o "$mkfile"
7614 # .projects -> projects to process
7615 # .projects.1 -> qt and moc
7616 # .projects.2 -> subdirs and libs
7617 # .projects.3 -> the rest
7618 rm -f .projects .projects.1 .projects.2 .projects.3
7620 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7621 if [ -z "$AWK" ]; then
7622 for p in `echo $QMAKE_PROJECTS`; do
7623 echo "$p" >> .projects
7624 done
7625 else
7626 cat >projects.awk <<EOF
7627 BEGIN {
7628 files = 0
7629 target_file = ""
7630 input_file = ""
7632 first = "./.projects.1.tmp"
7633 second = "./.projects.2.tmp"
7634 third = "./.projects.3.tmp"
7637 FNR == 1 {
7638 if ( input_file ) {
7639 if ( ! target_file )
7640 target_file = third
7641 print input_file >target_file
7644 matched_target = 0
7645 template_lib = 0
7646 input_file = FILENAME
7647 target_file = ""
7650 /^(TARGET.*=)/ {
7651 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7652 target_file = first
7653 matched_target = 1
7654 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
7655 target_file = second
7656 matched_target = 1
7660 matched_target == 0 && /^(TEMPLATE.*=)/ {
7661 if ( \$3 == "subdirs" )
7662 target_file = second
7663 else if ( \$3 == "lib" )
7664 template_lib = 1
7665 else
7666 target_file = third
7669 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7670 if ( \$0 ~ /plugin/ )
7671 target_file = third
7672 else
7673 target_file = second
7676 END {
7677 if ( input_file ) {
7678 if ( ! target_file )
7679 target_file = third
7680 print input_file >>target_file
7686 rm -f .projects.all
7687 for p in `echo $QMAKE_PROJECTS`; do
7688 echo "$p" >> .projects.all
7689 done
7691 # if you get errors about the length of the command line to awk, change the -l arg
7692 # to split below
7693 split -l 100 .projects.all .projects.all.
7694 for p in .projects.all.*; do
7695 "$AWK" -f projects.awk `cat $p`
7696 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
7697 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
7698 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
7699 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
7700 done
7701 rm -f .projects.all* projects.awk
7703 [ -f .projects.1 ] && cat .projects.1 >>.projects
7704 [ -f .projects.2 ] && cat .projects.2 >>.projects
7705 rm -f .projects.1 .projects.2
7706 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
7707 cat .projects.3 >>.projects
7708 rm -f .projects.3
7711 # don't sort Qt and MOC in with the other project files
7712 # also work around a segfaulting uniq(1)
7713 if [ -f .sorted.projects.2 ]; then
7714 sort .sorted.projects.2 > .sorted.projects.2.new
7715 mv -f .sorted.projects.2.new .sorted.projects.2
7716 cat .sorted.projects.2 >> .sorted.projects.1
7718 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
7719 rm -f .sorted.projects.2 .sorted.projects.1
7721 NORM_PROJECTS=0
7722 FAST_PROJECTS=0
7723 if [ -f .projects ]; then
7724 uniq .projects >.tmp
7725 mv -f .tmp .projects
7726 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
7728 if [ -f .projects.3 ]; then
7729 uniq .projects.3 >.tmp
7730 mv -f .tmp .projects.3
7731 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7733 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7734 echo
7736 PART_ROOTS=
7737 for part in $CFG_BUILD_PARTS; do
7738 case "$part" in
7739 tools) PART_ROOTS="$PART_ROOTS tools" ;;
7740 libs) PART_ROOTS="$PART_ROOTS src" ;;
7741 translations) PART_ROOTS="$PART_ROOTS tools/linguist/lrelease translations" ;;
7742 examples) PART_ROOTS="$PART_ROOTS examples demos" ;;
7743 *) ;;
7744 esac
7745 done
7747 if [ "$CFG_DEV" = "yes" ]; then
7748 PART_ROOTS="$PART_ROOTS tests"
7751 echo "Creating makefiles. Please wait..."
7752 for file in .projects .projects.3; do
7753 [ '!' -f "$file" ] && continue
7754 for a in `cat $file`; do
7755 IN_ROOT=no
7756 for r in $PART_ROOTS; do
7757 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
7758 IN_ROOT=yes
7759 break
7761 done
7762 [ "$IN_ROOT" = "no" ] && continue
7764 case $a in
7765 *winmain/winmain.pro) continue ;;
7766 *s60main/s60main.pro) continue ;;
7767 *examples/activeqt/*) continue ;;
7768 */qmake/qmake.pro) continue ;;
7769 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
7770 *) SPEC=$XQMAKESPEC ;;
7771 esac
7772 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
7773 test -d "$dir" || mkdir -p "$dir"
7774 OUTDIR="$outpath/$dir"
7775 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7776 # fast configure - the makefile exists, skip it
7777 # since the makefile exists, it was generated by qmake, which means we
7778 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7779 # file changes...
7780 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7781 continue;
7783 QMAKE_SPEC_ARGS="-spec $SPEC"
7784 if echo '\c' | grep '\c' >/dev/null; then
7785 echo -n " for $a"
7786 else
7787 echo " for $a\c"
7790 QMAKE="$outpath/bin/qmake"
7791 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7792 if [ "$file" = ".projects.3" ]; then
7793 if echo '\c' | grep '\c' >/dev/null; then
7794 echo -n " (fast)"
7795 else
7796 echo " (fast)\c"
7798 echo
7800 cat >"${OUTDIR}/Makefile" <<EOF
7801 # ${OUTDIR}/Makefile: generated by configure
7803 # WARNING: This makefile will be replaced with a real makefile.
7804 # All changes made to this file will be lost.
7806 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7808 cat >>"${OUTDIR}/Makefile" <<EOF
7809 QMAKE = "$QMAKE"
7810 all clean install qmake first Makefile: FORCE
7811 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7812 cd "$OUTDIR"
7813 \$(MAKE) \$@
7815 FORCE:
7818 else
7819 if [ "$OPT_VERBOSE" = "yes" ]; then
7820 echo " (`basename $SPEC`)"
7821 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7822 else
7823 echo
7826 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7827 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7829 done
7830 done
7831 rm -f .projects .projects.3
7833 #-------------------------------------------------------------------------------
7834 # check for platforms that we don't yet know about
7835 #-------------------------------------------------------------------------------
7836 if [ "$CFG_ARCH" = "generic" ]; then
7837 cat <<EOF
7839 NOTICE: Atomic operations are not yet supported for this
7840 architecture.
7842 Qt will use the 'generic' architecture instead, which uses a
7843 single pthread_mutex_t to protect all atomic operations. This
7844 implementation is the slow (but safe) fallback implementation
7845 for architectures Qt does not yet support.
7849 #-------------------------------------------------------------------------------
7850 # check if the user passed the -no-zlib option, which is no longer supported
7851 #-------------------------------------------------------------------------------
7852 if [ -n "$ZLIB_FORCED" ]; then
7853 which_zlib="supplied"
7854 if [ "$CFG_ZLIB" = "system" ]; then
7855 which_zlib="system"
7858 cat <<EOF
7860 NOTICE: The -no-zlib option was supplied but is no longer
7861 supported.
7863 Qt now requires zlib support in all builds, so the -no-zlib
7864 option was ignored. Qt will be built using the $which_zlib
7865 zlib.
7869 #-------------------------------------------------------------------------------
7870 # finally save the executed command to another script
7871 #-------------------------------------------------------------------------------
7872 if [ `basename $0` != "config.status" ]; then
7873 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7875 # add the system variables
7876 for varname in $SYSTEM_VARIABLES; do
7877 cmd=`echo \
7878 'if [ -n "\$'${varname}'" ]; then
7879 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7880 fi'`
7881 eval "$cmd"
7882 done
7884 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7886 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7887 echo "#!/bin/sh" > "$outpath/config.status"
7888 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7889 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7890 echo "else" >> "$outpath/config.status"
7891 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7892 echo "fi" >> "$outpath/config.status"
7893 chmod +x "$outpath/config.status"
7896 if [ -n "$RPATH_MESSAGE" ]; then
7897 echo
7898 echo "$RPATH_MESSAGE"
7901 MAKE=`basename "$MAKE"`
7902 echo
7903 echo Qt is now configured for building. Just run \'$MAKE\'.
7904 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7905 echo Once everything is built, Qt is installed.
7906 echo You should not run \'$MAKE install\'.
7907 else
7908 echo Once everything is built, you must run \'$MAKE install\'.
7909 echo Qt will be installed into $QT_INSTALL_PREFIX
7911 echo
7912 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.
7913 echo