Moving some QVFB stuff out of the configure script and into .pro files
[qt-netbsd.git] / configure
blobe86d008004b57ba43d2e30d458077ecd3ee636fa
1 #!/bin/sh
2 #############################################################################
3 ##
4 ## Copyright (C) 2009 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 # relies on $QMAKESPEC being set correctly. parses include statements in
110 # qmake.conf and prints out the expanded file
111 getQMakeConf()
113 tmpSPEC="$QMAKESPEC"
114 if [ -n "$1" ]; then
115 tmpSPEC="$1"
117 $AWK -v "QMAKESPEC=$tmpSPEC" '
118 /^include\(.+\)$/{
119 fname = QMAKESPEC "/" substr($0, 9, length($0) - 9)
120 while ((getline line < fname) > 0)
121 print line
122 close(fname)
123 next
125 { print }' "$tmpSPEC/qmake.conf"
128 # relies on $TEST_COMPILER being set correctly
129 compilerSupportsFlag()
131 cat >conftest.cpp <<EOF
132 int main() { return 0; }
134 "$TEST_COMPILER" "$@" -o /dev/null conftest.cpp
135 ret=$?
136 rm -f conftest.cpp conftest.o
137 return $ret
140 # relies on $TEST_COMPILER being set correctly
141 linkerSupportsFlag()
143 lflags=-Wl
144 for flag
146 safe_flag=`shellEscape "$flag"`
147 lflags=$lflags,$safe_flag
148 done
149 compilerSupportsFlag "$lflags" >/dev/null 2>&1
152 #-------------------------------------------------------------------------------
153 # operating system detection
154 #-------------------------------------------------------------------------------
156 # need that throughout the script
157 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
158 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
159 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
160 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
163 #-------------------------------------------------------------------------------
164 # window system detection
165 #-------------------------------------------------------------------------------
167 PLATFORM_X11=no
168 PLATFORM_MAC=no
169 PLATFORM_QWS=no
171 if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ] && [ -d /System/Library/Frameworks/Carbon.framework ]; then
172 # Qt/Mac
173 # ~ the Carbon SDK exists
174 # ~ src/gui/base/qapplication_mac.cpp is present
175 # ~ this is the internal edition and Qt/Mac sources exist
176 PLATFORM_MAC=maybe
177 elif [ -f "$relpath"/src/gui/kernel/qapplication_qws.cpp ]; then
178 # Qt Embedded
179 # ~ src/gui/base/qapplication_qws.cpp is present
180 # ~ this is the free or commercial edition
181 # ~ this is the internal edition and Qt Embedded is explicitly enabled
182 if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ]; then
183 # This is a depot build, or an all-platforms package
184 PLATFORM_QWS=maybe
185 else
186 # This must be the embedded package, since the Qt/Mac source files are not present
187 PLATFORM_QWS=yes
191 #-----------------------------------------------------------------------------
192 # Qt version detection
193 #-----------------------------------------------------------------------------
194 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
195 QT_MAJOR_VERSION=
196 QT_MINOR_VERSION=0
197 QT_PATCH_VERSION=0
198 if [ -n "$QT_VERSION" ]; then
199 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
200 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
201 if [ -n "$MAJOR" ]; then
202 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
203 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
204 QT_MAJOR_VERSION="$MAJOR"
205 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
206 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
209 if [ -z "$QT_MAJOR_VERSION" ]; then
210 echo "Cannot process version from qglobal.h: $QT_VERSION"
211 echo "Cannot proceed."
212 exit 1
215 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
216 if [ -z "$QT_PACKAGEDATE" ]; then
217 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
218 echo "Cannot proceed"
219 exit 1
222 #-------------------------------------------------------------------------------
223 # check the license
224 #-------------------------------------------------------------------------------
225 COMMERCIAL_USER=ask
226 CFG_DEV=no
227 CFG_NOKIA=no
228 CFG_EMBEDDED=no
229 EditionString=Commercial
231 earlyArgParse()
233 # parse the arguments, setting things to "yes" or "no"
234 while [ "$#" -gt 0 ]; do
235 CURRENT_OPT="$1"
236 UNKNOWN_ARG=no
237 case "$1" in
238 #Autoconf style options
239 --enable-*)
240 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
241 VAL=yes
243 --disable-*)
244 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
245 VAL=no
247 --*=*)
248 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
249 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
251 --no-*)
252 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
253 VAL=no
255 -embedded)
256 VAR=embedded
257 # this option may or may not be followed by an argument
258 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
259 VAL=auto
260 else
261 shift;
262 VAL=$1
265 -h|help|--help|-help)
266 if [ "$VAL" = "yes" ]; then
267 OPT_HELP="$VAL"
268 COMMERCIAL_USER="no" #doesn't matter we will display the help
269 else
270 UNKNOWN_OPT=yes
271 COMMERCIAL_USER="no" #doesn't matter we will display the help
274 --*)
275 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
276 VAL=yes
279 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
280 VAL="unknown"
283 UNKNOWN_ARG=yes
285 esac
286 if [ "$UNKNOWN_ARG" = "yes" ]; then
287 shift
288 continue
290 shift
292 UNKNOWN_OPT=no
293 case "$VAR" in
294 embedded)
295 CFG_EMBEDDED="$VAL"
296 if [ "$PLATFORM_QWS" != "no" ]; then
297 if [ "$PLATFORM_QWS" = "maybe" ]; then
298 PLATFORM_X11=no
299 PLATFORM_MAC=no
300 PLATFORM_QWS=yes
302 else
303 echo "No license exists to enable Qt for Embedded Linux. Disabling."
304 CFG_EMBEDDED=no
307 developer-build)
308 CFG_DEV="yes"
310 nokia-developer)
311 CFG_DEV="yes"
312 CFG_NOKIA="yes"
313 COMMERCIAL_USER="no"
315 commercial)
316 COMMERCIAL_USER="yes"
318 opensource)
319 COMMERCIAL_USER="no"
322 UNKNOWN_OPT=yes
324 esac
325 done
328 earlyArgParse "$@"
330 if [ "$COMMERCIAL_USER" = "ask" ]; then
331 while true; do
332 echo "Which edition of Qt do you want to use ?"
333 echo
334 echo "Type 'c' if you want to use the Commercial Edition."
335 echo "Type 'o' if you want to use the Open Source Edition."
336 echo
337 read commercial
338 echo
339 if [ "$commercial" = "c" ]; then
340 COMMERCIAL_USER="yes"
341 break
342 elif [ "$commercial" = "o" ]; then
343 COMMERCIAL_USER="no"
344 break
346 done
349 if [ "$CFG_NOKIA" = "yes" ]; then
350 Licensee="Nokia"
351 Edition="NokiaInternalBuild"
352 EditionString="Nokia Internal Build"
353 QT_EDITION="QT_EDITION_OPENSOURCE"
354 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
355 elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
356 # Commercial preview release
357 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
358 Licensee="Preview"
359 Edition="Preview"
360 QT_EDITION="QT_EDITION_DESKTOP"
361 LicenseType="Technology Preview"
362 elif [ $COMMERCIAL_USER = "yes" ]; then
363 # one of commercial editions
364 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
365 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes
367 # read in the license file
368 if [ -f "$LICENSE_FILE" ]; then
369 . "$LICENSE_FILE" >/dev/null 2>&1
370 if [ -z "$LicenseKeyExt" ]; then
371 echo
372 echo "You are using an old license file."
373 echo
374 echo "Please install the license file supplied by Nokia,"
375 echo "or install the Qt Open Source Edition if you intend to"
376 echo "develop free software."
377 exit 1
379 if [ -z "$Licensee" ]; then
380 echo
381 echo "Invalid license key. Please check the license key."
382 exit 1
384 else
385 if [ -z "$LicenseKeyExt" ]; then
386 echo
387 if echo '\c' | grep '\c' >/dev/null; then
388 echo -n "Please enter your license key: "
389 else
390 echo "Please enter your license key: \c"
392 read LicenseKeyExt
393 Licensee="Unknown user"
397 # Key verification
398 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
399 && LicenseValid="yes" \
400 || LicenseValid="no"
401 if [ "$LicenseValid" != "yes" ]; then
402 echo
403 echo "Invalid license key. Please check the license key."
404 exit 1
406 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
407 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d - | cut -b 1`
408 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
409 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
411 # determine which edition we are licensed to use
412 case "$LicenseTypeCode" in
413 F4M)
414 LicenseType="Commercial"
415 case $ProductCode in
417 Edition="Universal"
418 QT_EDITION="QT_EDITION_UNIVERSAL"
421 Edition="FullFramework"
422 EditionString="Full Framework"
423 QT_EDITION="QT_EDITION_DESKTOP"
426 Edition="GUIFramework"
427 EditionString="GUI Framework"
428 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
430 esac
432 Z4M|R4M|Q4M)
433 LicenseType="Evaluation"
434 case $ProductCode in
436 Edition="Evaluation"
437 QT_EDITION="QT_EDITION_EVALUATION"
439 esac
441 esac
442 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
443 echo
444 echo "Invalid license key. Please check the license key."
445 exit 1
448 # verify that we are licensed to use Qt on this platform
449 LICENSE_EXTENSION=
450 if [ "$PlatformCode" = "X" ]; then
451 # Qt All-OS
452 LICENSE_EXTENSION="-ALLOS"
453 elif [ "$PLATFORM_QWS" = "yes" ]; then
454 case $PlatformCode in
455 2|4|8|A|B|E|G|J|K|P|Q|S|U|V|W)
456 # Qt for Embedded Linux
457 LICENSE_EXTENSION="-EMBEDDED"
460 echo
461 echo "You are not licensed for Qt for Embedded Linux."
462 echo
463 echo "Please contact qt-info@nokia.com to upgrade your license"
464 echo "to include Qt for Embedded Linux, or install the"
465 echo "Qt Open Source Edition if you intend to develop free software."
466 exit 1
468 esac
469 elif [ "$PLATFORM_MAC" = "yes" ]; then
470 case $PlatformCode in
471 2|4|5|7|9|B|C|E|F|G|L|M|U|W|Y)
472 # Qt/Mac
473 LICENSE_EXTENSION="-DESKTOP"
475 3|6|8|A|D|H|J|K|P|Q|S|V)
476 # Embedded no-deploy
477 LICENSE_EXTENSION="-EMBEDDED"
480 echo
481 echo "You are not licensed for the Qt/Mac platform."
482 echo
483 echo "Please contact qt-info@nokia.com to upgrade your license"
484 echo "to include the Qt/Mac platform."
485 exit 1
487 esac
488 else
489 case $PlatformCode in
490 2|3|4|5|7|D|E|F|J|M|Q|S|T|V|Z)
491 # Qt/X11
492 LICENSE_EXTENSION="-DESKTOP"
494 6|8|9|A|B|C|G|H|K|P|U|W)
495 # Embedded no-deploy
496 LICENSE_EXTENSION="-EMBEDDED"
499 echo
500 echo "You are not licensed for the Qt/X11 platform."
501 echo
502 echo "Please contact qt-info@nokia.com to upgrade your license to"
503 echo "include the Qt/X11 platform, or install the Qt Open Source Edition"
504 echo "if you intend to develop free software."
505 exit 1
507 esac
510 if test -r "$relpath/.LICENSE"; then
511 # Generic, non-final license
512 LICENSE_EXTENSION=""
513 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
514 case "$line" in
515 *BETA*)
516 Edition=Beta
518 *TECHNOLOGY?PREVIEW*)
519 Edition=Preview
521 *EVALUATION*)
522 Edition=Evaluation
525 echo >&2 "Invalid license files; cannot continue"
526 exit 1
528 esac
529 Licensee="$Edition"
530 EditionString="$Edition"
531 QT_EDITION="QT_EDITION_DESKTOP"
534 case "$LicenseFeatureCode" in
535 G|L)
536 # US
537 case "$LicenseType" in
538 Commercial)
539 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
541 Evaluation)
542 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
544 esac
546 2|5)
547 # non-US
548 case "$LicenseType" in
549 Commercial)
550 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
552 Evaluation)
553 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
555 esac
558 echo
559 echo "Invalid license key. Please check the license key."
560 exit 1
562 esac
563 if [ '!' -f "$outpath/LICENSE" ]; then
564 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
565 echo "this software has disappeared."
566 echo
567 echo "Sorry, you are not licensed to use this software."
568 echo "Try re-installing."
569 echo
570 exit 1
572 elif [ $COMMERCIAL_USER = "no" ]; then
573 # Open Source edition - may only be used under the terms of the GPL or LGPL.
574 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
575 Licensee="Open Source"
576 Edition="OpenSource"
577 EditionString="Open Source"
578 QT_EDITION="QT_EDITION_OPENSOURCE"
581 #-------------------------------------------------------------------------------
582 # initalize variables
583 #-------------------------------------------------------------------------------
585 SYSTEM_VARIABLES="CC CXX CFLAGS CXXFLAGS LDFLAGS"
586 for varname in $SYSTEM_VARIABLES; do
587 qmakevarname="${varname}"
588 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
589 if [ "${varname}" = "LDFLAGS" ]; then
590 qmakevarname="LFLAGS"
592 cmd=`echo \
593 'if [ -n "\$'${varname}'" ]; then
594 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
595 fi'`
596 eval "$cmd"
597 done
598 # Use CC/CXX to run config.tests
599 mkdir -p "$outpath/config.tests"
600 rm -f "$outpath/config.tests/.qmake.cache"
601 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
603 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
604 QMakeVar add decorations "default windows styled"
605 QMakeVar add mouse-drivers "pc"
606 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
607 QMakeVar add gfx-drivers "linuxfb"
608 QMakeVar add mouse-drivers "linuxtp"
610 QMakeVar add kbd-drivers "tty"
612 if [ "$CFG_DEV" = "yes" ]; then
613 QMakeVar add kbd-drivers "um"
616 # QTDIR may be set and point to an old or system-wide Qt installation
617 unset QTDIR
619 # the minimum version of libdbus-1 that we require:
620 MIN_DBUS_1_VERSION=0.62
622 # initalize internal variables
623 CFG_CONFIGURE_EXIT_ON_ERROR=yes
624 CFG_PROFILE=no
625 CFG_EXCEPTIONS=unspecified
626 CFG_SCRIPT=auto # (yes|no|auto)
627 CFG_SCRIPTTOOLS=auto # (yes|no|auto)
628 CFG_XMLPATTERNS=auto # (yes|no|auto)
629 CFG_INCREMENTAL=auto
630 CFG_QCONFIG=full
631 CFG_DEBUG=auto
632 CFG_MYSQL_CONFIG=
633 CFG_DEBUG_RELEASE=no
634 CFG_SHARED=yes
635 CFG_SM=auto
636 CFG_XSHAPE=auto
637 CFG_XSYNC=auto
638 CFG_XINERAMA=runtime
639 CFG_XFIXES=runtime
640 CFG_ZLIB=auto
641 CFG_SQLITE=qt
642 CFG_GIF=auto
643 CFG_TIFF=auto
644 CFG_LIBTIFF=auto
645 CFG_PNG=yes
646 CFG_LIBPNG=auto
647 CFG_JPEG=auto
648 CFG_LIBJPEG=auto
649 CFG_MNG=auto
650 CFG_LIBMNG=auto
651 CFG_XCURSOR=runtime
652 CFG_XRANDR=runtime
653 CFG_XRENDER=auto
654 CFG_MITSHM=auto
655 CFG_OPENGL=auto
656 CFG_OPENVG=no
657 CFG_OPENVG_LC_INCLUDES=no
658 CFG_OPENVG_SHIVA=no
659 CFG_OPENVG_ON_OPENGL=no
660 CFG_EGL=no
661 CFG_EGL_GLES_INCLUDES=no
662 CFG_SSE=auto
663 CFG_FONTCONFIG=auto
664 CFG_QWS_FREETYPE=auto
665 CFG_LIBFREETYPE=auto
666 CFG_SQL_AVAILABLE=
667 QT_DEFAULT_BUILD_PARTS="libs tools examples demos docs translations"
668 CFG_BUILD_PARTS=""
669 CFG_NOBUILD_PARTS=""
670 CFG_RELEASE_QMAKE=no
671 CFG_PHONON=auto
672 CFG_PHONON_BACKEND=yes
673 CFG_MULTIMEDIA=yes
674 CFG_SVG=yes
675 CFG_WEBKIT=auto # (yes|no|auto)
677 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
678 CFG_GFX_ON="linuxfb multiscreen"
679 CFG_GFX_PLUGIN_AVAILABLE=
680 CFG_GFX_PLUGIN=
681 CFG_GFX_OFF=
682 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
683 CFG_KBD_ON="tty" #default, see QMakeVar above
684 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
685 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
687 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
688 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
689 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
690 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
693 CFG_ARCH=
694 CFG_HOST_ARCH=
695 CFG_KBD_PLUGIN_AVAILABLE=
696 CFG_KBD_PLUGIN=
697 CFG_KBD_OFF=
698 CFG_MOUSE_PLUGIN_AVAILABLE=
699 CFG_MOUSE_PLUGIN=
700 CFG_MOUSE_OFF=
701 CFG_USE_GNUMAKE=no
702 CFG_IM=yes
703 CFG_DECORATION_AVAILABLE="styled windows default"
704 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
705 CFG_DECORATION_PLUGIN_AVAILABLE=
706 CFG_DECORATION_PLUGIN=
707 CFG_XINPUT=runtime
708 CFG_XKB=auto
709 CFG_NIS=auto
710 CFG_CUPS=auto
711 CFG_ICONV=auto
712 CFG_DBUS=auto
713 CFG_GLIB=auto
714 CFG_GSTREAMER=auto
715 CFG_QGTKSTYLE=auto
716 CFG_LARGEFILE=auto
717 CFG_OPENSSL=auto
718 CFG_PTMALLOC=no
719 CFG_STL=auto
720 CFG_PRECOMPILE=auto
721 CFG_SEPARATE_DEBUG_INFO=auto
722 CFG_REDUCE_EXPORTS=auto
723 CFG_MMX=auto
724 CFG_3DNOW=auto
725 CFG_SSE=auto
726 CFG_SSE2=auto
727 CFG_REDUCE_RELOCATIONS=no
728 CFG_IPV6=auto
729 CFG_NAS=no
730 CFG_QWS_DEPTHS=all
731 CFG_USER_BUILD_KEY=
732 CFG_ACCESSIBILITY=auto
733 CFG_QT3SUPPORT=yes
734 CFG_ENDIAN=auto
735 CFG_HOST_ENDIAN=auto
736 CFG_DOUBLEFORMAT=auto
737 CFG_ARMFPA=auto
738 CFG_IWMMXT=no
739 CFG_CLOCK_GETTIME=auto
740 CFG_CLOCK_MONOTONIC=auto
741 CFG_MREMAP=auto
742 CFG_GETADDRINFO=auto
743 CFG_IPV6IFNAME=auto
744 CFG_GETIFADDRS=auto
745 CFG_INOTIFY=auto
746 CFG_RPATH=yes
747 CFG_FRAMEWORK=auto
748 CFG_MAC_ARCHS=
749 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
750 CFG_MAC_DWARF2=auto
751 CFG_MAC_XARCH=auto
752 CFG_MAC_CARBON=yes
753 CFG_MAC_COCOA=auto
754 COMMANDLINE_MAC_COCOA=no
755 CFG_SXE=no
756 CFG_PREFIX_INSTALL=yes
757 CFG_SDK=
758 D_FLAGS=
759 I_FLAGS=
760 L_FLAGS=
761 RPATH_FLAGS=
762 l_FLAGS=
763 QCONFIG_FLAGS=
764 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
765 PLATFORM=$QMAKESPEC
766 QT_CROSS_COMPILE=no
767 OPT_CONFIRM_LICENSE=no
768 OPT_SHADOW=maybe
769 OPT_FAST=auto
770 OPT_VERBOSE=no
771 OPT_HELP=
772 CFG_SILENT=no
773 CFG_GRAPHICS_SYSTEM=default
774 CFG_ALSA=auto
776 # initalize variables used for installation
777 QT_INSTALL_PREFIX=
778 QT_INSTALL_DOCS=
779 QT_INSTALL_HEADERS=
780 QT_INSTALL_LIBS=
781 QT_INSTALL_BINS=
782 QT_INSTALL_PLUGINS=
783 QT_INSTALL_DATA=
784 QT_INSTALL_TRANSLATIONS=
785 QT_INSTALL_SETTINGS=
786 QT_INSTALL_EXAMPLES=
787 QT_INSTALL_DEMOS=
788 QT_HOST_PREFIX=
790 #flags for SQL drivers
791 QT_CFLAGS_PSQL=
792 QT_LFLAGS_PSQL=
793 QT_CFLAGS_MYSQL=
794 QT_LFLAGS_MYSQL=
795 QT_LFLAGS_MYSQL_R=
796 QT_CFLAGS_SQLITE=
797 QT_LFLAGS_SQLITE=
798 QT_LFLAGS_ODBC="-lodbc"
800 # flags for libdbus-1
801 QT_CFLAGS_DBUS=
802 QT_LIBS_DBUS=
804 # flags for Glib (X11 only)
805 QT_CFLAGS_GLIB=
806 QT_LIBS_GLIB=
808 # flags for GStreamer (X11 only)
809 QT_CFLAGS_GSTREAMER=
810 QT_LIBS_GSTREAMER=
812 #-------------------------------------------------------------------------------
813 # check SQL drivers, mouse drivers and decorations available in this package
814 #-------------------------------------------------------------------------------
816 # opensource version removes some drivers, so force them to be off
817 CFG_SQL_tds=no
818 CFG_SQL_oci=no
819 CFG_SQL_db2=no
821 CFG_SQL_AVAILABLE=
822 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
823 for a in "$relpath/src/plugins/sqldrivers/"*; do
824 if [ -d "$a" ]; then
825 base_a=`basename "$a"`
826 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
827 eval "CFG_SQL_${base_a}=auto"
829 done
832 CFG_DECORATION_PLUGIN_AVAILABLE=
833 if [ -d "$relpath/src/plugins/decorations" ]; then
834 for a in "$relpath/src/plugins/decorations/"*; do
835 if [ -d "$a" ]; then
836 base_a=`basename "$a"`
837 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
839 done
842 CFG_KBD_PLUGIN_AVAILABLE=
843 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
844 for a in "$relpath/src/plugins/kbddrivers/"*; do
845 if [ -d "$a" ]; then
846 base_a=`basename "$a"`
847 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
849 done
852 CFG_MOUSE_PLUGIN_AVAILABLE=
853 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
854 for a in "$relpath/src/plugins/mousedrivers/"*; do
855 if [ -d "$a" ]; then
856 base_a=`basename "$a"`
857 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
859 done
862 CFG_GFX_PLUGIN_AVAILABLE=
863 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
864 for a in "$relpath/src/plugins/gfxdrivers/"*; do
865 if [ -d "$a" ]; then
866 base_a=`basename "$a"`
867 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
869 done
870 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
873 #-------------------------------------------------------------------------------
874 # parse command line arguments
875 #-------------------------------------------------------------------------------
877 # parse the arguments, setting things to "yes" or "no"
878 while [ "$#" -gt 0 ]; do
879 CURRENT_OPT="$1"
880 UNKNOWN_ARG=no
881 case "$1" in
882 #Autoconf style options
883 --enable-*)
884 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
885 VAL=yes
887 --disable-*)
888 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
889 VAL=no
891 --*=*)
892 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
893 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
895 --no-*)
896 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
897 VAL=no
899 --*)
900 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
901 VAL=yes
903 #Qt plugin options
904 -no-*-*|-plugin-*-*|-qt-*-*)
905 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
906 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
908 #Qt style no options
909 -no-*)
910 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
911 VAL=no
913 #Qt style yes options
914 -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-svg|-webkit|-script|-scripttools|-rpath|-force-pkg-config)
915 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
916 VAL=yes
918 #Qt style options that pass an argument
919 -qconfig)
920 if [ "$PLATFORM_QWS" != "yes" ]; then
921 echo
922 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
923 echo
925 CFG_QCONFIG="$VAL"
926 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
927 shift
928 VAL=$1
930 -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config)
931 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
932 shift
933 VAL="$1"
935 #Qt style complex options in one command
936 -enable-*|-disable-*)
937 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
938 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
940 #Qt Builtin/System style options
941 -no-*|-system-*|-qt-*)
942 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
943 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
945 #Options that cannot be generalized
946 -k|-continue)
947 VAR=fatal_error
948 VAL=no
950 -embedded)
951 VAR=embedded
952 # this option may or may not be followed by an argument
953 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
954 VAL=auto
955 else
956 shift;
957 VAL=$1
960 -opengl)
961 VAR=opengl
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=yes
965 else
966 shift;
967 VAL=$1
970 -openvg)
971 VAR=openvg
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 -hostprefix)
981 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
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=$outpath
985 else
986 shift;
987 VAL=$1
990 -host-*-endian)
991 VAR=host_endian
992 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
994 -*-endian)
995 VAR=endian
996 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
998 -qtnamespace)
999 VAR="qtnamespace"
1000 shift
1001 VAL="$1"
1003 -graphicssystem)
1004 VAR="graphicssystem"
1005 shift
1006 VAL=$1
1008 -qtlibinfix)
1009 VAR="qtlibinfix"
1010 shift
1011 VAL="$1"
1013 -D?*|-D)
1014 VAR="add_define"
1015 if [ "$1" = "-D" ]; then
1016 shift
1017 VAL="$1"
1018 else
1019 VAL=`echo $1 | sed 's,-D,,'`
1022 -I?*|-I)
1023 VAR="add_ipath"
1024 if [ "$1" = "-I" ]; then
1025 shift
1026 VAL="$1"
1027 else
1028 VAL=`echo $1 | sed 's,-I,,'`
1031 -L?*|-L)
1032 VAR="add_lpath"
1033 if [ "$1" = "-L" ]; then
1034 shift
1035 VAL="$1"
1036 else
1037 VAL=`echo $1 | sed 's,-L,,'`
1040 -R?*|-R)
1041 VAR="add_rpath"
1042 if [ "$1" = "-R" ]; then
1043 shift
1044 VAL="$1"
1045 else
1046 VAL=`echo $1 | sed 's,-R,,'`
1049 -l?*)
1050 VAR="add_link"
1051 VAL=`echo $1 | sed 's,-l,,'`
1053 -F?*|-F)
1054 VAR="add_fpath"
1055 if [ "$1" = "-F" ]; then
1056 shift
1057 VAL="$1"
1058 else
1059 VAL=`echo $1 | sed 's,-F,,'`
1062 -fw?*|-fw)
1063 VAR="add_framework"
1064 if [ "$1" = "-fw" ]; then
1065 shift
1066 VAL="$1"
1067 else
1068 VAL=`echo $1 | sed 's,-fw,,'`
1072 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1073 VAL="unknown"
1076 UNKNOWN_ARG=yes
1078 esac
1079 if [ "$UNKNOWN_ARG" = "yes" ]; then
1080 echo "$1: unknown argument"
1081 OPT_HELP=yes
1082 ERROR=yes
1083 shift
1084 continue
1086 shift
1088 UNKNOWN_OPT=no
1089 case "$VAR" in
1090 qt3support)
1091 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1092 CFG_QT3SUPPORT="$VAL"
1093 else
1094 UNKNOWN_OPT=yes
1097 accessibility)
1098 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1099 CFG_ACCESSIBILITY="$VAL"
1100 else
1101 UNKNOWN_OPT=yes
1104 license)
1105 LICENSE_FILE="$VAL"
1107 gnumake)
1108 CFG_USE_GNUMAKE="$VAL"
1110 mysql_config)
1111 CFG_MYSQL_CONFIG="$VAL"
1113 prefix)
1114 QT_INSTALL_PREFIX="$VAL"
1116 hostprefix)
1117 QT_HOST_PREFIX="$VAL"
1119 force-pkg-config)
1120 QT_FORCE_PKGCONFIG=yes
1122 docdir)
1123 QT_INSTALL_DOCS="$VAL"
1125 headerdir)
1126 QT_INSTALL_HEADERS="$VAL"
1128 plugindir)
1129 QT_INSTALL_PLUGINS="$VAL"
1131 datadir)
1132 QT_INSTALL_DATA="$VAL"
1134 libdir)
1135 QT_INSTALL_LIBS="$VAL"
1137 qtnamespace)
1138 QT_NAMESPACE="$VAL"
1140 qtlibinfix)
1141 QT_LIBINFIX="$VAL"
1143 translationdir)
1144 QT_INSTALL_TRANSLATIONS="$VAL"
1146 sysconfdir|settingsdir)
1147 QT_INSTALL_SETTINGS="$VAL"
1149 examplesdir)
1150 QT_INSTALL_EXAMPLES="$VAL"
1152 demosdir)
1153 QT_INSTALL_DEMOS="$VAL"
1155 qconfig)
1156 CFG_QCONFIG="$VAL"
1158 bindir)
1159 QT_INSTALL_BINS="$VAL"
1161 buildkey)
1162 CFG_USER_BUILD_KEY="$VAL"
1164 sxe)
1165 CFG_SXE="$VAL"
1167 embedded)
1168 CFG_EMBEDDED="$VAL"
1169 if [ "$PLATFORM_QWS" != "no" ]; then
1170 if [ "$PLATFORM_QWS" = "maybe" ]; then
1171 PLATFORM_X11=no
1172 PLATFORM_MAC=no
1173 PLATFORM_QWS=yes
1175 else
1176 echo "No license exists to enable Qt for Embedded Linux. Disabling."
1177 CFG_EMBEDDED=no
1180 sse)
1181 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1182 CFG_SSE="$VAL"
1183 else
1184 UNKNOWN_OPT=yes
1187 endian)
1188 if [ "$VAL" = "little" ]; then
1189 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1190 elif [ "$VAL" = "big" ]; then
1191 CFG_ENDIAN="Q_BIG_ENDIAN"
1192 else
1193 UNKNOWN_OPT=yes
1196 host_endian)
1197 if [ "$VAL" = "little" ]; then
1198 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1199 elif [ "$VAL" = "big" ]; then
1200 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1201 else
1202 UNKNOWN_OPT=yes
1205 armfpa)
1206 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1207 CFG_ARMFPA="$VAL"
1208 else
1209 UNKNOWN_OPT=yes
1212 depths)
1213 CFG_QWS_DEPTHS="$VAL"
1215 opengl)
1216 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1217 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1218 [ "$VAL" = "es1cl" ] || [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
1219 CFG_OPENGL="$VAL"
1220 else
1221 UNKNOWN_OPT=yes
1224 openvg)
1225 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1226 CFG_OPENVG="$VAL"
1227 else
1228 UNKNOWN_OPT=yes
1231 graphicssystem)
1232 if [ "$PLATFORM_QWS" = "yes" ]; then
1233 echo "Error: Graphics System plugins are not supported on QWS."
1234 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1235 echo " rather than existing as a separate plugin."
1236 echo ""
1237 UNKNOWN_OPT=yes
1238 else
1239 if [ "$VAL" = "opengl" ]; then
1240 CFG_GRAPHICS_SYSTEM="opengl"
1241 elif [ "$VAL" = "openvg" ]; then
1242 CFG_GRAPHICS_SYSTEM="openvg"
1243 elif [ "$VAL" = "raster" ]; then
1244 CFG_GRAPHICS_SYSTEM="raster"
1245 else
1246 UNKNOWN_OPT=yes
1251 qvfb) # left for commandline compatibility, not documented
1252 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1253 if [ "$VAL" = "yes" ]; then
1254 QMakeVar add gfx-drivers qvfb
1255 QMakeVar add kbd-drivers qvfb
1256 QMakeVar add mouse-drivers qvfb
1257 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1258 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1259 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1261 else
1262 UNKNOWN_OPT=yes
1265 nomake)
1266 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1268 make)
1269 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1271 x11)
1272 if [ "$PLATFORM_MAC" = "yes" ]; then
1273 PLATFORM_MAC=no
1274 elif [ "$PLATFORM_QWS" = "yes" ]; then
1275 PLATFORM_QWS=no
1277 if [ "$CFG_FRAMEWORK" = "auto" ]; then
1278 CFG_FRAMEWORK=no
1280 PLATFORM_X11=yes
1282 sdk)
1283 if [ "$PLATFORM_MAC" = "yes" ]; then
1284 CFG_SDK="$VAL"
1285 else
1286 UNKNOWN_OPT=yes
1289 dwarf2)
1290 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1291 CFG_MAC_DWARF2="$VAL"
1292 else
1293 UNKNOWN_OPT=yes
1296 arch)
1297 if [ "$PLATFORM_MAC" = "yes" ]; then
1298 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1299 else
1300 CFG_ARCH=$VAL
1303 host-arch)
1304 CFG_HOST_ARCH=$VAL
1306 universal)
1307 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1308 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1309 else
1310 UNKNOWN_OPT=yes
1313 cocoa)
1314 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1315 CFG_MAC_COCOA="$VAL"
1316 COMMANDLINE_MAC_COCOA="$VAL"
1317 else
1318 UNKNOWN_OPT=yes
1321 framework)
1322 if [ "$PLATFORM_MAC" = "yes" ]; then
1323 CFG_FRAMEWORK="$VAL"
1324 else
1325 UNKNOWN_OPT=yes
1328 profile)
1329 if [ "$VAL" = "yes" ]; then
1330 CFG_PROFILE=yes
1331 QMakeVar add QMAKE_CFLAGS -pg
1332 QMakeVar add QMAKE_CXXFLAGS -pg
1333 QMakeVar add QMAKE_LFLAGS -pg
1334 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1335 else
1336 UNKNOWN_OPT=yes
1339 exceptions|g++-exceptions)
1340 if [ "$VAL" = "no" ]; then
1341 CFG_EXCEPTIONS=no
1342 elif [ "$VAL" = "yes" ]; then
1343 CFG_EXCEPTIONS=yes
1344 else
1345 UNKNOWN_OPT=yes
1348 platform)
1349 PLATFORM="$VAL"
1350 # keep compatibility with old platform names
1351 case $PLATFORM in
1352 aix-64)
1353 PLATFORM=aix-xlc-64
1355 hpux-o64)
1356 PLATFORM=hpux-acc-o64
1358 hpux-n64)
1359 PLATFORM=hpux-acc-64
1361 hpux-acc-n64)
1362 PLATFORM=hpux-acc-64
1364 irix-n32)
1365 PLATFORM=irix-cc
1367 irix-64)
1368 PLATFORM=irix-cc-64
1370 irix-cc-n64)
1371 PLATFORM=irix-cc-64
1373 reliant-64)
1374 PLATFORM=reliant-cds-64
1376 solaris-64)
1377 PLATFORM=solaris-cc-64
1379 solaris-64)
1380 PLATFORM=solaris-cc-64
1382 openunix-cc)
1383 PLATFORM=unixware-cc
1385 openunix-g++)
1386 PLATFORM=unixware-g++
1388 unixware7-cc)
1389 PLATFORM=unixware-cc
1391 unixware7-g++)
1392 PLATFORM=unixware-g++
1394 macx-g++-64)
1395 PLATFORM=macx-g++
1396 NATIVE_64_ARCH=
1397 case `uname -p` in
1398 i386) NATIVE_64_ARCH="x86_64" ;;
1399 powerpc) NATIVE_64_ARCH="ppc64" ;;
1400 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1401 esac
1402 if [ ! -z "$NATIVE_64_ARCH" ]; then
1403 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1404 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1407 esac
1409 xplatform)
1410 XPLATFORM="$VAL"
1412 debug-and-release)
1413 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1414 CFG_DEBUG_RELEASE="$VAL"
1415 else
1416 UNKNOWN_OPT=yes
1419 optimized-qmake)
1420 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1421 CFG_RELEASE_QMAKE="$VAL"
1422 else
1423 UNKNOWN_OPT=yes
1426 release)
1427 if [ "$VAL" = "yes" ]; then
1428 CFG_DEBUG=no
1429 elif [ "$VAL" = "no" ]; then
1430 CFG_DEBUG=yes
1431 else
1432 UNKNOWN_OPT=yes
1435 prefix-install)
1436 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1437 CFG_PREFIX_INSTALL="$VAL"
1438 else
1439 UNKNOWN_OPT=yes
1442 debug)
1443 CFG_DEBUG="$VAL"
1445 developer-build|commercial|opensource|nokia-developer)
1446 # These switches have been dealt with already
1448 static)
1449 if [ "$VAL" = "yes" ]; then
1450 CFG_SHARED=no
1451 elif [ "$VAL" = "no" ]; then
1452 CFG_SHARED=yes
1453 else
1454 UNKNOWN_OPT=yes
1457 incremental)
1458 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1459 CFG_INCREMENTAL="$VAL"
1460 else
1461 UNKNOWN_OPT=yes
1464 fatal_error)
1465 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1466 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1467 else
1468 UNKNOWN_OPT=yes
1471 feature-*)
1472 if [ "$PLATFORM_QWS" = "yes" ]; then
1473 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1474 if [ "$VAL" = "no" ]; then
1475 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1476 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1477 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1478 else
1479 UNKNOWN_OPT=yes
1481 else
1482 UNKNOWN_OPT=yes
1485 shared)
1486 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1487 CFG_SHARED="$VAL"
1488 else
1489 UNKNOWN_OPT=yes
1492 gif)
1493 [ "$VAL" = "qt" ] && VAL=yes
1494 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1495 CFG_GIF="$VAL"
1496 else
1497 UNKNOWN_OPT=yes
1501 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1502 CFG_SM="$VAL"
1503 else
1504 UNKNOWN_OPT=yes
1508 xinerama)
1509 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1510 CFG_XINERAMA="$VAL"
1511 else
1512 UNKNOWN_OPT=yes
1515 xshape)
1516 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1517 CFG_XSHAPE="$VAL"
1518 else
1519 UNKNOWN_OPT=yes
1522 xsync)
1523 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1524 CFG_XSYNC="$VAL"
1525 else
1526 UNKNOWN_OPT=yes
1529 xinput)
1530 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1531 CFG_XINPUT="$VAL"
1532 else
1533 UNKNOWN_OPT=yes
1536 stl)
1537 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1538 CFG_STL="$VAL"
1539 else
1540 UNKNOWN_OPT=yes
1543 pch)
1544 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1545 CFG_PRECOMPILE="$VAL"
1546 else
1547 UNKNOWN_OPT=yes
1550 separate-debug-info)
1551 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1552 CFG_SEPARATE_DEBUG_INFO="$VAL"
1553 else
1554 UNKNOWN_OPT=yes
1557 reduce-exports)
1558 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1559 CFG_REDUCE_EXPORTS="$VAL"
1560 else
1561 UNKNOWN_OPT=yes
1564 mmx)
1565 if [ "$VAL" = "no" ]; then
1566 CFG_MMX="$VAL"
1567 else
1568 UNKNOWN_OPT=yes
1571 3dnow)
1572 if [ "$VAL" = "no" ]; then
1573 CFG_3DNOW="$VAL"
1574 else
1575 UNKNOWN_OPT=yes
1578 sse)
1579 if [ "$VAL" = "no" ]; then
1580 CFG_SSE="$VAL"
1581 else
1582 UNKNOWN_OPT=yes
1585 sse2)
1586 if [ "$VAL" = "no" ]; then
1587 CFG_SSE2="$VAL"
1588 else
1589 UNKNOWN_OPT=yes
1592 iwmmxt)
1593 CFG_IWMMXT="yes"
1595 reduce-relocations)
1596 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1597 CFG_REDUCE_RELOCATIONS="$VAL"
1598 else
1599 UNKNOWN_OPT=yes
1602 freetype)
1603 [ "$VAL" = "qt" ] && VAL=yes
1604 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1605 CFG_QWS_FREETYPE="$VAL"
1606 else
1607 UNKNOWN_OPT=yes
1610 zlib)
1611 [ "$VAL" = "qt" ] && VAL=yes
1612 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1613 CFG_ZLIB="$VAL"
1614 else
1615 UNKNOWN_OPT=yes
1617 # No longer supported:
1618 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1620 sqlite)
1621 if [ "$VAL" = "system" ]; then
1622 CFG_SQLITE=system
1623 else
1624 UNKNOWN_OPT=yes
1627 libpng)
1628 [ "$VAL" = "yes" ] && VAL=qt
1629 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1630 CFG_LIBPNG="$VAL"
1631 else
1632 UNKNOWN_OPT=yes
1635 libjpeg)
1636 [ "$VAL" = "yes" ] && VAL=qt
1637 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1638 CFG_LIBJPEG="$VAL"
1639 else
1640 UNKNOWN_OPT=yes
1643 libmng)
1644 [ "$VAL" = "yes" ] && VAL=qt
1645 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1646 CFG_LIBMNG="$VAL"
1647 else
1648 UNKNOWN_OPT=yes
1651 libtiff)
1652 [ "$VAL" = "yes" ] && VAL=qt
1653 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1654 CFG_LIBTIFF="$VAL"
1655 else
1656 UNKNOWN_OPT=yes
1659 nas-sound)
1660 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1661 CFG_NAS="$VAL"
1662 else
1663 UNKNOWN_OPT=yes
1666 xcursor)
1667 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1668 CFG_XCURSOR="$VAL"
1669 else
1670 UNKNOWN_OPT=yes
1673 xfixes)
1674 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1675 CFG_XFIXES="$VAL"
1676 else
1677 UNKNOWN_OPT=yes
1680 xrandr)
1681 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1682 CFG_XRANDR="$VAL"
1683 else
1684 UNKNOWN_OPT=yes
1687 xrender)
1688 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1689 CFG_XRENDER="$VAL"
1690 else
1691 UNKNOWN_OPT=yes
1694 mitshm)
1695 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1696 CFG_MITSHM="$VAL"
1697 else
1698 UNKNOWN_OPT=yes
1701 fontconfig)
1702 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1703 CFG_FONTCONFIG="$VAL"
1704 else
1705 UNKNOWN_OPT=yes
1708 xkb)
1709 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1710 CFG_XKB="$VAL"
1711 else
1712 UNKNOWN_OPT=yes
1715 cups)
1716 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1717 CFG_CUPS="$VAL"
1718 else
1719 UNKNOWN_OPT=yes
1722 iconv)
1723 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1724 CFG_ICONV="$VAL"
1725 else
1726 UNKNOWN_OPT=yes
1729 glib)
1730 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1731 CFG_GLIB="$VAL"
1732 else
1733 UNKNOWN_OPT=yes
1736 gstreamer)
1737 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1738 CFG_GSTREAMER="$VAL"
1739 else
1740 UNKNOWN_OPT=yes
1743 gtkstyle)
1744 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1745 CFG_QGTKSTYLE="$VAL"
1746 else
1747 UNKNOWN_OPT=yes
1750 qdbus|dbus)
1751 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1752 CFG_DBUS="$VAL"
1753 elif [ "$VAL" = "runtime" ]; then
1754 CFG_DBUS="yes"
1755 else
1756 UNKNOWN_OPT=yes
1759 dbus-linked)
1760 if [ "$VAL" = "yes" ]; then
1761 CFG_DBUS="linked"
1762 else
1763 UNKNOWN_OPT=yes
1766 nis)
1767 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1768 CFG_NIS="$VAL"
1769 else
1770 UNKNOWN_OPT=yes
1773 largefile)
1774 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1775 CFG_LARGEFILE="$VAL"
1776 else
1777 UNKNOWN_OPT=yes
1780 openssl)
1781 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1782 CFG_OPENSSL="$VAL"
1783 else
1784 UNKNOWN_OPT=yes
1787 openssl-linked)
1788 if [ "$VAL" = "yes" ]; then
1789 CFG_OPENSSL="linked"
1790 else
1791 UNKNOWN_OPT=yes
1794 ptmalloc)
1795 if [ "$VAL" = "yes" ]; then
1796 CFG_PTMALLOC="yes"
1797 else
1798 UNKNOWN_OPT=yes
1802 xmlpatterns)
1803 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1804 CFG_XMLPATTERNS="yes"
1805 else
1806 if [ "$VAL" = "no" ]; then
1807 CFG_XMLPATTERNS="no"
1808 else
1809 UNKNOWN_OPT=yes
1813 script)
1814 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1815 CFG_SCRIPT="yes"
1816 else
1817 if [ "$VAL" = "no" ]; then
1818 CFG_SCRIPT="no"
1819 else
1820 UNKNOWN_OPT=yes
1824 scripttools)
1825 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1826 CFG_SCRIPTTOOLS="yes"
1827 else
1828 if [ "$VAL" = "no" ]; then
1829 CFG_SCRIPTTOOLS="no"
1830 else
1831 UNKNOWN_OPT=yes
1835 svg)
1836 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1837 CFG_SVG="yes"
1838 else
1839 if [ "$VAL" = "no" ]; then
1840 CFG_SVG="no"
1841 else
1842 UNKNOWN_OPT=yes
1846 webkit)
1847 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1848 CFG_WEBKIT="yes"
1849 else
1850 if [ "$VAL" = "no" ]; then
1851 CFG_WEBKIT="no"
1852 else
1853 UNKNOWN_OPT=yes
1857 confirm-license)
1858 if [ "$VAL" = "yes" ]; then
1859 OPT_CONFIRM_LICENSE="$VAL"
1860 else
1861 UNKNOWN_OPT=yes
1864 h|help)
1865 if [ "$VAL" = "yes" ]; then
1866 OPT_HELP="$VAL"
1867 else
1868 UNKNOWN_OPT=yes
1871 sql-*|gfx-*|decoration-*|kbd-*|mouse-*)
1872 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1873 # if autoconf style options were used, $VAL can be "yes" or "no"
1874 [ "$VAL" = "yes" ] && VAL=qt
1875 # now $VAL should be "no", "qt", or "plugin"... double-check
1876 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1877 UNKNOWN_OPT=yes
1879 # now $VAL is "no", "qt", or "plugin"
1880 OPT="$VAL"
1881 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1882 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1884 # Grab the available values
1885 case "$VAR" in
1886 sql)
1887 avail="$CFG_SQL_AVAILABLE"
1889 gfx)
1890 avail="$CFG_GFX_AVAILABLE"
1891 if [ "$OPT" = "plugin" ]; then
1892 avail="$CFG_GFX_PLUGIN_AVAILABLE"
1895 decoration)
1896 avail="$CFG_DECORATION_AVAILABLE"
1897 if [ "$OPT" = "plugin" ]; then
1898 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
1901 kbd)
1902 avail="$CFG_KBD_AVAILABLE"
1903 if [ "$OPT" = "plugin" ]; then
1904 avail="$CFG_KBD_PLUGIN_AVAILABLE"
1907 mouse)
1908 avail="$CFG_MOUSE_AVAILABLE"
1909 if [ "$OPT" = "plugin" ]; then
1910 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
1914 avail=""
1915 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1917 esac
1919 # Check that that user's value is available.
1920 found=no
1921 for d in $avail; do
1922 if [ "$VAL" = "$d" ]; then
1923 found=yes
1924 break
1926 done
1927 [ "$found" = yes ] || ERROR=yes
1929 if [ "$VAR" = "sql" ]; then
1930 # set the CFG_SQL_driver
1931 eval "CFG_SQL_$VAL=\$OPT"
1932 continue
1935 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1936 if [ "$OPT" = "plugin" ]; then
1937 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
1938 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
1939 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
1940 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
1941 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
1942 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
1943 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
1944 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
1945 VAR="${VAR}-${OPT}"
1946 else
1947 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
1948 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
1949 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
1950 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
1951 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
1952 VAR="${VAR}-driver"
1955 QMakeVar add "${VAR}s" "${VAL}"
1956 elif [ "$OPT" = "no" ]; then
1957 PLUG_VAR="${VAR}-plugin"
1958 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
1959 IN_VAR="${VAR}-driver"
1960 else
1961 IN_VAR="${VAR}"
1963 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
1964 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
1965 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
1966 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
1967 QMakeVar del "${IN_VAR}s" "$VAL"
1968 QMakeVar del "${PLUG_VAR}s" "$VAL"
1970 if [ "$ERROR" = "yes" ]; then
1971 echo "$CURRENT_OPT: unknown argument"
1972 OPT_HELP=yes
1975 v|verbose)
1976 if [ "$VAL" = "yes" ]; then
1977 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1978 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1979 else
1980 OPT_VERBOSE=yes
1982 elif [ "$VAL" = "no" ]; then
1983 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1984 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1985 else
1986 OPT_VERBOSE=no
1988 else
1989 UNKNOWN_OPT=yes
1992 fast)
1993 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1994 OPT_FAST="$VAL"
1995 else
1996 UNKNOWN_OPT=yes
1999 rpath)
2000 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2001 CFG_RPATH="$VAL"
2002 else
2003 UNKNOWN_OPT=yes
2006 add_define)
2007 D_FLAGS="$D_FLAGS \"$VAL\""
2009 add_ipath)
2010 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2012 add_lpath)
2013 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2015 add_rpath)
2016 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2018 add_link)
2019 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2021 add_fpath)
2022 if [ "$PLATFORM_MAC" = "yes" ]; then
2023 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2024 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2025 else
2026 UNKNOWN_OPT=yes
2029 add_framework)
2030 if [ "$PLATFORM_MAC" = "yes" ]; then
2031 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2032 else
2033 UNKNOWN_OPT=yes
2036 silent)
2037 CFG_SILENT="$VAL"
2039 phonon)
2040 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2041 CFG_PHONON="$VAL"
2042 else
2043 UNKNOWN_OPT=yes
2046 phonon-backend)
2047 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2048 CFG_PHONON_BACKEND="$VAL"
2049 else
2050 UNKNOWN_OPT=yes
2053 multimedia)
2054 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2055 CFG_MULTIMEDIA="$VAL"
2056 else
2057 UNKNOWN_OPT=yes
2061 UNKNOWN_OPT=yes
2063 esac
2064 if [ "$UNKNOWN_OPT" = "yes" ]; then
2065 echo "${CURRENT_OPT}: invalid command-line switch"
2066 OPT_HELP=yes
2067 ERROR=yes
2069 done
2071 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2072 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2073 CFG_QT3SUPPORT="no"
2076 # update QT_CONFIG to show our current predefined configuration
2077 case "$CFG_QCONFIG" in
2078 minimal|small|medium|large|full)
2079 # these are a sequence of increasing functionality
2080 for c in minimal small medium large full; do
2081 QT_CONFIG="$QT_CONFIG $c-config"
2082 [ "$CFG_QCONFIG" = $c ] && break
2083 done
2086 # not known to be sufficient for anything
2087 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ]; then
2088 echo >&2 "Error: configuration file not found:"
2089 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2090 OPT_HELP=yes
2092 esac
2094 #-------------------------------------------------------------------------------
2095 # build tree initialization
2096 #-------------------------------------------------------------------------------
2098 # where to find which..
2099 unixtests="$relpath/config.tests/unix"
2100 mactests="$relpath/config.tests/mac"
2101 WHICH="$unixtests/which.test"
2103 PERL=`$WHICH perl 2>/dev/null`
2105 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2106 AWK=
2107 for e in gawk nawk awk; do
2108 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2109 AWK=$e
2110 break
2112 done
2114 # find perl
2115 PERL="/usr/bin/perl"
2116 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2117 PERL=`$WHICH perl`
2120 ### skip this if the user just needs help...
2121 if [ "$OPT_HELP" != "yes" ]; then
2123 # is this a shadow build?
2124 if [ "$OPT_SHADOW" = "maybe" ]; then
2125 OPT_SHADOW=no
2126 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2127 if [ -h "$outpath" ]; then
2128 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2129 else
2130 OPT_SHADOW=yes
2134 if [ "$OPT_SHADOW" = "yes" ]; then
2135 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" ]; then
2136 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2137 echo >&2 "Cannot proceed."
2138 exit 1
2140 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2143 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2144 echo
2145 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2146 echo "By default, Qt is built in release mode with separate debug information, so"
2147 echo "-debug-and-release is not necessary anymore"
2148 echo
2151 # detect build style
2152 if [ "$CFG_DEBUG" = "auto" ]; then
2153 if [ "$PLATFORM_MAC" = "yes" ]; then
2154 CFG_DEBUG_RELEASE=yes
2155 CFG_DEBUG=yes
2156 elif [ "$CFG_DEV" = "yes" ]; then
2157 CFG_DEBUG_RELEASE=no
2158 CFG_DEBUG=yes
2159 else
2160 CFG_DEBUG_RELEASE=no
2161 CFG_DEBUG=no
2164 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2165 QMAKE_CONFIG="$QMAKE_CONFIG build_all"
2168 if [ "$CFG_SILENT" = "yes" ]; then
2169 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2172 # if the source tree is different from the build tree,
2173 # symlink or copy part of the sources
2174 if [ "$OPT_SHADOW" = "yes" ]; then
2175 echo "Preparing build tree..."
2177 if [ -z "$PERL" ]; then
2178 echo
2179 echo "You need perl in your PATH to make a shadow build."
2180 echo "Cannot proceed."
2181 exit 1
2184 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2186 # symlink the qmake directory
2187 find "$relpath/qmake" | while read a; do
2188 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2189 if [ '!' -f "$my_a" ]; then
2190 if [ -d "$a" ]; then
2191 # directories are created...
2192 mkdir -p "$my_a"
2193 else
2194 a_dir=`dirname "$my_a"`
2195 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2196 # ... and files are symlinked
2197 case `basename "$a"` in
2198 *.o|*.d|GNUmakefile*|qmake)
2201 rm -f "$my_a"
2202 ln -s "$a" "$my_a"
2204 esac
2207 done
2209 # make a syncqt script that can be used in the shadow
2210 rm -f "$outpath/bin/syncqt"
2211 if [ -x "$relpath/bin/syncqt" ]; then
2212 mkdir -p "$outpath/bin"
2213 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2214 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
2215 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" $*" >>"$outpath/bin/syncqt"
2216 chmod 755 "$outpath/bin/syncqt"
2219 # symlink the mkspecs directory
2220 mkdir -p "$outpath/mkspecs"
2221 rm -f "$outpath"/mkspecs/*
2222 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2223 rm -f "$outpath/mkspecs/default"
2225 # symlink the doc directory
2226 rm -rf "$outpath/doc"
2227 ln -s "$relpath/doc" "$outpath/doc"
2229 # make sure q3porting.xml can be found
2230 mkdir -p "$outpath/tools/porting/src"
2231 rm -f "$outpath/tools/porting/src/q3porting.xml"
2232 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2235 # symlink fonts to be able to run application from build directory
2236 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then
2237 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2238 mkdir -p "${outpath}/lib"
2239 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2243 if [ "$OPT_FAST" = "auto" ]; then
2244 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2245 OPT_FAST=yes
2246 else
2247 OPT_FAST=no
2251 # find a make command
2252 if [ -z "$MAKE" ]; then
2253 MAKE=
2254 for mk in gmake make; do
2255 if "$WHICH" $mk >/dev/null 2>&1; then
2256 MAKE=`"$WHICH" $mk`
2257 break
2259 done
2260 if [ -z "$MAKE" ]; then
2261 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2262 echo >&2 "Cannot proceed."
2263 exit 1
2265 # export MAKE, we need it later in the config.tests
2266 export MAKE
2269 fi ### help
2271 #-------------------------------------------------------------------------------
2272 # auto-detect all that hasn't been specified in the arguments
2273 #-------------------------------------------------------------------------------
2275 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2276 if [ "$CFG_EMBEDDED" != "no" ]; then
2277 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2278 Darwin:*)
2279 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2280 if [ -z "$XPLATFORM" ]; then
2281 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2282 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2285 FreeBSD:*)
2286 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2287 if [ -z "$XPLATFORM" ]; then
2288 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2289 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2292 SunOS:5*)
2293 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2294 if [ -z "$XPLATFORM" ]; then
2295 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2296 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2299 Linux:*)
2300 if [ -z "$PLATFORM" ]; then
2301 case "$UNAME_MACHINE" in
2302 *86)
2303 PLATFORM=qws/linux-x86-g++
2305 *86_64)
2306 PLATFORM=qws/linux-x86_64-g++
2308 *ppc)
2309 PLATFORM=qws/linux-ppc-g++
2312 PLATFORM=qws/linux-generic-g++
2314 esac
2316 if [ -z "$XPLATFORM" ]; then
2317 if [ "$CFG_EMBEDDED" = "auto" ]; then
2318 if [ -n "$CFG_ARCH" ]; then
2319 CFG_EMBEDDED=$CFG_ARCH
2320 else
2321 case "$UNAME_MACHINE" in
2322 *86)
2323 CFG_EMBEDDED=x86
2325 *86_64)
2326 CFG_EMBEDDED=x86_64
2328 *ppc)
2329 CFG_EMBEDDED=ppc
2332 CFG_EMBEDDED=generic
2334 esac
2337 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2340 QNX:*)
2341 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2342 if [ -z "$XPLATFORM" ]; then
2343 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2344 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2347 CYGWIN*:*)
2348 CFG_EMBEDDED=x86
2351 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2352 CFG_EMBEDDED=no
2353 PLATFORM_QWS=no
2355 esac
2357 if [ -z "$PLATFORM" ]; then
2358 PLATFORM_NOTES=
2359 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2360 Darwin:*)
2361 if [ "$PLATFORM_MAC" = "yes" ]; then
2362 PLATFORM=macx-g++
2363 # PLATFORM=macx-xcode
2364 else
2365 PLATFORM=darwin-g++
2368 AIX:*)
2369 #PLATFORM=aix-g++
2370 #PLATFORM=aix-g++-64
2371 PLATFORM=aix-xlc
2372 #PLATFORM=aix-xlc-64
2373 PLATFORM_NOTES="
2374 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2377 GNU:*)
2378 PLATFORM=hurd-g++
2380 dgux:*)
2381 PLATFORM=dgux-g++
2383 # DYNIX/ptx:4*)
2384 # PLATFORM=dynix-g++
2385 # ;;
2386 ULTRIX:*)
2387 PLATFORM=ultrix-g++
2389 FreeBSD:*)
2390 PLATFORM=freebsd-g++
2391 PLATFORM_NOTES="
2392 - Also available for FreeBSD: freebsd-icc
2395 OpenBSD:*)
2396 PLATFORM=openbsd-g++
2398 NetBSD:*)
2399 PLATFORM=netbsd-g++
2401 BSD/OS:*|BSD/386:*)
2402 PLATFORM=bsdi-g++
2404 IRIX*:*)
2405 #PLATFORM=irix-g++
2406 PLATFORM=irix-cc
2407 #PLATFORM=irix-cc-64
2408 PLATFORM_NOTES="
2409 - Also available for IRIX: irix-g++ irix-cc-64
2412 HP-UX:*)
2413 case "$UNAME_MACHINE" in
2414 ia64)
2415 #PLATFORM=hpuxi-acc-32
2416 PLATFORM=hpuxi-acc-64
2417 PLATFORM_NOTES="
2418 - Also available for HP-UXi: hpuxi-acc-32
2422 #PLATFORM=hpux-g++
2423 PLATFORM=hpux-acc
2424 #PLATFORM=hpux-acc-64
2425 #PLATFORM=hpux-cc
2426 #PLATFORM=hpux-acc-o64
2427 PLATFORM_NOTES="
2428 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2431 esac
2433 OSF1:*)
2434 #PLATFORM=tru64-g++
2435 PLATFORM=tru64-cxx
2436 PLATFORM_NOTES="
2437 - Also available for Tru64: tru64-g++
2440 Linux:*)
2441 case "$UNAME_MACHINE" in
2442 x86_64|s390x|ppc64)
2443 PLATFORM=linux-g++-64
2446 PLATFORM=linux-g++
2448 esac
2449 PLATFORM_NOTES="
2450 - Also available for Linux: linux-kcc linux-icc linux-cxx
2453 SunOS:5*)
2454 #PLATFORM=solaris-g++
2455 PLATFORM=solaris-cc
2456 #PLATFORM=solaris-cc64
2457 PLATFORM_NOTES="
2458 - Also available for Solaris: solaris-g++ solaris-cc-64
2461 ReliantUNIX-*:*|SINIX-*:*)
2462 PLATFORM=reliant-cds
2463 #PLATFORM=reliant-cds-64
2464 PLATFORM_NOTES="
2465 - Also available for Reliant UNIX: reliant-cds-64
2468 CYGWIN*:*)
2469 PLATFORM=cygwin-g++
2471 LynxOS*:*)
2472 PLATFORM=lynxos-g++
2474 OpenUNIX:*)
2475 #PLATFORM=unixware-g++
2476 PLATFORM=unixware-cc
2477 PLATFORM_NOTES="
2478 - Also available for OpenUNIX: unixware-g++
2481 UnixWare:*)
2482 #PLATFORM=unixware-g++
2483 PLATFORM=unixware-cc
2484 PLATFORM_NOTES="
2485 - Also available for UnixWare: unixware-g++
2488 SCO_SV:*)
2489 #PLATFORM=sco-g++
2490 PLATFORM=sco-cc
2491 PLATFORM_NOTES="
2492 - Also available for SCO OpenServer: sco-g++
2495 UNIX_SV:*)
2496 PLATFORM=unixware-g++
2498 QNX:*)
2499 PLATFORM=unsupported/qnx-g++
2502 if [ "$OPT_HELP" != "yes" ]; then
2503 echo
2504 for p in $PLATFORMS; do
2505 echo " $relconf $* -platform $p"
2506 done
2507 echo >&2
2508 echo " The build script does not currently recognize all" >&2
2509 echo " platforms supported by Qt." >&2
2510 echo " Rerun this script with a -platform option listed to" >&2
2511 echo " set the system/compiler combination you use." >&2
2512 echo >&2
2513 exit 2
2515 esac
2518 if [ "$PLATFORM_QWS" = "yes" ]; then
2519 CFG_SM=no
2520 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2521 else
2522 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2525 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2526 if [ -d "$PLATFORM" ]; then
2527 QMAKESPEC="$PLATFORM"
2528 else
2529 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2531 if [ -d "$XPLATFORM" ]; then
2532 XQMAKESPEC="$XPLATFORM"
2533 else
2534 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2536 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2537 QT_CROSS_COMPILE=yes
2538 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2541 if [ "$PLATFORM_MAC" = "yes" ]; then
2542 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2543 echo >&2
2544 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2545 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2546 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2547 echo " built with 'macx-g++'" >&2
2548 echo >&2
2549 exit 2
2553 # check specified platforms are supported
2554 if [ '!' -d "$QMAKESPEC" ]; then
2555 echo
2556 echo " The specified system/compiler is not supported:"
2557 echo
2558 echo " $QMAKESPEC"
2559 echo
2560 echo " Please see the README file for a complete list."
2561 echo
2562 exit 2
2564 if [ '!' -d "$XQMAKESPEC" ]; then
2565 echo
2566 echo " The specified system/compiler is not supported:"
2567 echo
2568 echo " $XQMAKESPEC"
2569 echo
2570 echo " Please see the README file for a complete list."
2571 echo
2572 exit 2
2574 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2575 echo
2576 echo " The specified system/compiler port is not complete:"
2577 echo
2578 echo " $XQMAKESPEC/qplatformdefs.h"
2579 echo
2580 echo " Please contact qt-bugs@trolltech.com."
2581 echo
2582 exit 2
2585 # now look at the configs and figure out what platform we are config'd for
2586 [ "$CFG_EMBEDDED" = "no" ] \
2587 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2588 && PLATFORM_X11=yes
2589 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2591 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2592 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2593 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2594 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2595 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2599 #-------------------------------------------------------------------------------
2600 # determine the system architecture
2601 #-------------------------------------------------------------------------------
2602 if [ "$OPT_VERBOSE" = "yes" ]; then
2603 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2606 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2607 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2608 echo ""
2609 echo "You have specified a target architecture with -embedded and -arch."
2610 echo "The two architectures you have specified are different, so we can"
2611 echo "not proceed. Either set both to be the same, or only use -embedded."
2612 echo ""
2613 exit 1
2617 if [ -z "${CFG_HOST_ARCH}" ]; then
2618 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2619 IRIX*:*:*)
2620 CFG_HOST_ARCH=`uname -p`
2621 if [ "$OPT_VERBOSE" = "yes" ]; then
2622 echo " SGI ($CFG_HOST_ARCH)"
2625 SunOS:5*:*)
2626 case "$UNAME_MACHINE" in
2627 sun4u*|sun4v*)
2628 if [ "$OPT_VERBOSE" = "yes" ]; then
2629 echo " Sun SPARC (sparc)"
2631 CFG_HOST_ARCH=sparc
2633 i86pc)
2634 case "$PLATFORM" in
2635 *-64)
2636 if [ "$OPT_VERBOSE" = "yes" ]; then
2637 echo " 64-bit AMD 80x86 (x86_64)"
2639 CFG_HOST_ARCH=x86_64
2642 if [ "$OPT_VERBOSE" = "yes" ]; then
2643 echo " 32-bit Intel 80x86 (i386)"
2645 CFG_HOST_ARCH=i386
2647 esac
2648 esac
2650 Darwin:*:*)
2651 case "$UNAME_MACHINE" in
2652 Power?Macintosh)
2653 if [ "$OPT_VERBOSE" = "yes" ]; then
2654 echo " 32-bit Apple PowerPC (powerpc)"
2657 x86)
2658 if [ "$OPT_VERBOSE" = "yes" ]; then
2659 echo " 32-bit Intel 80x86 (i386)"
2662 esac
2663 CFG_HOST_ARCH=macosx
2665 AIX:*:00????????00)
2666 if [ "$OPT_VERBOSE" = "yes" ]; then
2667 echo " 64-bit IBM PowerPC (powerpc)"
2669 CFG_HOST_ARCH=powerpc
2671 HP-UX:*:9000*)
2672 if [ "$OPT_VERBOSE" = "yes" ]; then
2673 echo " HP PA-RISC (parisc)"
2675 CFG_HOST_ARCH=parisc
2677 *:*:i?86)
2678 if [ "$OPT_VERBOSE" = "yes" ]; then
2679 echo " 32-bit Intel 80x86 (i386)"
2681 CFG_HOST_ARCH=i386
2683 *:*:x86_64|*:*:amd64)
2684 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2685 if [ "$OPT_VERBOSE" = "yes" ]; then
2686 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2688 CFG_HOST_ARCH=i386
2689 else
2690 if [ "$OPT_VERBOSE" = "yes" ]; then
2691 echo " 64-bit AMD 80x86 (x86_64)"
2693 CFG_HOST_ARCH=x86_64
2696 *:*:ppc)
2697 if [ "$OPT_VERBOSE" = "yes" ]; then
2698 echo " 32-bit PowerPC (powerpc)"
2700 CFG_HOST_ARCH=powerpc
2702 *:*:ppc64)
2703 if [ "$OPT_VERBOSE" = "yes" ]; then
2704 echo " 64-bit PowerPC (powerpc)"
2706 CFG_HOST_ARCH=powerpc
2708 *:*:s390*)
2709 if [ "$OPT_VERBOSE" = "yes" ]; then
2710 echo " IBM S/390 (s390)"
2712 CFG_HOST_ARCH=s390
2714 *:*:arm*)
2715 if [ "$OPT_VERBOSE" = "yes" ]; then
2716 echo " ARM (arm)"
2718 CFG_HOST_ARCH=arm
2720 Linux:*:sparc*)
2721 if [ "$OPT_VERBOSE" = "yes" ]; then
2722 echo " Linux on SPARC"
2724 CFG_HOST_ARCH=sparc
2726 QNX:*:*)
2727 case "$UNAME_MACHINE" in
2728 x86pc)
2729 if [ "$OPT_VERBOSE" = "yes" ]; then
2730 echo " QNX on Intel 80x86 (i386)"
2732 CFG_HOST_ARCH=i386
2734 esac
2736 *:*:*)
2737 if [ "$OPT_VERBOSE" = "yes" ]; then
2738 echo " Trying '$UNAME_MACHINE'..."
2740 CFG_HOST_ARCH="$UNAME_MACHINE"
2742 esac
2745 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2746 if [ -n "$CFG_ARCH" ]; then
2747 CFG_EMBEDDED=$CFG_ARCH
2750 case "$CFG_EMBEDDED" in
2751 x86)
2752 CFG_ARCH=i386
2754 x86_64)
2755 CFG_ARCH=x86_64
2757 ipaq|sharp)
2758 CFG_ARCH=arm
2760 dm7000)
2761 CFG_ARCH=powerpc
2763 dm800)
2764 CFG_ARCH=mips
2766 sh4al)
2767 CFG_ARCH=sh4a
2770 CFG_ARCH="$CFG_EMBEDDED"
2772 esac
2773 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2774 CFG_ARCH=$CFG_HOST_ARCH
2777 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
2778 if [ "$OPT_VERBOSE" = "yes" ]; then
2779 echo " '$CFG_ARCH' is supported"
2781 else
2782 if [ "$OPT_VERBOSE" = "yes" ]; then
2783 echo " '$CFG_ARCH' is unsupported, using 'generic'"
2785 CFG_ARCH=generic
2787 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
2788 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
2789 if [ "$OPT_VERBOSE" = "yes" ]; then
2790 echo " '$CFG_HOST_ARCH' is supported"
2792 else
2793 if [ "$OPT_VERBOSE" = "yes" ]; then
2794 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
2796 CFG_HOST_ARCH=generic
2800 if [ "$OPT_VERBOSE" = "yes" ]; then
2801 echo "System architecture: '$CFG_ARCH'"
2802 if [ "$PLATFORM_QWS" = "yes" ]; then
2803 echo "Host architecture: '$CFG_HOST_ARCH'"
2807 #-------------------------------------------------------------------------------
2808 # tests that don't need qmake (must be run before displaying help)
2809 #-------------------------------------------------------------------------------
2811 if [ -z "$PKG_CONFIG" ]; then
2812 # See if PKG_CONFIG is set in the mkspec:
2813 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
2815 if [ -z "$PKG_CONFIG" ]; then
2816 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2819 # Work out if we can use pkg-config
2820 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2821 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2822 echo >&2 ""
2823 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2824 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2825 echo >&2 "environment!"
2826 echo >&2 ""
2827 if [ -z "$PKG_CONFIG_PATH" ]; then
2828 echo >&2 ""
2829 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2830 echo >&2 "the host compiler's .pc files will be used. This is probably"
2831 echo >&2 "not what you want."
2832 echo >&2 ""
2833 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2834 echo >&2 ""
2835 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2836 echo >&2 "been set. This means your toolchain's .pc files must contain"
2837 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2838 echo >&2 "tests are failing, please check these files."
2839 echo >&2 ""
2841 else
2842 PKG_CONFIG=""
2846 # process CFG_MAC_ARCHS
2847 if [ "$PLATFORM_MAC" = "yes" ]; then
2848 # check -arch arguments for validity.
2849 ALLOWED="x86 ppc x86_64 ppc64 i386"
2850 # Save the list so we can re-write it using only valid values
2851 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
2852 CFG_MAC_ARCHS=
2853 for i in $CFG_MAC_ARCHS_IN
2855 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
2856 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
2857 exit 2;
2859 if [ "$i" = "i386" -o "$i" = "x86" ]; then
2860 # These are synonymous values
2861 # CFG_MAC_ARCHS requires x86 while GCC requires i386
2862 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
2863 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
2864 else
2865 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
2866 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
2868 done
2871 # pass on $CFG_SDK to the configure tests.
2872 if [ '!' -z "$CFG_SDK" ]; then
2873 MAC_CONFIG_TEST_COMMANDLINE="-sdk $CFG_SDK"
2874 echo "tests command line: $MAC_CONFIG_TEST_COMMANDLINE"
2877 # find the default framework value
2878 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2879 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2880 CFG_FRAMEWORK="$CFG_SHARED"
2881 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2882 echo
2883 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2884 echo
2885 CFG_FRAMEWORK="no"
2887 else
2888 CFG_FRAMEWORK=no
2891 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
2892 TEST_COMPILER="$CC"
2893 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
2895 # auto-detect precompiled header support
2896 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2897 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2898 CFG_PRECOMPILE=no
2899 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2900 CFG_PRECOMPILE=no
2901 else
2902 CFG_PRECOMPILE=yes
2904 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2905 echo
2906 echo "WARNING: Using universal binaries disables precompiled headers."
2907 echo
2908 CFG_PRECOMPILE=no
2911 #auto-detect DWARF2 on the mac
2912 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2913 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2914 CFG_MAC_DWARF2=no
2915 else
2916 CFG_MAC_DWARF2=yes
2920 # auto-detect support for -Xarch on the mac
2921 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
2922 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2923 CFG_MAC_XARCH=no
2924 else
2925 CFG_MAC_XARCH=yes
2929 # don't autodetect support for separate debug info on objcopy when
2930 # cross-compiling as lots of toolchains seems to have problems with this
2931 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2932 CFG_SEPARATE_DEBUG_INFO="no"
2935 # auto-detect support for separate debug info in objcopy
2936 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2937 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_].*=%%p' | tr '\n' ' '`
2938 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_].*=%%p' | tr '\n' ' '`
2939 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
2940 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2941 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2942 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2943 CFG_SEPARATE_DEBUG_INFO=no
2944 else
2945 case "$PLATFORM" in
2946 hpux-*)
2947 # binutils on HP-UX is buggy; default to no.
2948 CFG_SEPARATE_DEBUG_INFO=no
2951 CFG_SEPARATE_DEBUG_INFO=yes
2953 esac
2957 # auto-detect -fvisibility support
2958 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2959 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2960 CFG_REDUCE_EXPORTS=no
2961 else
2962 CFG_REDUCE_EXPORTS=yes
2966 # detect the availability of the -Bsymbolic-functions linker optimization
2967 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2968 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2969 CFG_REDUCE_RELOCATIONS=no
2970 else
2971 CFG_REDUCE_RELOCATIONS=yes
2975 # auto-detect GNU make support
2976 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2977 CFG_USE_GNUMAKE=yes
2980 # If -opengl wasn't specified, don't try to auto-detect
2981 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
2982 CFG_OPENGL=no
2985 # mac
2986 if [ "$PLATFORM_MAC" = "yes" ]; then
2987 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
2988 CFG_OPENGL=desktop
2992 # find the default framework value
2993 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2994 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2995 CFG_FRAMEWORK="$CFG_SHARED"
2996 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2997 echo
2998 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2999 echo
3000 CFG_FRAMEWORK="no"
3002 else
3003 CFG_FRAMEWORK=no
3006 # x11 tests are done after qmake is built
3009 #setup the build parts
3010 if [ -z "$CFG_BUILD_PARTS" ]; then
3011 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3013 # don't build tools by default when cross-compiling
3014 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3015 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3018 for nobuild in $CFG_NOBUILD_PARTS; do
3019 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3020 done
3021 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3022 # echo
3023 # echo "WARNING: libs is a required part of the build."
3024 # echo
3025 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3028 #-------------------------------------------------------------------------------
3029 # post process QT_INSTALL_* variables
3030 #-------------------------------------------------------------------------------
3032 #prefix
3033 if [ -z "$QT_INSTALL_PREFIX" ]; then
3034 if [ "$CFG_DEV" = "yes" ]; then
3035 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3036 elif [ "$PLATFORM_QWS" = "yes" ]; then
3037 QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
3038 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3039 QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
3041 else
3042 QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
3045 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3047 #docs
3048 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3049 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3050 if [ "$PLATFORM_MAC" = "yes" ]; then
3051 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3054 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3057 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3059 #headers
3060 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3061 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3062 if [ "$PLATFORM_MAC" = "yes" ]; then
3063 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3064 QT_INSTALL_HEADERS=
3068 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3071 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3073 #libs
3074 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3075 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3076 if [ "$PLATFORM_MAC" = "yes" ]; then
3077 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3078 QT_INSTALL_LIBS="/Libraries/Frameworks"
3082 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3084 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3086 #bins
3087 if [ -z "$QT_INSTALL_BINS" ]; then #default
3088 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3089 if [ "$PLATFORM_MAC" = "yes" ]; then
3090 QT_INSTALL_BINS="/Developer/Applications/Qt"
3093 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3096 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3098 #plugins
3099 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3100 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3101 if [ "$PLATFORM_MAC" = "yes" ]; then
3102 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3105 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3107 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3109 #data
3110 if [ -z "$QT_INSTALL_DATA" ]; then #default
3111 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3113 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3115 #translations
3116 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3117 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3119 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3121 #settings
3122 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3123 if [ "$PLATFORM_MAC" = "yes" ]; then
3124 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3125 else
3126 QT_INSTALL_SETTINGS=/etc/xdg
3129 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3131 #examples
3132 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3133 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3134 if [ "$PLATFORM_MAC" = "yes" ]; then
3135 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3138 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3140 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3142 #demos
3143 if [ -z "$QT_INSTALL_DEMOS" ]; then #default
3144 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3145 if [ "$PLATFORM_MAC" = "yes" ]; then
3146 QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos"
3149 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos"
3151 QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
3153 #-------------------------------------------------------------------------------
3154 # help - interactive parts of the script _after_ this section please
3155 #-------------------------------------------------------------------------------
3157 # next, emit a usage message if something failed.
3158 if [ "$OPT_HELP" = "yes" ]; then
3159 [ "x$ERROR" = "xyes" ] && echo
3160 if [ "$CFG_NIS" = "no" ]; then
3161 NSY=" "
3162 NSN="*"
3163 else
3164 NSY="*"
3165 NSN=" "
3167 if [ "$CFG_CUPS" = "no" ]; then
3168 CUY=" "
3169 CUN="*"
3170 else
3171 CUY="*"
3172 CUN=" "
3174 if [ "$CFG_ICONV" = "no" ]; then
3175 CIY=" "
3176 CIN="*"
3177 else
3178 CIY="*"
3179 CIN=" "
3181 if [ "$CFG_LARGEFILE" = "no" ]; then
3182 LFSY=" "
3183 LFSN="*"
3184 else
3185 LFSY="*"
3186 LFSN=" "
3188 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3189 SHY="*"
3190 SHN=" "
3191 else
3192 SHY=" "
3193 SHN="*"
3195 if [ "$CFG_IPV6" = "auto" ]; then
3196 I6Y="*"
3197 I6N=" "
3199 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3200 PHY=" "
3201 PHN="*"
3202 else
3203 PHY="*"
3204 PHN=" "
3207 cat <<EOF
3208 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3209 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
3210 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3211 [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
3212 [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3213 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3214 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3215 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3216 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3217 [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3218 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3219 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3220 [-no-make <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3221 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3222 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
3223 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3224 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3225 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3226 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3227 [-no-openssl] [-openssl] [-openssl-linked]
3228 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit]
3229 [-no-script] [-script] [-no-scripttools] [-scripttools]
3231 [additional platform specific options (see below)]
3234 Installation options:
3236 These are optional, but you may specify install directories.
3238 -prefix <dir> ...... This will install everything relative to <dir>
3239 (default $QT_INSTALL_PREFIX)
3241 if [ "$PLATFORM_QWS" = "yes" ]; then
3242 cat <<EOF
3244 -hostprefix [dir] .. Tools and libraries needed when developing
3245 applications are installed in [dir]. If [dir] is
3246 not given, the current build directory will be used.
3249 cat <<EOF
3251 * -prefix-install .... Force a sandboxed "local" installation of
3252 Qt. This will install into
3253 $QT_INSTALL_PREFIX, if this option is
3254 disabled then some platforms will attempt a
3255 "system" install by placing default values to
3256 be placed in a system location other than
3257 PREFIX.
3259 You may use these to separate different parts of the install:
3261 -bindir <dir> ......... Executables will be installed to <dir>
3262 (default PREFIX/bin)
3263 -libdir <dir> ......... Libraries will be installed to <dir>
3264 (default PREFIX/lib)
3265 -docdir <dir> ......... Documentation will be installed to <dir>
3266 (default PREFIX/doc)
3267 -headerdir <dir> ...... Headers will be installed to <dir>
3268 (default PREFIX/include)
3269 -plugindir <dir> ...... Plugins will be installed to <dir>
3270 (default PREFIX/plugins)
3271 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3272 (default PREFIX)
3273 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3274 (default PREFIX/translations)
3275 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3276 (default PREFIX/etc/settings)
3277 -examplesdir <dir> .... Examples will be installed to <dir>
3278 (default PREFIX/examples)
3279 -demosdir <dir> ....... Demos will be installed to <dir>
3280 (default PREFIX/demos)
3282 You may use these options to turn on strict plugin loading.
3284 -buildkey <key> .... Build the Qt library and plugins using the specified
3285 <key>. When the library loads plugins, it will only
3286 load those that have a matching key.
3288 Configure options:
3290 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3291 that needs to be evaluated. If the evaluation succeeds, the feature is
3292 included. Here is a short explanation of each option:
3294 * -release ........... Compile and link Qt with debugging turned off.
3295 -debug ............. Compile and link Qt with debugging turned on.
3296 -debug-and-release . Compile and link two versions of Qt, with and without
3297 debugging turned on (Mac only).
3299 -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting)
3301 -opensource......... Compile and link the Open-Source Edition of Qt.
3302 -commercial......... Compile and link the Commercial Edition of Qt.
3305 * -shared ............ Create and use shared Qt libraries.
3306 -static ............ Create and use static Qt libraries.
3308 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3309 project files.
3310 -fast .............. Configure Qt quickly by generating Makefiles only for
3311 library and subdirectory targets. All other Makefiles
3312 are created as wrappers, which will in turn run qmake.
3314 -no-largefile ...... Disables large file support.
3315 + -largefile ......... Enables Qt to access files larger than 4 GB.
3318 if [ "$PLATFORM_QWS" = "yes" ]; then
3319 EXCN="*"
3320 EXCY=" "
3321 else
3322 EXCN=" "
3323 EXCY="*"
3325 if [ "$CFG_DBUS" = "no" ]; then
3326 DBY=" "
3327 DBN="+"
3328 else
3329 DBY="+"
3330 DBN=" "
3333 cat << EOF
3334 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3335 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3337 -no-accessibility .. Do not compile Accessibility support.
3338 * -accessibility ..... Compile Accessibility support.
3340 $SHN -no-stl ............ Do not compile STL support.
3341 $SHY -stl ............... Compile STL support.
3343 -no-sql-<driver> ... Disable SQL <driver> entirely.
3344 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3345 none are turned on.
3346 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3347 at run time.
3349 Possible values for <driver>:
3350 [ $CFG_SQL_AVAILABLE ]
3352 -system-sqlite ..... Use sqlite from the operating system.
3354 -no-qt3support ..... Disables the Qt 3 support functionality.
3355 * -qt3support ........ Enables the Qt 3 support functionality.
3357 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3358 + -xmlpatterns ....... Build the QtXmlPatterns module.
3359 QtXmlPatterns is built if a decent C++ compiler
3360 is used and exceptions are enabled.
3362 -no-multimedia ..... Do not build the QtMultimedia module.
3363 + -multimedia ........ Build the QtMultimedia module.
3365 -no-phonon ......... Do not build the Phonon module.
3366 + -phonon ............ Build the Phonon module.
3367 Phonon is built if a decent C++ compiler is used.
3368 -no-phonon-backend.. Do not build the platform phonon plugin.
3369 + -phonon-backend..... Build the platform phonon plugin.
3371 -no-svg ............ Do not build the SVG module.
3372 + -svg ............... Build the SVG module.
3374 -no-webkit ......... Do not build the WebKit module.
3375 + -webkit ............ Build the WebKit module.
3376 WebKit is built if a decent C++ compiler is used.
3378 -no-script ......... Do not build the QtScript module.
3379 + -script ............ Build the QtScript module.
3381 -no-scripttools .... Do not build the QtScriptTools module.
3382 + -scripttools ....... Build the QtScriptTools module.
3384 -platform target ... The operating system and compiler you are building
3385 on ($PLATFORM).
3387 See the README file for a list of supported
3388 operating systems and compilers.
3390 if [ "${PLATFORM_QWS}" != "yes" ]; then
3391 cat << EOF
3392 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3393 raster - Software rasterizer
3394 opengl - Rendering via OpenGL, Experimental!
3397 cat << EOF
3399 -no-mmx ............ Do not compile with use of MMX instructions.
3400 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3401 -no-sse ............ Do not compile with use of SSE instructions.
3402 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3404 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3405 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3407 -D <string> ........ Add an explicit define to the preprocessor.
3408 -I <string> ........ Add an explicit include path.
3409 -L <string> ........ Add an explicit library path.
3411 -help, -h .......... Display this information.
3413 Third Party Libraries:
3415 -qt-zlib ........... Use the zlib bundled with Qt.
3416 + -system-zlib ....... Use zlib from the operating system.
3417 See http://www.gzip.org/zlib
3419 -no-gif ............ Do not compile the plugin for GIF reading support.
3420 * -qt-gif ............ Compile the plugin for GIF reading support.
3421 See also src/plugins/imageformats/gif/qgifhandler.h
3423 -no-libtiff ........ Do not compile the plugin for TIFF support.
3424 -qt-libtiff ........ Use the libtiff bundled with Qt.
3425 + -system-libtiff .... Use libtiff from the operating system.
3426 See http://www.libtiff.org
3428 -no-libpng ......... Do not compile in PNG support.
3429 -qt-libpng ......... Use the libpng bundled with Qt.
3430 + -system-libpng ..... Use libpng from the operating system.
3431 See http://www.libpng.org/pub/png
3433 -no-libmng ......... Do not compile the plugin for MNG support.
3434 -qt-libmng ......... Use the libmng bundled with Qt.
3435 + -system-libmng ..... Use libmng from the operating system.
3436 See http://www.libmng.com
3438 -no-libjpeg ........ Do not compile the plugin for JPEG support.
3439 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3440 + -system-libjpeg .... Use libjpeg from the operating system.
3441 See http://www.ijg.org
3443 -no-openssl ........ Do not compile support for OpenSSL.
3444 + -openssl ........... Enable run-time OpenSSL support.
3445 -openssl-linked .... Enabled linked OpenSSL support.
3447 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3448 (Experimental.)
3450 Additional options:
3452 -make <part> ....... Add part to the list of parts to be built at make time.
3453 ($QT_DEFAULT_BUILD_PARTS)
3454 -nomake <part> ..... Exclude part from the list of parts to be built.
3456 -R <string> ........ Add an explicit runtime library path to the Qt
3457 libraries.
3458 -l <string> ........ Add an explicit library.
3460 -no-rpath .......... Do not use the library install path as a runtime
3461 library path.
3462 + -rpath ............. Link Qt libraries and executables using the library
3463 install path as a runtime library path. Equivalent
3464 to -R install_libpath
3466 -continue .......... Continue as far as possible if an error occurs.
3468 -verbose, -v ....... Print verbose information about each step of the
3469 configure process.
3471 -silent ............ Reduce the build output so that warnings and errors
3472 can be seen more easily.
3474 * -no-optimized-qmake ... Do not build qmake optimized.
3475 -optimized-qmake ...... Build qmake optimized.
3477 $NSN -no-nis ............ Do not compile NIS support.
3478 $NSY -nis ............... Compile NIS support.
3480 $CUN -no-cups ........... Do not compile CUPS support.
3481 $CUY -cups .............. Compile CUPS support.
3482 Requires cups/cups.h and libcups.so.2.
3484 $CIN -no-iconv .......... Do not compile support for iconv(3).
3485 $CIY -iconv ............. Compile support for iconv(3).
3487 $PHN -no-pch ............ Do not use precompiled header support.
3488 $PHY -pch ............... Use precompiled header support.
3490 $DBN -no-dbus ........... Do not compile the QtDBus module.
3491 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3492 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3494 -reduce-relocations ..... Reduce relocations in the libraries through extra
3495 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3496 experimental; needs GNU ld >= 2.18).
3499 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3500 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3501 SBY=""
3502 SBN="*"
3503 else
3504 SBY="*"
3505 SBN=" "
3507 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3508 SBY="*"
3509 SBN=" "
3510 else
3511 SBY=" "
3512 SBN="*"
3515 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
3517 cat << EOF
3519 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3520 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3524 fi # X11/QWS
3526 if [ "$PLATFORM_X11" = "yes" ]; then
3527 if [ "$CFG_SM" = "no" ]; then
3528 SMY=" "
3529 SMN="*"
3530 else
3531 SMY="*"
3532 SMN=" "
3534 if [ "$CFG_XSHAPE" = "no" ]; then
3535 SHY=" "
3536 SHN="*"
3537 else
3538 SHY="*"
3539 SHN=" "
3541 if [ "$CFG_XINERAMA" = "no" ]; then
3542 XAY=" "
3543 XAN="*"
3544 else
3545 XAY="*"
3546 XAN=" "
3548 if [ "$CFG_FONTCONFIG" = "no" ]; then
3549 FCGY=" "
3550 FCGN="*"
3551 else
3552 FCGY="*"
3553 FCGN=" "
3555 if [ "$CFG_XCURSOR" = "no" ]; then
3556 XCY=" "
3557 XCN="*"
3558 else
3559 XCY="*"
3560 XCN=" "
3562 if [ "$CFG_XFIXES" = "no" ]; then
3563 XFY=" "
3564 XFN="*"
3565 else
3566 XFY="*"
3567 XFN=" "
3569 if [ "$CFG_XRANDR" = "no" ]; then
3570 XZY=" "
3571 XZN="*"
3572 else
3573 XZY="*"
3574 XZN=" "
3576 if [ "$CFG_XRENDER" = "no" ]; then
3577 XRY=" "
3578 XRN="*"
3579 else
3580 XRY="*"
3581 XRN=" "
3583 if [ "$CFG_MITSHM" = "no" ]; then
3584 XMY=" "
3585 XMN="*"
3586 else
3587 XMY="*"
3588 XMN=" "
3590 if [ "$CFG_XINPUT" = "no" ]; then
3591 XIY=" "
3592 XIN="*"
3593 else
3594 XIY="*"
3595 XIN=" "
3597 if [ "$CFG_XKB" = "no" ]; then
3598 XKY=" "
3599 XKN="*"
3600 else
3601 XKY="*"
3602 XKN=" "
3604 if [ "$CFG_IM" = "no" ]; then
3605 IMY=" "
3606 IMN="*"
3607 else
3608 IMY="*"
3609 IMN=" "
3611 cat << EOF
3613 Qt/X11 only:
3615 -no-gtkstyle ....... Do not build the GTK theme integration.
3616 + -gtkstyle .......... Build the GTK theme integration.
3618 * -no-nas-sound ...... Do not compile in NAS sound support.
3619 -system-nas-sound .. Use NAS libaudio from the operating system.
3620 See http://radscan.com/nas.html
3622 -no-opengl ......... Do not support OpenGL.
3623 + -opengl <api> ...... Enable OpenGL support.
3624 With no parameter, this will auto-detect the "best"
3625 OpenGL API to use. If desktop OpenGL is avaliable, it
3626 will be used. Use desktop, es1, es1cl or es2 for <api>
3627 to force the use of the Desktop (OpenGL 1.x or 2.x),
3628 OpenGL ES 1.x Common profile, 1.x Common Lite profile
3629 or 2.x APIs instead. On X11, the EGL API will be used
3630 to manage GL contexts in the case of OpenGL ES
3632 -no-openvg ........ Do not support OpenVG.
3633 + -openvg ........... Enable OpenVG support.
3634 Requires EGL support, typically supplied by an OpenGL
3635 or other graphics implementation.
3637 $SMN -no-sm ............. Do not support X Session Management.
3638 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3640 $SHN -no-xshape ......... Do not compile XShape support.
3641 $SHY -xshape ............ Compile XShape support.
3642 Requires X11/extensions/shape.h.
3644 $SHN -no-xsync .......... Do not compile XSync support.
3645 $SHY -xsync ............. Compile XSync support.
3646 Requires X11/extensions/sync.h.
3648 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3649 $XAY -xinerama .......... Compile Xinerama support.
3650 Requires X11/extensions/Xinerama.h and libXinerama.
3651 By default, Xinerama support will be compiled if
3652 available and the shared libraries are dynamically
3653 loaded at runtime.
3655 $XCN -no-xcursor ........ Do not compile Xcursor support.
3656 $XCY -xcursor ........... Compile Xcursor support.
3657 Requires X11/Xcursor/Xcursor.h and libXcursor.
3658 By default, Xcursor support will be compiled if
3659 available and the shared libraries are dynamically
3660 loaded at runtime.
3662 $XFN -no-xfixes ......... Do not compile Xfixes support.
3663 $XFY -xfixes ............ Compile Xfixes support.
3664 Requires X11/extensions/Xfixes.h and libXfixes.
3665 By default, Xfixes support will be compiled if
3666 available and the shared libraries are dynamically
3667 loaded at runtime.
3669 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3670 $XZY -xrandr ............ Compile Xrandr support.
3671 Requires X11/extensions/Xrandr.h and libXrandr.
3673 $XRN -no-xrender ........ Do not compile Xrender support.
3674 $XRY -xrender ........... Compile Xrender support.
3675 Requires X11/extensions/Xrender.h and libXrender.
3677 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3678 $XMY -mitshm ............ Compile MIT-SHM support.
3679 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3681 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3682 $FCGY -fontconfig ........ Compile FontConfig support.
3683 Requires fontconfig/fontconfig.h, libfontconfig,
3684 freetype.h and libfreetype.
3686 $XIN -no-xinput.......... Do not compile Xinput support.
3687 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3688 which requires IRIX with wacom.h and libXi or
3689 XFree86 with X11/extensions/XInput.h and libXi.
3691 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3692 $XKY -xkb ............... Compile XKB support.
3697 if [ "$PLATFORM_MAC" = "yes" ]; then
3698 cat << EOF
3700 Qt/Mac only:
3702 -Fstring ........... Add an explicit framework path.
3703 -fw string ......... Add an explicit framework.
3705 -cocoa ............. Build the Cocoa version of Qt. Note that -no-framework
3706 and -static is not supported with -cocoa. Specifying
3707 this option creates Qt binaries that requires Mac OS X
3708 10.5 or higher.
3710 * -framework ......... Build Qt as a series of frameworks and
3711 link tools against those frameworks.
3712 -no-framework ...... Do not build Qt as a series of frameworks.
3714 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3715 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3717 -universal ......... Equivalent to -arch "ppc x86"
3719 -arch <arch> ....... Build Qt for <arch>
3720 Example values for <arch>: x86 ppc x86_64 ppc64
3721 Multiple -arch arguments can be specified, 64-bit archs
3722 will be built with the Cocoa framework.
3724 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3725 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3730 if [ "$PLATFORM_QWS" = "yes" ]; then
3731 cat << EOF
3733 Qt for Embedded Linux only:
3735 -xplatform target ... The target platform when cross-compiling.
3737 -no-feature-<feature> Do not compile in <feature>.
3738 -feature-<feature> .. Compile in <feature>. The available features
3739 are described in src/corelib/global/qfeatures.txt
3741 -embedded <arch> .... This will enable the embedded build, you must have a
3742 proper license for this switch to work.
3743 Example values for <arch>: arm mips x86 generic
3745 -armfpa ............. Target platform uses the ARM-FPA floating point format.
3746 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3748 The floating point format is usually autodetected by configure. Use this
3749 to override the detected value.
3751 -little-endian ...... Target platform is little endian (LSB first).
3752 -big-endian ......... Target platform is big endian (MSB first).
3754 -host-little-endian . Host platform is little endian (LSB first).
3755 -host-big-endian .... Host platform is big endian (MSB first).
3757 You only need to specify the endianness when
3758 cross-compiling, otherwise the host
3759 endianness will be used.
3761 -no-freetype ........ Do not compile in Freetype2 support.
3762 -qt-freetype ........ Use the libfreetype bundled with Qt.
3763 * -system-freetype .... Use libfreetype from the operating system.
3764 See http://www.freetype.org/
3766 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3767 default ($CFG_QCONFIG).
3769 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3770 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3772 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3773 by default all available decorations are on.
3774 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3775 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3776 linked to at run time.
3777 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3778 -no-decoration-<style> ....Disable decoration <style> entirely.
3779 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3781 -no-opengl .......... Do not support OpenGL.
3782 -opengl <api> ....... Enable OpenGL ES support
3783 With no parameter, this will attempt to auto-detect OpenGL ES 1.x
3784 or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection.
3786 NOTE: A QGLScreen driver for the hardware is required to support
3787 OpenGL ES on Qt for Embedded Linux.
3789 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3790 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3791 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3792 linked to at run time.
3793 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3794 -no-gfx-<driver> ... Disable graphics <driver> entirely.
3795 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3797 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
3798 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3800 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
3801 at runtime.
3802 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
3804 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
3805 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3807 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
3808 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3809 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
3810 at runtime.
3811 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
3812 -no-mouse-<driver> ... Disable mouse <driver> entirely.
3813 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3815 -iwmmxt ............ Compile using the iWMMXt instruction set
3816 (available on some XScale CPUs).
3822 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3823 if [ "$CFG_GLIB" = "no" ]; then
3824 GBY=" "
3825 GBN="+"
3826 else
3827 GBY="+"
3828 GBN=" "
3830 cat << EOF
3831 $GBN -no-glib ........... Do not compile Glib support.
3832 $GBY -glib .............. Compile Glib support.
3837 [ "x$ERROR" = "xyes" ] && exit 1
3838 exit 0
3839 fi # Help
3842 # -----------------------------------------------------------------------------
3843 # LICENSING, INTERACTIVE PART
3844 # -----------------------------------------------------------------------------
3846 if [ "$PLATFORM_QWS" = "yes" ]; then
3847 Platform="Qt for Embedded Linux"
3848 elif [ "$PLATFORM_MAC" = "yes" ]; then
3849 Platform="Qt/Mac"
3850 else
3851 PLATFORM_X11=yes
3852 Platform="Qt/X11"
3855 echo
3856 echo "This is the $Platform ${EditionString} Edition."
3857 echo
3859 if [ "$Edition" = "NokiaInternalBuild" ]; then
3860 echo "Detected -nokia-developer option"
3861 echo "Nokia employees and agents are allowed to use this software under"
3862 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
3863 elif [ "$Edition" = "OpenSource" ]; then
3864 while true; do
3865 echo "You are licensed to use this software under the terms of"
3866 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3867 if [ -f "$relpath/LICENSE.GPL3" ]; then
3868 echo "You are also licensed to use this software under the terms of"
3869 echo "the GNU General Public License (GPL) versions 3."
3870 affix="either"
3871 else
3872 affix="the"
3874 echo
3875 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3876 echo "You have already accepted the terms of the $LicenseType license."
3877 acceptance=yes
3878 else
3879 if [ -f "$relpath/LICENSE.GPL3" ]; then
3880 echo "Type '3' to view the GNU General Public License version 3."
3882 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3883 echo "Type 'yes' to accept this license offer."
3884 echo "Type 'no' to decline this license offer."
3885 echo
3886 if echo '\c' | grep '\c' >/dev/null; then
3887 echo -n "Do you accept the terms of $affix license? "
3888 else
3889 echo "Do you accept the terms of $affix license? \c"
3891 read acceptance
3893 echo
3894 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3895 break
3896 elif [ "$acceptance" = "no" ]; then
3897 echo "You are not licensed to use this software."
3898 echo
3899 exit 1
3900 elif [ "$acceptance" = "3" ]; then
3901 more "$relpath/LICENSE.GPL3"
3902 elif [ "$acceptance" = "L" ]; then
3903 more "$relpath/LICENSE.LGPL"
3905 done
3906 elif [ "$Edition" = "Preview" ]; then
3907 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3908 while true; do
3910 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3911 echo "You have already accepted the terms of the $LicenseType license."
3912 acceptance=yes
3913 else
3914 echo "You are licensed to use this software under the terms of"
3915 echo "the $TheLicense"
3916 echo
3917 echo "Type '?' to read the Preview License."
3918 echo "Type 'yes' to accept this license offer."
3919 echo "Type 'no' to decline this license offer."
3920 echo
3921 if echo '\c' | grep '\c' >/dev/null; then
3922 echo -n "Do you accept the terms of the license? "
3923 else
3924 echo "Do you accept the terms of the license? \c"
3926 read acceptance
3928 echo
3929 if [ "$acceptance" = "yes" ]; then
3930 break
3931 elif [ "$acceptance" = "no" ] ;then
3932 echo "You are not licensed to use this software."
3933 echo
3934 exit 0
3935 elif [ "$acceptance" = "?" ]; then
3936 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3938 done
3939 elif [ "$Edition" != "OpenSource" ]; then
3940 if [ -n "$ExpiryDate" ]; then
3941 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3942 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3943 Today=`date +%Y%m%d`
3944 if [ "$Today" -gt "$ExpiryDate" ]; then
3945 case "$LicenseType" in
3946 Commercial|Academic|Educational)
3947 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3948 echo
3949 echo "NOTICE NOTICE NOTICE NOTICE"
3950 echo
3951 echo " Your support and upgrade period has expired."
3952 echo
3953 echo " You are no longer licensed to use this version of Qt."
3954 echo " Please contact qt-info@nokia.com to renew your support"
3955 echo " and upgrades for this license."
3956 echo
3957 echo "NOTICE NOTICE NOTICE NOTICE"
3958 echo
3959 exit 1
3960 else
3961 echo
3962 echo "WARNING WARNING WARNING WARNING"
3963 echo
3964 echo " Your support and upgrade period has expired."
3965 echo
3966 echo " You may continue to use your last licensed release"
3967 echo " of Qt under the terms of your existing license"
3968 echo " agreement. But you are not entitled to technical"
3969 echo " support, nor are you entitled to use any more recent"
3970 echo " Qt releases."
3971 echo
3972 echo " Please contact qt-info@nokia.com to renew your"
3973 echo " support and upgrades for this license."
3974 echo
3975 echo "WARNING WARNING WARNING WARNING"
3976 echo
3977 sleep 3
3980 Evaluation|*)
3981 echo
3982 echo "NOTICE NOTICE NOTICE NOTICE"
3983 echo
3984 echo " Your Evaluation license has expired."
3985 echo
3986 echo " You are no longer licensed to use this software. Please"
3987 echo " contact qt-info@nokia.com to purchase license, or install"
3988 echo " the Qt Open Source Edition if you intend to develop free"
3989 echo " software."
3990 echo
3991 echo "NOTICE NOTICE NOTICE NOTICE"
3992 echo
3993 exit 1
3995 esac
3998 TheLicense=`head -n 1 "$outpath/LICENSE"`
3999 while true; do
4000 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4001 echo "You have already accepted the terms of the $TheLicense."
4002 acceptance=yes
4003 else
4004 echo "You are licensed to use this software under the terms of"
4005 echo "the $TheLicense."
4006 echo
4007 echo "Type '?' to view the $TheLicense."
4008 echo "Type 'yes' to accept this license offer."
4009 echo "Type 'no' to decline this license offer."
4010 echo
4011 if echo '\c' | grep '\c' >/dev/null; then
4012 echo -n "Do you accept the terms of the $TheLicense? "
4013 else
4014 echo "Do you accept the terms of the $TheLicense? \c"
4016 read acceptance
4018 echo
4019 if [ "$acceptance" = "yes" ]; then
4020 break
4021 elif [ "$acceptance" = "no" ]; then
4022 echo "You are not licensed to use this software."
4023 echo
4024 exit 1
4025 else [ "$acceptance" = "?" ]
4026 more "$outpath/LICENSE"
4028 done
4031 # this should be moved somewhere else
4032 case "$PLATFORM" in
4033 aix-*)
4034 AIX_VERSION=`uname -v`
4035 if [ "$AIX_VERSION" -lt "5" ]; then
4036 QMakeVar add QMAKE_LIBS_X11 -lbind
4041 esac
4043 #-------------------------------------------------------------------------------
4044 # generate qconfig.cpp
4045 #-------------------------------------------------------------------------------
4046 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4048 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4049 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4050 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4051 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4052 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4053 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4054 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4055 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4056 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4057 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4058 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4059 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4060 DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4062 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4063 /* License Info */
4064 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4065 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4068 if [ ! -z "$QT_HOST_PREFIX" ]; then
4069 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4070 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4071 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4072 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4073 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4074 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4075 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4076 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4077 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4078 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4079 HOSTDEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4081 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4083 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4084 /* Installation Info */
4085 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4086 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4087 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4088 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4089 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4090 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4091 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4092 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4093 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4094 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4095 static const char qt_configure_demos_path_str [256 + 12] = "$HOSTDEMOS_PATH_STR";
4096 #else // QT_BOOTSTRAPPED
4100 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4101 /* Installation Info */
4102 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4103 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4104 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4105 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4106 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4107 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4108 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4109 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4110 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4111 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4112 static const char qt_configure_demos_path_str [256 + 12] = "$DEMOS_PATH_STR";
4115 if [ ! -z "$QT_HOST_PREFIX" ]; then
4116 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4117 #endif // QT_BOOTSTRAPPED
4122 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4123 /* strlen( "qt_lcnsxxxx" ) == 12 */
4124 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4125 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4126 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4127 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4128 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4129 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4130 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4131 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4132 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4133 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4134 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4135 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4136 #define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;
4139 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4140 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4141 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4142 else
4143 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4144 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4145 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4148 # -----------------------------------------------------------------------------
4149 # build qmake
4150 # -----------------------------------------------------------------------------
4152 # symlink includes
4153 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4154 SYNCQT_OPTS=
4155 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4156 if [ "$OPT_SHADOW" = "yes" ]; then
4157 "$outpath/bin/syncqt" $SYNCQT_OPTS
4158 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ]; then
4159 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS
4163 # $1: variable name
4164 # $2: optional transformation
4165 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4166 # is where the resulting variable is written to
4167 setBootstrapVariable()
4169 variableRegExp="^$1[^_A-Z0-9]"
4170 getQMakeConf | grep "$variableRegExp" | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4172 varLength = index($0, "=") - 1
4173 valStart = varLength + 2
4174 if (substr($0, varLength, 1) == "+") {
4175 varLength = varLength - 1
4176 valStart = valStart + 1
4178 var = substr($0, 0, varLength)
4179 gsub("[ \t]+", "", var)
4180 val = substr($0, valStart)
4181 printf "%s_%s = %s\n", var, NR, val
4183 END {
4184 if (length(var) > 0) {
4185 printf "%s =", var
4186 for (i = 1; i <= NR; ++i)
4187 printf " $(%s_%s)", var, i
4188 printf "\n"
4190 }' >> "$mkfile"
4193 # build qmake
4194 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4195 echo "Creating qmake. Please wait..."
4197 OLD_QCONFIG_H=
4198 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4199 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4200 if [ -f "$QCONFIG_H" ]; then
4201 OLD_QCONFIG_H=$QCONFIG_H
4202 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4205 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4206 # when building qmake, we use #defines for the install paths,
4207 # however they are real functions in the library
4208 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4209 mkdir -p "$outpath/src/corelib/global"
4210 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4211 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4214 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4215 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
4216 if [ '!' -f "$conf" ]; then
4217 ln -s "$QCONFIG_H" "$conf"
4219 done
4221 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4222 rm -f mkspecs/default
4223 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4224 # fix makefiles
4225 for mkfile in GNUmakefile Makefile; do
4226 EXTRA_LFLAGS=
4227 EXTRA_CFLAGS=
4228 in_mkfile="${mkfile}.in"
4229 if [ "$mkfile" = "Makefile" ]; then
4230 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4231 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4232 # fi
4233 in_mkfile="${mkfile}.unix"
4235 in_mkfile="$relpath/qmake/$in_mkfile"
4236 mkfile="$outpath/qmake/$mkfile"
4237 if [ -f "$mkfile" ]; then
4238 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4239 rm -f "$mkfile"
4241 [ -f "$in_mkfile" ] || continue
4243 echo "########################################################################" > "$mkfile"
4244 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4245 echo "########################################################################" >> "$mkfile"
4246 EXTRA_OBJS=
4247 EXTRA_SRCS=
4248 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4249 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4250 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4252 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4253 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4256 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4257 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4258 if [ "$CFG_SILENT" = "yes" ]; then
4259 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4260 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4261 else
4262 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4263 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4265 setBootstrapVariable QMAKE_CFLAGS
4266 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4267 setBootstrapVariable QMAKE_LFLAGS
4269 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4270 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4271 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4273 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4274 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4275 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4276 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4277 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4278 elif [ "$CFG_DEBUG" = "yes" ]; then
4279 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4280 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4281 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4282 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4285 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
4286 setBootstrapVariable QMAKE_RPATH 's,\$\$LITERAL_WHITESPACE, ,'
4287 for rpath in $RPATH_FLAGS; do
4288 EXTRA_LFLAGS="\$(QMAKE_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4289 done
4291 if [ "$PLATFORM_MAC" = "yes" ]; then
4292 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4293 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4294 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4295 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4296 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4297 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4298 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4299 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4300 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4301 X86_CFLAGS="-arch i386"
4302 X86_LFLAGS="-arch i386"
4303 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4304 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4305 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4307 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4308 PPC_CFLAGS="-arch ppc"
4309 PPC_LFLAGS="-arch ppc"
4310 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4311 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4312 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4314 if [ '!' -z "$CFG_SDK" ]; then
4315 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4316 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4317 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4318 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4319 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4322 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4323 if [ '!' -z "$D_FLAGS" ]; then
4324 for DEF in $D_FLAGS; do
4325 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4326 done
4328 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4329 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4330 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4331 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4332 echo >>"$mkfile"
4333 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4334 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4335 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4336 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4337 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4338 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4339 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4340 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4341 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4342 -e "s,@QMAKESPEC@,$adjqmakespec,g" "$in_mkfile" >>"$mkfile"
4344 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4345 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4346 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4347 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4348 rm "$mkfile.tmp"
4350 done
4352 QMAKE_BUILD_ERROR=no
4353 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4354 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4355 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4356 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4357 fi # Build qmake
4359 #-------------------------------------------------------------------------------
4360 # tests that need qmake
4361 #-------------------------------------------------------------------------------
4363 # detect availability of float math.h functions
4364 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4365 CFG_USE_FLOATMATH=yes
4366 else
4367 CFG_USE_FLOATMATH=no
4370 # detect mmx support
4371 if [ "${CFG_MMX}" = "auto" ]; then
4372 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4373 CFG_MMX=yes
4374 else
4375 CFG_MMX=no
4379 # detect 3dnow support
4380 if [ "${CFG_3DNOW}" = "auto" ]; then
4381 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4382 CFG_3DNOW=yes
4383 else
4384 CFG_3DNOW=no
4388 # detect sse support
4389 if [ "${CFG_SSE}" = "auto" ]; then
4390 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4391 CFG_SSE=yes
4392 else
4393 CFG_SSE=no
4397 # detect sse2 support
4398 if [ "${CFG_SSE2}" = "auto" ]; then
4399 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4400 CFG_SSE2=yes
4401 else
4402 CFG_SSE2=no
4406 # check iWMMXt support
4407 if [ "$CFG_IWMMXT" = "yes" ]; then
4408 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4409 if [ $? != "0" ]; then
4410 echo "The iWMMXt functionality test failed!"
4411 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4412 exit 1
4416 # detect zlib
4417 if [ "$CFG_ZLIB" = "no" ]; then
4418 # Note: Qt no longer support builds without zlib
4419 # So we force a "no" to be "auto" here.
4420 # If you REALLY really need no zlib support, you can still disable
4421 # it by doing the following:
4422 # add "no-zlib" to mkspecs/qconfig.pri
4423 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4425 # There's no guarantee that Qt will build under those conditions
4427 CFG_ZLIB=auto
4428 ZLIB_FORCED=yes
4430 if [ "$CFG_ZLIB" = "auto" ]; then
4431 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
4432 CFG_ZLIB=system
4433 else
4434 CFG_ZLIB=yes
4438 # detect how jpeg should be built
4439 if [ "$CFG_JPEG" = "auto" ]; then
4440 if [ "$CFG_SHARED" = "yes" ]; then
4441 CFG_JPEG=plugin
4442 else
4443 CFG_JPEG=yes
4446 # detect jpeg
4447 if [ "$CFG_LIBJPEG" = "auto" ]; then
4448 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
4449 CFG_LIBJPEG=system
4450 else
4451 CFG_LIBJPEG=qt
4455 # detect how gif should be built
4456 if [ "$CFG_GIF" = "auto" ]; then
4457 if [ "$CFG_SHARED" = "yes" ]; then
4458 CFG_GIF=plugin
4459 else
4460 CFG_GIF=yes
4464 # detect how tiff should be built
4465 if [ "$CFG_TIFF" = "auto" ]; then
4466 if [ "$CFG_SHARED" = "yes" ]; then
4467 CFG_TIFF=plugin
4468 else
4469 CFG_TIFF=yes
4473 # detect tiff
4474 if [ "$CFG_LIBTIFF" = "auto" ]; then
4475 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
4476 CFG_LIBTIFF=system
4477 else
4478 CFG_LIBTIFF=qt
4482 # detect how mng should be built
4483 if [ "$CFG_MNG" = "auto" ]; then
4484 if [ "$CFG_SHARED" = "yes" ]; then
4485 CFG_MNG=plugin
4486 else
4487 CFG_MNG=yes
4490 # detect mng
4491 if [ "$CFG_LIBMNG" = "auto" ]; then
4492 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
4493 CFG_LIBMNG=system
4494 else
4495 CFG_LIBMNG=qt
4499 # detect png
4500 if [ "$CFG_LIBPNG" = "auto" ]; then
4501 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
4502 CFG_LIBPNG=system
4503 else
4504 CFG_LIBPNG=qt
4508 # detect accessibility
4509 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4510 CFG_ACCESSIBILITY=yes
4513 # auto-detect SQL-modules support
4514 for _SQLDR in $CFG_SQL_AVAILABLE; do
4515 case $_SQLDR in
4516 mysql)
4517 if [ "$CFG_SQL_mysql" != "no" ]; then
4518 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4519 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4520 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4521 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4522 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4523 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4524 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4526 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4527 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4528 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4529 echo " You need MySql 4 or higher."
4530 echo " If you believe this message is in error you may use the continue"
4531 echo " switch (-continue) to $0 to continue."
4532 exit 101
4533 else
4534 CFG_SQL_mysql="no"
4535 QT_LFLAGS_MYSQL=""
4536 QT_LFLAGS_MYSQL_R=""
4537 QT_CFLAGS_MYSQL=""
4539 else
4540 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
4541 QMakeVar add CONFIG use_libmysqlclient_r
4542 if [ "$CFG_SQL_mysql" = "auto" ]; then
4543 CFG_SQL_mysql=plugin
4545 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4546 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
4547 if [ "$CFG_SQL_mysql" = "auto" ]; then
4548 CFG_SQL_mysql=plugin
4550 else
4551 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4552 echo "MySQL support cannot be enabled due to functionality tests!"
4553 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4554 echo " If you believe this message is in error you may use the continue"
4555 echo " switch (-continue) to $0 to continue."
4556 exit 101
4557 else
4558 CFG_SQL_mysql=no
4559 QT_LFLAGS_MYSQL=""
4560 QT_LFLAGS_MYSQL_R=""
4561 QT_CFLAGS_MYSQL=""
4567 psql)
4568 if [ "$CFG_SQL_psql" != "no" ]; then
4569 if "$WHICH" pg_config >/dev/null 2>&1; then
4570 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4571 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4573 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4574 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4575 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
4576 if [ "$CFG_SQL_psql" = "auto" ]; then
4577 CFG_SQL_psql=plugin
4579 else
4580 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4581 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4582 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4583 echo " If you believe this message is in error you may use the continue"
4584 echo " switch (-continue) to $0 to continue."
4585 exit 101
4586 else
4587 CFG_SQL_psql=no
4588 QT_CFLAGS_PSQL=""
4589 QT_LFLAGS_PSQL=""
4594 odbc)
4595 if [ "$CFG_SQL_odbc" != "no" ]; then
4596 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
4597 if [ "$CFG_SQL_odbc" = "auto" ]; then
4598 CFG_SQL_odbc=plugin
4600 else
4601 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
4602 QT_LFLAGS_ODBC="-liodbc"
4603 if [ "$CFG_SQL_odbc" = "auto" ]; then
4604 CFG_SQL_odbc=plugin
4606 else
4607 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4608 echo "ODBC support cannot be enabled due to functionality tests!"
4609 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4610 echo " If you believe this message is in error you may use the continue"
4611 echo " switch (-continue) to $0 to continue."
4612 exit 101
4613 else
4614 CFG_SQL_odbc=no
4620 oci)
4621 if [ "$CFG_SQL_oci" != "no" ]; then
4622 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
4623 if [ "$CFG_SQL_oci" = "auto" ]; then
4624 CFG_SQL_oci=plugin
4626 else
4627 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4628 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4629 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4630 echo " If you believe this message is in error you may use the continue"
4631 echo " switch (-continue) to $0 to continue."
4632 exit 101
4633 else
4634 CFG_SQL_oci=no
4639 tds)
4640 if [ "$CFG_SQL_tds" != "no" ]; then
4641 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
4642 if [ "$CFG_SQL_tds" = "auto" ]; then
4643 CFG_SQL_tds=plugin
4645 else
4646 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4647 echo "TDS support cannot be enabled due to functionality tests!"
4648 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4649 echo " If you believe this message is in error you may use the continue"
4650 echo " switch (-continue) to $0 to continue."
4651 exit 101
4652 else
4653 CFG_SQL_tds=no
4658 db2)
4659 if [ "$CFG_SQL_db2" != "no" ]; then
4660 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
4661 if [ "$CFG_SQL_db2" = "auto" ]; then
4662 CFG_SQL_db2=plugin
4664 else
4665 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4666 echo "ODBC support cannot be enabled due to functionality tests!"
4667 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4668 echo " If you believe this message is in error you may use the continue"
4669 echo " switch (-continue) to $0 to continue."
4670 exit 101
4671 else
4672 CFG_SQL_db2=no
4677 ibase)
4678 if [ "$CFG_SQL_ibase" != "no" ]; then
4679 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
4680 if [ "$CFG_SQL_ibase" = "auto" ]; then
4681 CFG_SQL_ibase=plugin
4683 else
4684 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4685 echo "InterBase support cannot be enabled due to functionality tests!"
4686 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4687 echo " If you believe this message is in error you may use the continue"
4688 echo " switch (-continue) to $0 to continue."
4689 exit 101
4690 else
4691 CFG_SQL_ibase=no
4696 sqlite2)
4697 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4698 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
4699 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4700 CFG_SQL_sqlite2=plugin
4702 else
4703 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4704 echo "SQLite2 support cannot be enabled due to functionality tests!"
4705 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4706 echo " If you believe this message is in error you may use the continue"
4707 echo " switch (-continue) to $0 to continue."
4708 exit 101
4709 else
4710 CFG_SQL_sqlite2=no
4715 sqlite)
4716 if [ "$CFG_SQL_sqlite" != "no" ]; then
4717 SQLITE_AUTODETECT_FAILED="no"
4718 if [ "$CFG_SQLITE" = "system" ]; then
4719 if [ -n "$PKG_CONFIG" ]; then
4720 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4721 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4723 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
4724 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4725 CFG_SQL_sqlite=plugin
4727 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4728 else
4729 SQLITE_AUTODETECT_FAILED="yes"
4730 CFG_SQL_sqlite=no
4732 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4733 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4734 CFG_SQL_sqlite=plugin
4736 else
4737 SQLITE_AUTODETECT_FAILED="yes"
4738 CFG_SQL_sqlite=no
4741 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4742 echo "SQLite support cannot be enabled due to functionality tests!"
4743 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4744 echo " If you believe this message is in error you may use the continue"
4745 echo " switch (-continue) to $0 to continue."
4746 exit 101
4751 if [ "$OPT_VERBOSE" = "yes" ]; then
4752 echo "unknown SQL driver: $_SQLDR"
4755 esac
4756 done
4758 # auto-detect NIS support
4759 if [ "$CFG_NIS" != "no" ]; then
4760 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
4761 CFG_NIS=yes
4762 else
4763 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4764 echo "NIS support cannot be enabled due to functionality tests!"
4765 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4766 echo " If you believe this message is in error you may use the continue"
4767 echo " switch (-continue) to $0 to continue."
4768 exit 101
4769 else
4770 CFG_NIS=no
4775 # auto-detect CUPS support
4776 if [ "$CFG_CUPS" != "no" ]; then
4777 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
4778 CFG_CUPS=yes
4779 else
4780 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4781 echo "Cups support cannot be enabled due to functionality tests!"
4782 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4783 echo " If you believe this message is in error you may use the continue"
4784 echo " switch (-continue) to $0 to continue."
4785 exit 101
4786 else
4787 CFG_CUPS=no
4792 # auto-detect iconv(3) support
4793 if [ "$CFG_ICONV" != "no" ]; then
4794 if [ "$PLATFORM_QWS" = "yes" ]; then
4795 CFG_ICONV=no
4796 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
4797 CFG_ICONV=yes
4798 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
4799 CFG_ICONV=gnu
4800 else
4801 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4802 echo "Iconv support cannot be enabled due to functionality tests!"
4803 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4804 echo " If you believe this message is in error you may use the continue"
4805 echo " switch (-continue) to $0 to continue."
4806 exit 101
4807 else
4808 CFG_ICONV=no
4813 # auto-detect libdbus-1 support
4814 if [ "$CFG_DBUS" != "no" ]; then
4815 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4816 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4817 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4819 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
4820 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4821 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4822 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4823 else
4824 if [ "$CFG_DBUS" = "auto" ]; then
4825 CFG_DBUS=no
4826 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4827 # CFG_DBUS is "yes" or "linked" here
4829 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4830 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4831 echo " If you believe this message is in error you may use the continue"
4832 echo " switch (-continue) to $0 to continue."
4833 exit 101
4838 # Generate a CRC of the namespace for using in constants for the Carbon port.
4839 # This should mean that you really *can* load two Qt's and have our custom
4840 # Carbon events work.
4841 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
4842 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`
4845 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
4847 # detect EGL support
4848 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
4849 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
4850 CFG_EGL=yes
4851 CFG_EGL_GLES_INCLUDES=no
4852 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
4853 # EGL specified by QMAKE_*_EGL, included with <GLES/egl.h>
4854 CFG_EGL=yes
4855 CFG_EGL_GLES_INCLUDES=yes
4857 if ( [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es1cl" ] || [ "$CFG_OPENGL" = "es2" ] ) && [ "$CFG_EGL" != "yes" ]; then
4858 echo "The EGL functionality test failed!"
4859 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
4860 echo " You might need to modify the include and library search paths by editing"
4861 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
4862 echo " ${XQMAKESPEC}."
4863 exit 1
4867 # auto-detect Glib support
4868 if [ "$CFG_GLIB" != "no" ]; then
4869 if [ -n "$PKG_CONFIG" ]; then
4870 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4871 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4873 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
4874 CFG_GLIB=yes
4875 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4876 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4877 else
4878 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4879 echo "Glib support cannot be enabled due to functionality tests!"
4880 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4881 echo " If you believe this message is in error you may use the continue"
4882 echo " switch (-continue) to $0 to continue."
4883 exit 101
4884 else
4885 CFG_GLIB=no
4890 if [ "$CFG_PHONON" != "no" ]; then
4891 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
4892 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4893 if [ -n "$PKG_CONFIG" ]; then
4894 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4895 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4897 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
4898 CFG_GSTREAMER=yes
4899 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4900 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4901 else
4902 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4903 echo "Gstreamer support cannot be enabled due to functionality tests!"
4904 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4905 echo " If you believe this message is in error you may use the continue"
4906 echo " switch (-continue) to $0 to continue."
4907 exit 101
4908 else
4909 CFG_GSTREAMER=no
4912 elif [ "$CFG_GLIB" = "no" ]; then
4913 CFG_GSTREAMER=no
4916 if [ "$CFG_GSTREAMER" = "yes" ]; then
4917 CFG_PHONON=yes
4918 else
4919 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4920 echo "Phonon 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_PHONON=no
4929 else
4930 CFG_PHONON=yes
4933 fi # X11/QWS
4935 # x11
4936 if [ "$PLATFORM_X11" = "yes" ]; then
4937 x11tests="$relpath/config.tests/x11"
4938 X11TESTS_FLAGS=
4940 # work around broken X11 headers when using GCC 2.95 or later
4941 NOTYPE=no
4942 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4943 if [ $NOTYPE = "yes" ]; then
4944 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4945 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4948 # Check we actually have X11 :-)
4949 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4950 if [ $? != "0" ]; then
4951 echo "Basic XLib functionality test failed!"
4952 echo " You might need to modify the include and library search paths by editing"
4953 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4954 exit 1
4957 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
4958 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4959 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
4960 CFG_OPENGL=desktop
4961 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
4962 CFG_OPENGL=es2
4963 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
4964 CFG_OPENGL=es1
4965 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
4966 CFG_OPENGL=es1cl
4967 else
4968 if [ "$CFG_OPENGL" = "yes" ]; then
4969 echo "All the OpenGL functionality tests failed!"
4970 echo " You might need to modify the include and library search paths by editing"
4971 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4972 echo " ${XQMAKESPEC}."
4973 exit 1
4975 CFG_OPENGL=no
4977 case "$PLATFORM" in
4978 hpux*)
4979 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4980 if [ "$CFG_OPENGL" = "desktop" ]; then
4981 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4982 if [ $? != "0" ]; then
4983 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4989 esac
4990 elif [ "$CFG_OPENGL" = "es1cl" ]; then
4991 # OpenGL ES 1.x common lite
4992 "$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
4993 if [ $? != "0" ]; then
4994 echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
4995 echo " You might need to modify the include and library search paths by editing"
4996 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4997 echo " ${XQMAKESPEC}."
4998 exit 1
5000 elif [ "$CFG_OPENGL" = "es1" ]; then
5001 # OpenGL ES 1.x
5002 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5003 if [ $? != "0" ]; then
5004 echo "The OpenGL ES 1.x functionality test failed!"
5005 echo " You might need to modify the include and library search paths by editing"
5006 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5007 echo " ${XQMAKESPEC}."
5008 exit 1
5010 elif [ "$CFG_OPENGL" = "es2" ]; then
5011 #OpenGL ES 2.x
5012 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5013 if [ $? != "0" ]; then
5014 echo "The OpenGL ES 2.0 functionality test failed!"
5015 echo " You might need to modify the include and library search paths by editing"
5016 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5017 echo " ${XQMAKESPEC}."
5018 exit 1
5020 elif [ "$CFG_OPENGL" = "desktop" ]; then
5021 # Desktop OpenGL support
5022 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5023 if [ $? != "0" ]; then
5024 echo "The OpenGL functionality test failed!"
5025 echo " You might need to modify the include and library search paths by editing"
5026 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5027 echo " ${XQMAKESPEC}."
5028 exit 1
5030 case "$PLATFORM" in
5031 hpux*)
5032 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5033 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5034 if [ $? != "0" ]; then
5035 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5040 esac
5043 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5044 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5045 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5046 CFG_GRAPHICS_SYSTEM=default
5049 # auto-detect Xcursor support
5050 if [ "$CFG_XCURSOR" != "no" ]; then
5051 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
5052 if [ "$CFG_XCURSOR" != "runtime" ]; then
5053 CFG_XCURSOR=yes;
5055 else
5056 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5057 echo "Xcursor support cannot be enabled due to functionality tests!"
5058 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5059 echo " If you believe this message is in error you may use the continue"
5060 echo " switch (-continue) to $0 to continue."
5061 exit 101
5062 else
5063 CFG_XCURSOR=no
5068 # auto-detect Xfixes support
5069 if [ "$CFG_XFIXES" != "no" ]; then
5070 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5071 if [ "$CFG_XFIXES" != "runtime" ]; then
5072 CFG_XFIXES=yes;
5074 else
5075 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5076 echo "Xfixes support cannot be enabled due to functionality tests!"
5077 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5078 echo " If you believe this message is in error you may use the continue"
5079 echo " switch (-continue) to $0 to continue."
5080 exit 101
5081 else
5082 CFG_XFIXES=no
5087 # auto-detect Xrandr support (resize and rotate extension)
5088 if [ "$CFG_XRANDR" != "no" ]; then
5089 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
5090 if [ "$CFG_XRANDR" != "runtime" ]; then
5091 CFG_XRANDR=yes
5093 else
5094 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5095 echo "Xrandr support cannot be enabled due to functionality tests!"
5096 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5097 echo " If you believe this message is in error you may use the continue"
5098 echo " switch (-continue) to $0 to continue."
5099 exit 101
5100 else
5101 CFG_XRANDR=no
5106 # auto-detect Xrender support
5107 if [ "$CFG_XRENDER" != "no" ]; then
5108 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
5109 CFG_XRENDER=yes
5110 else
5111 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5112 echo "Xrender support cannot be enabled due to functionality tests!"
5113 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5114 echo " If you believe this message is in error you may use the continue"
5115 echo " switch (-continue) to $0 to continue."
5116 exit 101
5117 else
5118 CFG_XRENDER=no
5123 # auto-detect MIT-SHM support
5124 if [ "$CFG_MITSHM" != "no" ]; then
5125 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
5126 CFG_MITSHM=yes
5127 else
5128 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5129 echo "MITSHM support cannot be enabled due to functionality tests!"
5130 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5131 echo " If you believe this message is in error you may use the continue"
5132 echo " switch (-continue) to $0 to continue."
5133 exit 101
5134 else
5135 CFG_MITSHM=no
5140 # auto-detect FontConfig support
5141 if [ "$CFG_FONTCONFIG" != "no" ]; then
5142 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5143 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5144 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5145 else
5146 QT_CFLAGS_FONTCONFIG=
5147 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5149 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
5150 CFG_FONTCONFIG=yes
5151 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5152 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5153 CFG_LIBFREETYPE=system
5154 else
5155 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5156 echo "FontConfig support cannot be enabled due to functionality tests!"
5157 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5158 echo " If you believe this message is in error you may use the continue"
5159 echo " switch (-continue) to $0 to continue."
5160 exit 101
5161 else
5162 CFG_FONTCONFIG=no
5167 # auto-detect Session Management support
5168 if [ "$CFG_SM" = "auto" ]; then
5169 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
5170 CFG_SM=yes
5171 else
5172 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5173 echo "Session Management support cannot be enabled due to functionality tests!"
5174 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5175 echo " If you believe this message is in error you may use the continue"
5176 echo " switch (-continue) to $0 to continue."
5177 exit 101
5178 else
5179 CFG_SM=no
5184 # auto-detect SHAPE support
5185 if [ "$CFG_XSHAPE" != "no" ]; then
5186 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
5187 CFG_XSHAPE=yes
5188 else
5189 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5190 echo "XShape support cannot be enabled due to functionality tests!"
5191 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5192 echo " If you believe this message is in error you may use the continue"
5193 echo " switch (-continue) to $0 to continue."
5194 exit 101
5195 else
5196 CFG_XSHAPE=no
5201 # auto-detect XSync support
5202 if [ "$CFG_XSYNC" != "no" ]; then
5203 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
5204 CFG_XSYNC=yes
5205 else
5206 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5207 echo "XSync support cannot be enabled due to functionality tests!"
5208 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5209 echo " If you believe this message is in error you may use the continue"
5210 echo " switch (-continue) to $0 to continue."
5211 exit 101
5212 else
5213 CFG_XSYNC=no
5218 # auto-detect Xinerama support
5219 if [ "$CFG_XINERAMA" != "no" ]; then
5220 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
5221 if [ "$CFG_XINERAMA" != "runtime" ]; then
5222 CFG_XINERAMA=yes
5224 else
5225 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5226 echo "Xinerama support cannot be enabled due to functionality tests!"
5227 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5228 echo " If you believe this message is in error you may use the continue"
5229 echo " switch (-continue) to $0 to continue."
5230 exit 101
5231 else
5232 CFG_XINERAMA=no
5237 # auto-detect Xinput support
5238 if [ "$CFG_XINPUT" != "no" ]; then
5239 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
5240 if [ "$CFG_XINPUT" != "runtime" ]; then
5241 CFG_XINPUT=yes
5243 else
5244 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5245 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5246 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5247 echo " If you believe this message is in error you may use the continue"
5248 echo " switch (-continue) to $0 to continue."
5249 exit 101
5250 else
5251 CFG_XINPUT=no
5256 # auto-detect XKB support
5257 if [ "$CFG_XKB" != "no" ]; then
5258 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
5259 CFG_XKB=yes
5260 else
5261 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5262 echo "XKB support cannot be enabled due to functionality tests!"
5263 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5264 echo " If you believe this message is in error you may use the continue"
5265 echo " switch (-continue) to $0 to continue."
5266 exit 101
5267 else
5268 CFG_XKB=no
5273 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5274 if [ -n "$PKG_CONFIG" ]; then
5275 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5276 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5278 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5279 CFG_QGTKSTYLE=yes
5280 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5281 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5282 else
5283 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5284 echo "Gtk theme support cannot be enabled due to functionality tests!"
5285 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5286 echo " If you believe this message is in error you may use the continue"
5287 echo " switch (-continue) to $0 to continue."
5288 exit 101
5289 else
5290 CFG_QGTKSTYLE=no
5293 elif [ "$CFG_GLIB" = "no" ]; then
5294 CFG_QGTKSTYLE=no
5296 fi # X11
5299 if [ "$PLATFORM_MAC" = "yes" ]; then
5300 if [ "$CFG_PHONON" != "no" ]; then
5301 # Always enable Phonon (unless it was explicitly disabled)
5302 CFG_PHONON=yes
5306 # QWS
5307 if [ "$PLATFORM_QWS" = "yes" ]; then
5309 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5310 if [ "$CFG_OPENGL" = "yes" ]; then
5311 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
5312 CFG_OPENGL=es2
5313 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
5314 CFG_OPENGL=es1
5315 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
5316 CFG_OPENGL=es1cl
5317 else
5318 echo "All the OpenGL ES functionality tests failed!"
5319 echo " You might need to modify the include and library search paths by editing"
5320 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5321 echo " ${XQMAKESPEC}."
5322 exit 1
5324 elif [ "$CFG_OPENGL" = "es1" ]; then
5325 # OpenGL ES 1.x
5326 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5327 if [ $? != "0" ]; then
5328 echo "The OpenGL ES 1.x functionality test failed!"
5329 echo " You might need to modify the include and library search paths by editing"
5330 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5331 echo " ${XQMAKESPEC}."
5332 exit 1
5334 elif [ "$CFG_OPENGL" = "es2" ]; then
5335 #OpenGL ES 2.x
5336 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5337 if [ $? != "0" ]; then
5338 echo "The OpenGL ES 2.0 functionality test failed!"
5339 echo " You might need to modify the include and library search paths by editing"
5340 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5341 echo " ${XQMAKESPEC}."
5342 exit 1
5344 elif [ "$CFG_OPENGL" = "desktop" ]; then
5345 # Desktop OpenGL support
5346 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5347 exit 1
5350 # screen drivers
5351 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5352 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5353 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
5354 if [ $? != "0" ]; then
5355 echo "The Ahi screen driver functionality test failed!"
5356 echo " You might need to modify the include and library search paths by editing"
5357 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5358 echo " ${XQMAKESPEC}."
5359 exit 1
5363 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5364 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
5365 if [ $? != "0" ]; then
5366 echo "The SVGAlib screen driver functionality test failed!"
5367 echo " You might need to modify the include and library search paths by editing"
5368 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5369 echo " ${XQMAKESPEC}."
5370 exit 1
5374 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5375 if [ -n "$PKG_CONFIG" ]; then
5376 if $PKG_CONFIG --exists directfb 2>/dev/null; then
5377 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5378 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
5379 elif directfb-config --version >/dev/null 2>&1; then
5380 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
5381 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
5385 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5386 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
5387 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
5388 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
5390 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5391 QMakeVar set QT_DEFINES_DIRECTFB "QT3_SUPPORT"
5394 "$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
5395 if [ $? != "0" ]; then
5396 echo "The DirectFB screen driver functionality test failed!"
5397 echo " You might need to modify the include and library search paths by editing"
5398 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5399 echo " ${XQMAKESPEC}."
5400 exit 1
5404 done
5406 # mouse drivers
5407 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5408 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5409 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
5410 if [ $? != "0" ]; then
5411 echo "The tslib functionality test failed!"
5412 echo " You might need to modify the include and library search paths by editing"
5413 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5414 echo " ${XQMAKESPEC}."
5415 exit 1
5418 done
5420 CFG_QGTKSTYLE=no
5422 # sound
5423 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
5424 if [ $? != "0" ]; then
5425 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
5428 fi # QWS
5430 # freetype support
5431 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
5432 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
5433 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5434 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
5435 CFG_LIBFREETYPE=system
5436 else
5437 CFG_LIBFREETYPE=yes
5441 if [ "$CFG_ENDIAN" = "auto" ]; then
5442 if [ "$PLATFORM_MAC" = "yes" ]; then
5443 true #leave as auto
5444 else
5445 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5446 F="$?"
5447 if [ "$F" -eq 0 ]; then
5448 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5449 elif [ "$F" -eq 1 ]; then
5450 CFG_ENDIAN="Q_BIG_ENDIAN"
5451 else
5452 echo
5453 echo "The target system byte order could not be detected!"
5454 echo "Turn on verbose messaging (-v) to see the final report."
5455 echo "You can use the -little-endian or -big-endian switch to"
5456 echo "$0 to continue."
5457 exit 101
5462 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5463 if [ "$PLATFORM_MAC" = "yes" ]; then
5464 true #leave as auto
5465 else
5466 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5467 F="$?"
5468 if [ "$F" -eq 0 ]; then
5469 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
5470 elif [ "$F" -eq 1 ]; then
5471 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
5472 else
5473 echo
5474 echo "The host system byte order could not be detected!"
5475 echo "Turn on verbose messaging (-v) to see the final report."
5476 echo "You can use the -host-little-endian or -host-big-endian switch to"
5477 echo "$0 to continue."
5478 exit 101
5483 if [ "$CFG_ARMFPA" != "auto" ]; then
5484 if [ "$CFG_ARMFPA" = "yes" ]; then
5485 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5486 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5487 else
5488 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
5490 else
5491 CFG_DOUBLEFORMAT="normal"
5496 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5497 if [ "$PLATFORM_QWS" != "yes" ]; then
5498 CFG_DOUBLEFORMAT=normal
5499 else
5500 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5501 F="$?"
5502 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5503 CFG_DOUBLEFORMAT=normal
5504 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
5505 CFG_DOUBLEFORMAT=normal
5506 elif [ "$F" -eq 10 ]; then
5507 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
5508 elif [ "$F" -eq 11 ]; then
5509 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
5510 elif [ "$F" -eq 12 ]; then
5511 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5512 CFG_ARMFPA="yes"
5513 elif [ "$F" -eq 13 ]; then
5514 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
5515 CFG_ARMFPA="yes"
5516 else
5517 echo
5518 echo "The system floating point format could not be detected."
5519 echo "This may cause data to be generated in a wrong format"
5520 echo "Turn on verbose messaging (-v) to see the final report."
5521 # we do not fail on this since this is a new test, and if it fails,
5522 # the old behavior should be correct in most cases
5523 CFG_DOUBLEFORMAT=normal
5528 HAVE_STL=no
5529 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5530 HAVE_STL=yes
5533 if [ "$CFG_STL" != "no" ]; then
5534 if [ "$HAVE_STL" = "yes" ]; then
5535 CFG_STL=yes
5536 else
5537 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5538 echo "STL support cannot be enabled due to functionality tests!"
5539 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5540 echo " If you believe this message is in error you may use the continue"
5541 echo " switch (-continue) to $0 to continue."
5542 exit 101
5543 else
5544 CFG_STL=no
5549 # find if the platform supports IPv6
5550 if [ "$CFG_IPV6" != "no" ]; then
5551 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
5552 CFG_IPV6=yes
5553 else
5554 if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5555 echo "IPv6 support cannot be enabled due to functionality tests!"
5556 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5557 echo " If you believe this message is in error you may use the continue"
5558 echo " switch (-continue) to $0 to continue."
5559 exit 101
5560 else
5561 CFG_IPV6=no
5566 # detect POSIX clock_gettime()
5567 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5568 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
5569 CFG_CLOCK_GETTIME=yes
5570 else
5571 CFG_CLOCK_GETTIME=no
5575 # detect POSIX monotonic clocks
5576 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5577 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
5578 CFG_CLOCK_MONOTONIC=yes
5579 else
5580 CFG_CLOCK_MONOTONIC=no
5582 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5583 CFG_CLOCK_MONOTONIC=no
5586 # detect mremap
5587 if [ "$CFG_MREMAP" = "auto" ]; then
5588 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5589 CFG_MREMAP=yes
5590 else
5591 CFG_MREMAP=no
5595 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5596 if [ "$CFG_GETADDRINFO" != "no" ]; then
5597 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5598 CFG_GETADDRINFO=yes
5599 else
5600 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5601 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5602 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5603 echo " If you believe this message is in error you may use the continue"
5604 echo " switch (-continue) to $0 to continue."
5605 exit 101
5606 else
5607 CFG_GETADDRINFO=no
5612 # find if the platform provides inotify
5613 if [ "$CFG_INOTIFY" != "no" ]; then
5614 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5615 CFG_INOTIFY=yes
5616 else
5617 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5618 echo "inotify support cannot be enabled due to functionality tests!"
5619 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5620 echo " If you believe this message is in error you may use the continue"
5621 echo " switch (-continue) to $0 to continue."
5622 exit 101
5623 else
5624 CFG_INOTIFY=no
5629 # find if the platform provides if_nametoindex (ipv6 interface name support)
5630 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5631 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
5632 CFG_IPV6IFNAME=yes
5633 else
5634 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5635 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5636 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5637 echo " If you believe this message is in error you may use the continue"
5638 echo " switch (-continue) to $0 to continue."
5639 exit 101
5640 else
5641 CFG_IPV6IFNAME=no
5646 # find if the platform provides getifaddrs (network interface enumeration)
5647 if [ "$CFG_GETIFADDRS" != "no" ]; then
5648 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5649 CFG_GETIFADDRS=yes
5650 else
5651 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5652 echo "getifaddrs support cannot be enabled due to functionality tests!"
5653 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5654 echo " If you believe this message is in error you may use the continue"
5655 echo " switch (-continue) to $0 to continue."
5656 exit 101
5657 else
5658 CFG_GETIFADDRS=no
5663 # find if the platform supports X/Open Large File compilation environment
5664 if [ "$CFG_LARGEFILE" != "no" ]; then
5665 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
5666 CFG_LARGEFILE=yes
5667 else
5668 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5669 echo "X/Open Large File support cannot be enabled due to functionality tests!"
5670 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5671 echo " If you believe this message is in error you may use the continue"
5672 echo " switch (-continue) to $0 to continue."
5673 exit 101
5674 else
5675 CFG_LARGEFILE=no
5680 # detect OpenSSL
5681 if [ "$CFG_OPENSSL" != "no" ]; then
5682 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
5683 if [ "$CFG_OPENSSL" = "auto" ]; then
5684 CFG_OPENSSL=yes
5686 else
5687 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5688 echo "OpenSSL support cannot be enabled due to functionality tests!"
5689 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5690 echo " If you believe this message is in error you may use the continue"
5691 echo " switch (-continue) to $0 to continue."
5692 exit 101
5693 else
5694 CFG_OPENSSL=no
5699 # detect OpenVG support
5700 if [ "$CFG_OPENVG" != "no" ]; then
5701 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
5702 if [ "$CFG_OPENVG" = "auto" ]; then
5703 CFG_OPENVG=yes
5705 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
5706 if [ "$CFG_OPENVG" = "auto" ]; then
5707 CFG_OPENVG=yes
5709 CFG_OPENVG_ON_OPENGL=yes
5710 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
5711 if [ "$CFG_OPENVG" = "auto" ]; then
5712 CFG_OPENVG=yes
5714 CFG_OPENVG_LC_INCLUDES=yes
5715 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
5716 if [ "$CFG_OPENVG" = "auto" ]; then
5717 CFG_OPENVG=yes
5719 CFG_OPENVG_LC_INCLUDES=yes
5720 CFG_OPENVG_ON_OPENGL=yes
5721 else
5722 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5723 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5724 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5725 echo " If you believe this message is in error you may use the continue"
5726 echo " switch (-continue) to $0 to continue."
5727 exit 101
5728 else
5729 CFG_OPENVG=no
5732 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
5733 CFG_OPENVG_SHIVA=yes
5737 # if openvg is disabled and the user specified graphicssystem vg, disable it...
5738 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
5739 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
5740 CFG_GRAPHICS_SYSTEM=default
5743 if [ "$CFG_PTMALLOC" != "no" ]; then
5744 # build ptmalloc, copy .a file to lib/
5745 echo "Building ptmalloc. Please wait..."
5746 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
5747 mkdir "$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
5749 QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
5752 if [ "$CFG_ALSA" = "auto" ]; then
5753 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5754 CFG_ALSA=yes
5755 else
5756 CFG_ALSA=no
5760 #-------------------------------------------------------------------------------
5761 # ask for all that hasn't been auto-detected or specified in the arguments
5762 #-------------------------------------------------------------------------------
5764 ### fix this: user input should be validated in a loop
5765 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PLATFORM_QWS" = "yes" ]; then
5766 echo
5767 echo "Choose pixel-depths to support:"
5768 echo
5769 echo " 1. 1bpp, black/white"
5770 echo " 4. 4bpp, grayscale"
5771 echo " 8. 8bpp, paletted"
5772 echo " 12. 12bpp, rgb 4-4-4"
5773 echo " 15. 15bpp, rgb 5-5-5"
5774 echo " 16. 16bpp, rgb 5-6-5"
5775 echo " 18. 18bpp, rgb 6-6-6"
5776 echo " 24. 24bpp, rgb 8-8-8"
5777 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
5778 echo " all. All supported depths"
5779 echo
5780 echo "Your choices (default 8,16,32):"
5781 read CFG_QWS_DEPTHS
5782 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
5783 CFG_QWS_DEPTHS=8,16,32
5786 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
5787 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
5788 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
5790 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
5791 case $D in
5792 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
5793 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
5794 esac
5795 done
5798 # enable dwarf2 support on Mac
5799 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5800 QT_CONFIG="$QT_CONFIG dwarf2"
5803 # Set the default arch.
5804 # Carbon builds: 32 bit x86/ppc.
5805 # For "-cocoa" builds on snow leopard : compiler default (64-bit).
5806 # For "-cocoa" builds on leopard : compiler default (32-bit).
5807 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
5808 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
5810 if [ "$CFG_MAC_COCOA" != "yes" ]; then
5811 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
5812 CFG_MAC_ARCHS=" x86"
5813 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
5814 CFG_MAC_ARCHS=" ppc"
5815 else
5816 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
5818 else
5819 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
5822 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
5825 # enable cocoa and/or carbon on Mac
5826 if [ "$CFG_MAC_COCOA" = "yes" ]; then
5827 # -cocoa on the command line disables carbon completely (i.e. use cocoa for 32-bit as well)
5828 CFG_MAC_CARBON="no"
5829 else
5830 # check which archs are in use, enable cocoa if we find a 64-bit one
5831 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
5832 CFG_MAC_COCOA="yes";
5833 CFG_MAC_CARBON="no";
5834 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
5835 CFG_MAC_CARBON="yes";
5837 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
5838 CFG_MAC_CARBON="yes";
5840 else
5841 # no 64-bit archs found.
5842 CFG_MAC_COCOA="no"
5846 # set the global Mac deployment target. This is overridden on an arch-by-arch basis
5847 # in some cases, see code further down
5848 case "$PLATFORM,$CFG_MAC_COCOA" in
5849 macx*,yes)
5850 # Cocoa
5851 QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5
5853 macx*,no)
5854 # gcc, Carbon
5855 QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4
5857 esac
5859 # disable Qt 3 support on VxWorks
5860 case "$XPLATFORM" in
5861 unsupported/vxworks*)
5862 CFG_QT3SUPPORT="no"
5864 esac
5866 # enable Qt 3 support functionality
5867 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5868 QT_CONFIG="$QT_CONFIG qt3support"
5871 # enable Phonon
5872 if [ "$CFG_PHONON" = "yes" ]; then
5873 QT_CONFIG="$QT_CONFIG phonon"
5874 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5875 QT_CONFIG="$QT_CONFIG phonon-backend"
5877 else
5878 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
5881 # disable accessibility
5882 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5883 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5884 else
5885 QT_CONFIG="$QT_CONFIG accessibility"
5888 # enable egl
5889 if [ "$CFG_EGL" = "no" ]; then
5890 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5891 else
5892 QT_CONFIG="$QT_CONFIG egl"
5893 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
5894 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
5898 # enable openvg
5899 if [ "$CFG_OPENVG" = "no" ]; then
5900 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5901 else
5902 QT_CONFIG="$QT_CONFIG openvg"
5903 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5904 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5906 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5907 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5909 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5910 QT_CONFIG="$QT_CONFIG shivavg"
5911 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5915 # enable opengl
5916 if [ "$CFG_OPENGL" = "no" ]; then
5917 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5918 else
5919 QT_CONFIG="$QT_CONFIG opengl"
5922 if [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es1cl" ] || [ "$CFG_OPENGL" = "es2" ]; then
5923 if [ "$PLATFORM_QWS" = "yes" ]; then
5924 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
5925 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_USE_EGLWINDOWSURFACE"
5927 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5930 if [ "$CFG_OPENGL" = "es1" ]; then
5931 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_1"
5932 QT_CONFIG="$QT_CONFIG opengles1"
5935 if [ "$CFG_OPENGL" = "es1cl" ]; then
5936 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_1_CL"
5937 QT_CONFIG="$QT_CONFIG opengles1cl"
5940 if [ "$CFG_OPENGL" = "es2" ]; then
5941 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5942 QT_CONFIG="$QT_CONFIG opengles2"
5945 # safe execution environment
5946 if [ "$CFG_SXE" != "no" ]; then
5947 QT_CONFIG="$QT_CONFIG sxe"
5950 # build up the variables for output
5951 if [ "$CFG_DEBUG" = "yes" ]; then
5952 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5953 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5954 elif [ "$CFG_DEBUG" = "no" ]; then
5955 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5956 QMAKE_CONFIG="$QMAKE_CONFIG release"
5958 if [ "$CFG_SHARED" = "yes" ]; then
5959 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5960 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5961 elif [ "$CFG_SHARED" = "no" ]; then
5962 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5963 QMAKE_CONFIG="$QMAKE_CONFIG static"
5965 if [ "$PLATFORM_QWS" = "yes" ]; then
5966 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
5967 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
5968 QT_CONFIG="$QT_CONFIG embedded"
5969 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5971 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5972 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5973 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5974 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5975 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5976 if [ "$CFG_LARGEFILE" = "yes" ]; then
5977 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5979 if [ "$CFG_STL" = "no" ]; then
5980 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5981 else
5982 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5984 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5985 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5987 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5988 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5989 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5990 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5991 QMakeVar add QMAKE_CFLAGS -g
5992 QMakeVar add QMAKE_CXXFLAGS -g
5993 QMAKE_CONFIG="$QMAKE_CONFIG separate_debug_info"
5995 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5996 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5997 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5998 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5999 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6000 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6001 if [ "$CFG_IPV6" = "yes" ]; then
6002 QT_CONFIG="$QT_CONFIG ipv6"
6004 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6005 QT_CONFIG="$QT_CONFIG clock-gettime"
6007 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6008 QT_CONFIG="$QT_CONFIG clock-monotonic"
6010 if [ "$CFG_MREMAP" = "yes" ]; then
6011 QT_CONFIG="$QT_CONFIG mremap"
6013 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6014 QT_CONFIG="$QT_CONFIG getaddrinfo"
6016 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6017 QT_CONFIG="$QT_CONFIG ipv6ifname"
6019 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6020 QT_CONFIG="$QT_CONFIG getifaddrs"
6022 if [ "$CFG_INOTIFY" = "yes" ]; then
6023 QT_CONFIG="$QT_CONFIG inotify"
6025 if [ "$CFG_LIBJPEG" = "no" ]; then
6026 CFG_JPEG="no"
6027 elif [ "$CFG_LIBJPEG" = "system" ]; then
6028 QT_CONFIG="$QT_CONFIG system-jpeg"
6030 if [ "$CFG_JPEG" = "no" ]; then
6031 QT_CONFIG="$QT_CONFIG no-jpeg"
6032 elif [ "$CFG_JPEG" = "yes" ]; then
6033 QT_CONFIG="$QT_CONFIG jpeg"
6035 if [ "$CFG_LIBMNG" = "no" ]; then
6036 CFG_MNG="no"
6037 elif [ "$CFG_LIBMNG" = "system" ]; then
6038 QT_CONFIG="$QT_CONFIG system-mng"
6040 if [ "$CFG_MNG" = "no" ]; then
6041 QT_CONFIG="$QT_CONFIG no-mng"
6042 elif [ "$CFG_MNG" = "yes" ]; then
6043 QT_CONFIG="$QT_CONFIG mng"
6045 if [ "$CFG_LIBPNG" = "no" ]; then
6046 CFG_PNG="no"
6048 if [ "$CFG_LIBPNG" = "system" ]; then
6049 QT_CONFIG="$QT_CONFIG system-png"
6051 if [ "$CFG_PNG" = "no" ]; then
6052 QT_CONFIG="$QT_CONFIG no-png"
6053 elif [ "$CFG_PNG" = "yes" ]; then
6054 QT_CONFIG="$QT_CONFIG png"
6056 if [ "$CFG_GIF" = "no" ]; then
6057 QT_CONFIG="$QT_CONFIG no-gif"
6058 elif [ "$CFG_GIF" = "yes" ]; then
6059 QT_CONFIG="$QT_CONFIG gif"
6061 if [ "$CFG_LIBTIFF" = "no" ]; then
6062 CFG_TIFF="no"
6063 elif [ "$CFG_LIBTIFF" = "system" ]; then
6064 QT_CONFIG="$QT_CONFIG system-tiff"
6066 if [ "$CFG_TIFF" = "no" ]; then
6067 QT_CONFIG="$QT_CONFIG no-tiff"
6068 elif [ "$CFG_TIFF" = "yes" ]; then
6069 QT_CONFIG="$QT_CONFIG tiff"
6071 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6072 QT_CONFIG="$QT_CONFIG no-freetype"
6073 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6074 QT_CONFIG="$QT_CONFIG system-freetype"
6075 else
6076 QT_CONFIG="$QT_CONFIG freetype"
6079 if [ "x$PLATFORM_MAC" = "xyes" ]; then
6080 #On Mac we implicitly link against libz, so we
6081 #never use the 3rdparty stuff.
6082 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6084 if [ "$CFG_ZLIB" = "yes" ]; then
6085 QT_CONFIG="$QT_CONFIG zlib"
6086 elif [ "$CFG_ZLIB" = "system" ]; then
6087 QT_CONFIG="$QT_CONFIG system-zlib"
6090 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6091 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6092 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6093 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6094 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6095 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6096 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6097 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6098 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6099 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6100 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6102 if [ "$PLATFORM_X11" = "yes" ]; then
6103 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6105 # for some reason, the following libraries are not always built shared,
6106 # so *every* program/lib (including Qt) has to link against them
6107 if [ "$CFG_XSHAPE" = "yes" ]; then
6108 QT_CONFIG="$QT_CONFIG xshape"
6110 if [ "$CFG_XSYNC" = "yes" ]; then
6111 QT_CONFIG="$QT_CONFIG xsync"
6113 if [ "$CFG_XINERAMA" = "yes" ]; then
6114 QT_CONFIG="$QT_CONFIG xinerama"
6115 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6117 if [ "$CFG_XCURSOR" = "yes" ]; then
6118 QT_CONFIG="$QT_CONFIG xcursor"
6119 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6121 if [ "$CFG_XFIXES" = "yes" ]; then
6122 QT_CONFIG="$QT_CONFIG xfixes"
6123 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6125 if [ "$CFG_XRANDR" = "yes" ]; then
6126 QT_CONFIG="$QT_CONFIG xrandr"
6127 if [ "$CFG_XRENDER" != "yes" ]; then
6128 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6129 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6130 else
6131 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6134 if [ "$CFG_XRENDER" = "yes" ]; then
6135 QT_CONFIG="$QT_CONFIG xrender"
6136 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6138 if [ "$CFG_MITSHM" = "yes" ]; then
6139 QT_CONFIG="$QT_CONFIG mitshm"
6141 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6142 QT_CONFIG="$QT_CONFIG fontconfig"
6144 if [ "$CFG_XINPUT" = "yes" ]; then
6145 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6147 if [ "$CFG_XINPUT" = "yes" ]; then
6148 QT_CONFIG="$QT_CONFIG xinput tablet"
6150 if [ "$CFG_XKB" = "yes" ]; then
6151 QT_CONFIG="$QT_CONFIG xkb"
6155 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6156 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6157 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6159 if [ "$PLATFORM_MAC" = "yes" ]; then
6160 if [ "$CFG_RPATH" = "yes" ]; then
6161 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6163 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
6164 if [ -n "$RPATH_FLAGS" ]; then
6165 echo
6166 echo "ERROR: -R cannot be used on this platform as \$QMAKE_RPATH is"
6167 echo " undefined."
6168 echo
6169 exit 1
6170 elif [ "$CFG_RPATH" = "yes" ]; then
6171 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6172 CFG_RPATH=no
6174 else
6175 if [ "$CFG_RPATH" = "yes" ]; then
6176 # set the default rpath to the library installation directory
6177 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6179 if [ -n "$RPATH_FLAGS" ]; then
6180 # add the user defined rpaths
6181 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6185 if [ '!' -z "$I_FLAGS" ]; then
6186 # add the user define include paths
6187 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6188 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6191 # turn off exceptions for the compilers that support it
6192 if [ "$PLATFORM_QWS" = "yes" ]; then
6193 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
6194 else
6195 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6197 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6198 CFG_EXCEPTIONS=no
6201 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6202 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6205 if [ "$CFG_ALSA" = "yes" ]; then
6206 QT_CONFIG="$QT_CONFIG alsa"
6210 # Some Qt modules are too advanced in C++ for some old compilers
6211 # Detect here the platforms where they are known to work.
6213 # See Qt documentation for more information on which features are
6214 # supported and on which compilers.
6216 canBuildQtXmlPatterns="yes"
6217 canBuildWebKit="$HAVE_STL"
6218 canBuildQtConcurrent="yes"
6220 # WebKit requires stdint.h
6221 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
6222 if [ $? != "0" ]; then
6223 canBuildWebKit="no"
6226 case "$XPLATFORM" in
6227 hpux-g++*)
6228 # PA-RISC's assembly is too limited
6229 # gcc 3.4 on that platform can't build QtXmlPatterns
6230 # the assembly it generates cannot be compiled
6232 # Check gcc's version
6233 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6236 3.4*)
6237 canBuildQtXmlPatterns="no"
6240 canBuildWebKit="no"
6241 canBuildQtXmlPatterns="no"
6243 esac
6245 unsupported/vxworks-*-g++*)
6246 canBuildWebKit="no"
6248 unsupported/vxworks-*-dcc*)
6249 canBuildWebKit="no"
6250 canBuildQtXmlPatterns="no"
6252 *-g++*)
6253 # Check gcc's version
6254 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6255 4*|3.4*)
6257 3.3*)
6258 canBuildWebKit="no"
6261 canBuildWebKit="no"
6262 canBuildQtXmlPatterns="no"
6264 esac
6266 solaris-cc*)
6267 # Check the compiler version
6268 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6269 5.[012345678])
6270 canBuildWebKit="no"
6271 canBuildQtXmlPatterns="no"
6272 canBuildQtConcurrent="no"
6274 5.9)
6275 canBuildWebKit="no"
6276 canBuildQtConcurrent="no"
6278 esac
6280 hpux-acc*)
6281 canBuildWebKit="no"
6282 canBuildQtXmlPatterns="no"
6283 canBuildQtConcurrent="no"
6285 hpuxi-acc*)
6286 canBuildWebKit="no"
6288 aix-xlc*)
6289 # Get the xlC version
6290 cat > xlcver.c <<EOF
6291 #include <stdio.h>
6292 int main()
6294 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6295 return 0;
6298 xlcver=
6299 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6300 xlcver=`./xlcver 2>/dev/null`
6301 rm -f ./xlcver
6303 if [ "$OPT_VERBOSE" = "yes" ]; then
6304 if [ -n "$xlcver" ]; then
6305 echo Found IBM xlC version: $xlcver.
6306 else
6307 echo Could not determine IBM xlC version, assuming oldest supported.
6311 case "$xlcver" in
6312 [123456].*)
6313 canBuildWebKit="no"
6314 canBuildQtXmlPatterns="no"
6315 canBuildQtConcurrent="no"
6318 canBuildWebKit="no"
6319 canBuildQtConcurrent="no"
6321 esac
6323 irix-cc*)
6324 canBuildWebKit="no"
6325 canBuildQtConcurrent="no"
6327 esac
6329 CFG_CONCURRENT="yes"
6330 if [ "$canBuildQtConcurrent" = "no" ]; then
6331 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6332 CFG_CONCURRENT="no"
6335 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
6336 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
6337 exit 1
6339 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
6340 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
6341 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
6342 CFG_XMLPATTERNS="no"
6344 if [ "$CFG_XMLPATTERNS" = "yes" ]; then
6345 QT_CONFIG="$QT_CONFIG xmlpatterns"
6346 else
6347 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
6350 if [ "$CFG_MULTIMEDIA" = "no" ]; then
6351 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
6352 else
6353 QT_CONFIG="$QT_CONFIG multimedia"
6356 if [ "$CFG_SVG" = "yes" ]; then
6357 QT_CONFIG="$QT_CONFIG svg"
6358 else
6359 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
6362 if [ "$CFG_WEBKIT" = "auto" ]; then
6363 CFG_WEBKIT="$canBuildWebKit"
6366 if [ "$CFG_WEBKIT" = "yes" ]; then
6367 QT_CONFIG="$QT_CONFIG webkit"
6368 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
6369 CFG_WEBKIT="yes"
6370 else
6371 CFG_WEBKIT="no"
6372 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WEBKIT"
6375 if [ "$CFG_SCRIPT" = "auto" ]; then
6376 CFG_SCRIPT="yes"
6379 if [ "$CFG_SCRIPT" = "yes" ]; then
6380 QT_CONFIG="$QT_CONFIG script"
6381 else
6382 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
6385 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
6386 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
6387 exit 1
6389 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
6390 CFG_SCRIPTTOOLS="yes"
6391 elif [ "$CFG_SCRIPT" = "no" ]; then
6392 CFG_SCRIPTTOOLS="no"
6395 if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
6396 QT_CONFIG="$QT_CONFIG scripttools"
6397 else
6398 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
6401 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6402 case "$COMPILER" in
6403 g++*)
6404 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6405 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6406 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6408 cc*)
6409 case "$PLATFORM" in
6410 irix-cc*)
6411 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6412 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6413 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6415 *) ;;
6416 esac
6418 *) ;;
6419 esac
6420 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6423 # On Mac, set the minimum deployment target for the different architechtures
6424 # using the Xarch compiler option when supported (10.5 and up). On 10.4 the
6425 # deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
6426 # env. variable. "-cocoa" on the command line means Cocoa is used in 32-bit mode also,
6427 # in this case fall back on QMAKE_MACOSX_DEPLOYMENT_TARGET which will be set to 10.5.
6428 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] && [ "$COMMANDLINE_MAC_COCOA" != "yes" ]; then
6429 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
6430 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
6431 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
6432 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
6433 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
6435 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
6436 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
6437 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
6438 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
6439 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
6441 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
6442 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
6443 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
6444 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
6445 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
6447 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
6448 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
6449 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
6450 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
6451 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
6455 #-------------------------------------------------------------------------------
6456 # generate QT_BUILD_KEY
6457 #-------------------------------------------------------------------------------
6459 # some compilers generate binary incompatible code between different versions,
6460 # so we need to generate a build key that is different between these compilers
6461 case "$COMPILER" in
6462 g++*)
6463 # GNU C++
6464 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6466 case "$COMPILER_VERSION" in
6467 *.*.*)
6468 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6469 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6470 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6472 *.*)
6473 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6474 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6475 QT_GCC_PATCH_VERSION=0
6477 esac
6479 case "$COMPILER_VERSION" in
6480 2.95.*)
6481 COMPILER_VERSION="2.95.*"
6483 3.*)
6484 COMPILER_VERSION="3.*"
6486 4.*)
6487 COMPILER_VERSION="4"
6491 esac
6492 [ '!' -z "$COMPILER_VERSION" ] && COMPILER="g++-${COMPILER_VERSION}"
6497 esac
6499 # QT_CONFIG can contain the following:
6501 # Things that affect the Qt API/ABI:
6503 # Options:
6504 # minimal-config small-config medium-config large-config full-config
6506 # Different edition modules:
6507 # network canvas table xml opengl sql
6509 # Things that do not affect the Qt API/ABI:
6510 # stl
6511 # system-jpeg no-jpeg jpeg
6512 # system-mng no-mng mng
6513 # system-png no-png png
6514 # system-zlib no-zlib zlib
6515 # system-libtiff no-libtiff
6516 # no-gif gif
6517 # debug release
6518 # dll staticlib
6520 # nocrosscompiler
6521 # GNUmake
6522 # largefile
6523 # nis
6524 # nas
6525 # tablet
6526 # ipv6
6528 # X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb
6529 # Embedded: embedded freetype
6531 ALL_OPTIONS=
6532 BUILD_CONFIG=
6533 BUILD_OPTIONS=
6535 # determine the build options
6536 for config_option in $QMAKE_CONFIG $QT_CONFIG; do
6537 SKIP="yes"
6538 case "$config_option" in
6539 *-config)
6540 # take the last *-config setting. this is the highest config being used,
6541 # and is the one that we will use for tagging plugins
6542 BUILD_CONFIG="$config_option"
6545 *) # skip all other options since they don't affect the Qt API/ABI.
6547 esac
6549 if [ "$SKIP" = "no" ]; then
6550 BUILD_OPTIONS="$BUILD_OPTIONS $config_option"
6552 done
6554 # put the options that we are missing into .options
6555 rm -f .options
6556 for opt in `echo $ALL_OPTIONS`; do
6557 SKIP="no"
6558 if echo $BUILD_OPTIONS | grep $opt >/dev/null 2>&1; then
6559 SKIP="yes"
6561 if [ "$SKIP" = "no" ]; then
6562 echo "$opt" >> .options
6564 done
6566 # reconstruct BUILD_OPTIONS with a sorted negative feature list
6567 # (ie. only things that are missing are will be put into the build key)
6568 BUILD_OPTIONS=
6569 if [ -f .options ]; then
6570 for opt in `sort -f .options | uniq`; do
6571 BUILD_OPTIONS="$BUILD_OPTIONS no-$opt"
6572 done
6574 rm -f .options
6576 # QT_NO* defines affect the Qt API (and binary compatibility). they need
6577 # to be included in the build key
6578 for build_option in $D_FLAGS; do
6579 build_option=`echo $build_option | cut -d \" -f 2 -`
6580 case "$build_option" in
6581 QT_NO*)
6582 echo "$build_option" >> .options
6585 # skip all other compiler defines
6587 esac
6588 done
6590 # sort the compile time defines (helps ensure that changes in this configure
6591 # script don't affect the QT_BUILD_KEY generation)
6592 if [ -f .options ]; then
6593 for opt in `sort -f .options | uniq`; do
6594 BUILD_OPTIONS="$BUILD_OPTIONS $opt"
6595 done
6597 rm -f .options
6599 BUILD_OPTIONS="$BUILD_CONFIG $BUILD_OPTIONS"
6600 # extract the operating system from the XPLATFORM
6601 TARGET_OPERATING_SYSTEM=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
6603 # when cross-compiling, don't include build-host information (build key is target specific)
6604 QT_BUILD_KEY="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6605 if [ -n "$QT_NAMESPACE" ]; then
6606 QT_BUILD_KEY="$QT_BUILD_KEY $QT_NAMESPACE"
6608 MAC_NEED_TWO_BUILD_KEYS="no"
6609 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
6610 QT_BUILD_KEY_CARBON=$QT_BUILD_KEY
6611 TARGET_OPERATING_SYSTEM="$TARGET_OPERATING_SYSTEM-cocoa"
6612 QT_BUILD_KEY_COCOA="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6613 if [ "$CFG_MAC_CARBON" = "no" ]; then
6614 QT_BUILD_KEY=$QT_BUILD_KEY_COCOA
6615 else
6616 MAC_NEED_TWO_BUILD_KEYS="yes"
6619 # don't break loading plugins build with an older version of Qt
6620 QT_BUILD_KEY_COMPAT=
6621 if [ "$QT_CROSS_COMPILE" = "no" ]; then
6622 # previous versions of Qt used a build key built from the uname
6623 QT_BUILD_KEY_COMPAT="$CFG_USER_BUILD_KEY $UNAME_MACHINE $UNAME_SYSTEM $COMPILER $BUILD_OPTIONS"
6624 if [ -n "$QT_NAMESPACE" ]; then
6625 QT_BUILD_KEY_COMPAT="$QT_BUILD_KEY_COMPAT $QT_NAMESPACE"
6628 # strip out leading/trailing/extra whitespace
6629 QT_BUILD_KEY=`echo $QT_BUILD_KEY | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6630 QT_BUILD_KEY_COMPAT=`echo $QT_BUILD_KEY_COMPAT | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6632 #-------------------------------------------------------------------------------
6633 # part of configuration information goes into qconfig.h
6634 #-------------------------------------------------------------------------------
6636 case "$CFG_QCONFIG" in
6637 full)
6638 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6641 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6642 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6643 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6644 echo "#endif" >>"$tmpconfig"
6646 esac
6648 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6650 /* Qt Edition */
6651 #ifndef QT_EDITION
6652 # define QT_EDITION $QT_EDITION
6653 #endif
6655 /* Machine byte-order */
6656 #define Q_BIG_ENDIAN 4321
6657 #define Q_LITTLE_ENDIAN 1234
6660 if [ "$MAC_NEED_TWO_BUILD_KEYS" = "no" ]; then
6661 echo "#define QT_BUILD_KEY \"$QT_BUILD_KEY\"" \
6662 >> "$outpath/src/corelib/global/qconfig.h.new"
6663 else
6664 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6666 #define QT_BUILD_KEY_CARBON "$QT_BUILD_KEY_CARBON"
6667 #define QT_BUILD_KEY_COCOA "$QT_BUILD_KEY_COCOA"
6671 if [ -n "$QT_BUILD_KEY_COMPAT" ]; then
6672 echo "#define QT_BUILD_KEY_COMPAT \"$QT_BUILD_KEY_COMPAT\"" \
6673 >> "$outpath/src/corelib/global/qconfig.h.new"
6675 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6677 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6678 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6679 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6680 #if defined(__BIG_ENDIAN__)
6681 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6682 #elif defined(__LITTLE_ENDIAN__)
6683 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6684 #else
6685 # error "Unable to determine byte order!"
6686 #endif
6688 else
6689 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6691 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6692 if [ "$CFG_ENDIAN" = "auto" ]; then
6693 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6694 #if defined(__BIG_ENDIAN__)
6695 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6696 #elif defined(__LITTLE_ENDIAN__)
6697 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6698 #else
6699 # error "Unable to determine byte order!"
6700 #endif
6702 else
6703 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6705 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6707 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6708 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6709 /* Non-IEEE double format */
6710 #define Q_DOUBLE_LITTLE "01234567"
6711 #define Q_DOUBLE_BIG "76543210"
6712 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6713 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6714 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6717 if [ "$CFG_ARMFPA" = "yes" ]; then
6718 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6719 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6720 #ifndef QT_BOOTSTRAPPED
6721 # define QT_ARMFPA
6722 #endif
6724 else
6725 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6729 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6730 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6731 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6732 /* Machine Architecture */
6733 #ifndef QT_BOOTSTRAPPED
6734 # define QT_ARCH_${CFG_ARCH_STR}
6735 #else
6736 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6737 #endif
6740 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6741 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6743 if [ "$CFG_LARGEFILE" = "yes" ]; then
6744 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6747 # if both carbon and cocoa are specified, enable the autodetection code.
6748 if [ "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
6749 echo "#define AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6750 elif [ "$CFG_MAC_COCOA" = "yes" ]; then
6751 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6754 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6755 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6758 if [ "$PLATFORM_MAC" = "yes" ]; then
6759 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6760 #if defined(__LP64__)
6761 # define QT_POINTER_SIZE 8
6762 #else
6763 # define QT_POINTER_SIZE 4
6764 #endif
6766 else
6767 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6768 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6772 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6774 if [ "$CFG_DEV" = "yes" ]; then
6775 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6778 # Embedded compile time options
6779 if [ "$PLATFORM_QWS" = "yes" ]; then
6780 # Add QWS to config.h
6781 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
6783 # Add excluded decorations to $QCONFIG_FLAGS
6784 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
6785 for decor in $decors; do
6786 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6787 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
6788 done
6790 # Figure which embedded drivers which are turned off
6791 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
6792 for ADRIVER in $CFG_GFX_ON; do
6793 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
6794 done
6796 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
6797 # the um driver is currently not in the available list for external builds
6798 if [ "$CFG_DEV" = "no" ]; then
6799 CFG_KBD_OFF="$CFG_KBD_OFF um"
6801 for ADRIVER in $CFG_KBD_ON; do
6802 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
6803 done
6805 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
6806 for ADRIVER in $CFG_MOUSE_ON; do
6807 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
6808 done
6810 for DRIVER in $CFG_GFX_OFF; do
6811 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6812 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
6813 done
6815 for DRIVER in $CFG_KBD_OFF; do
6816 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6817 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
6818 done
6820 for DRIVER in $CFG_MOUSE_OFF; do
6821 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6822 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
6823 done
6824 fi # QWS
6826 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6827 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6830 # Add turned on SQL drivers
6831 for DRIVER in $CFG_SQL_AVAILABLE; do
6832 eval "VAL=\$CFG_SQL_$DRIVER"
6833 case "$VAL" in
6835 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6836 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6837 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6839 plugin)
6840 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6842 esac
6843 done
6846 QMakeVar set sql-drivers "$SQL_DRIVERS"
6847 QMakeVar set sql-plugins "$SQL_PLUGINS"
6849 # Add other configuration options to the qconfig.h file
6850 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6851 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
6852 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6853 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6854 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
6855 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6856 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6857 [ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6"
6858 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6859 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6861 if [ "$PLATFORM_QWS" != "yes" ]; then
6862 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
6863 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
6864 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
6867 # X11/Unix/Mac only configs
6868 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6869 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6870 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6871 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6872 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6873 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6874 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6875 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6876 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6877 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6878 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6879 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
6880 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6881 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
6882 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6884 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6885 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6886 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6887 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6888 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6889 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6890 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6891 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6892 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6893 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6894 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6895 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6897 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6898 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6899 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6900 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6901 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6902 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6904 # sort QCONFIG_FLAGS for neatness if we can
6905 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6906 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6908 if [ -n "$QCONFIG_FLAGS" ]; then
6909 for cfg in $QCONFIG_FLAGS; do
6910 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6911 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6912 # figure out define logic, so we can output the correct
6913 # ifdefs to override the global defines in a project
6914 cfgdNeg=
6915 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6916 # QT_NO_option can be forcefully turned on by QT_option
6917 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6918 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6919 # QT_option can be forcefully turned off by QT_NO_option
6920 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6923 if [ -z $cfgdNeg ]; then
6924 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6925 #ifndef $cfgd
6926 # define $cfg
6927 #endif
6930 else
6931 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6932 #if defined($cfgd) && defined($cfgdNeg)
6933 # undef $cfgd
6934 #elif !defined($cfgd) && !defined($cfgdNeg)
6935 # define $cfg
6936 #endif
6940 done
6943 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6944 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6945 #define QT_VISIBILITY_AVAILABLE
6950 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6951 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6952 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6953 else
6954 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6955 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6956 chmod -w "$outpath/src/corelib/global/qconfig.h"
6957 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
6958 if [ '!' -f "$conf" ]; then
6959 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
6961 done
6964 #-------------------------------------------------------------------------------
6965 # save configuration into qconfig.pri
6966 #-------------------------------------------------------------------------------
6968 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6969 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6970 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6971 if [ "$CFG_DEBUG" = "yes" ]; then
6972 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6973 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6974 QT_CONFIG="$QT_CONFIG release"
6976 QT_CONFIG="$QT_CONFIG debug"
6977 elif [ "$CFG_DEBUG" = "no" ]; then
6978 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6979 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6980 QT_CONFIG="$QT_CONFIG debug"
6982 QT_CONFIG="$QT_CONFIG release"
6984 if [ "$CFG_STL" = "yes" ]; then
6985 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6987 if [ "$CFG_FRAMEWORK" = "no" ]; then
6988 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6989 else
6990 QT_CONFIG="$QT_CONFIG qt_framework"
6991 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6993 if [ "$PLATFORM_MAC" = "yes" ]; then
6994 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
6996 if [ "$CFG_DEV" = "yes" ]; then
6997 QT_CONFIG="$QT_CONFIG private_tests"
7000 # Make the application arch follow the Qt arch for single arch builds.
7001 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7002 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7003 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7006 cat >>"$QTCONFIG.tmp" <<EOF
7007 #configuration
7008 CONFIG += $QTCONFIG_CONFIG
7009 QT_ARCH = $CFG_ARCH
7010 QT_EDITION = $Edition
7011 QT_CONFIG += $QT_CONFIG
7013 #versioning
7014 QT_VERSION = $QT_VERSION
7015 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7016 QT_MINOR_VERSION = $QT_MINOR_VERSION
7017 QT_PATCH_VERSION = $QT_PATCH_VERSION
7019 #namespaces
7020 QT_LIBINFIX = $QT_LIBINFIX
7021 QT_NAMESPACE = $QT_NAMESPACE
7022 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7025 if [ "$CFG_RPATH" = "yes" ]; then
7026 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7028 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7029 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7030 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7031 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7033 # replace qconfig.pri if it differs from the newly created temp file
7034 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7035 rm -f "$QTCONFIG.tmp"
7036 else
7037 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7040 #-------------------------------------------------------------------------------
7041 # save configuration into .qmake.cache
7042 #-------------------------------------------------------------------------------
7044 CACHEFILE="$outpath/.qmake.cache"
7045 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7046 cat >>"$CACHEFILE.tmp" <<EOF
7047 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
7048 QT_SOURCE_TREE = \$\$quote($relpath)
7049 QT_BUILD_TREE = \$\$quote($outpath)
7050 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7051 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7052 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7054 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7055 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7056 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7057 QMAKE_UIC3 = \$\$QT_BUILD_TREE/bin/uic3
7058 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7059 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
7060 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7061 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7065 # Ensure we can link to uninistalled libraries
7066 if linkerSupportsFlag -rpath-link "$outpath/lib"; then
7067 echo "QMAKE_LFLAGS += -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp"
7070 if [ -n "$QT_CFLAGS_PSQL" ]; then
7071 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp"
7073 if [ -n "$QT_LFLAGS_PSQL" ]; then
7074 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$CACHEFILE.tmp"
7076 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7077 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7079 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7080 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7082 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7083 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7085 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7086 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7088 if [ -n "$QT_LFLAGS_ODBC" ]; then
7089 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$CACHEFILE.tmp"
7092 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7093 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
7096 #dump in the OPENSSL_LIBS info
7097 if [ '!' -z "$OPENSSL_LIBS" ]; then
7098 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp"
7099 elif [ "$CFG_OPENSSL" = "linked" ]; then
7100 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$CACHEFILE.tmp"
7103 #dump in the SDK info
7104 if [ '!' -z "$CFG_SDK" ]; then
7105 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$CACHEFILE.tmp"
7108 # mac gcc -Xarch support
7109 if [ "$CFG_MAC_XARCH" = "no" ]; then
7110 echo "QMAKE_MAC_XARCH = no" >> "$CACHEFILE.tmp"
7113 #dump the qmake spec
7114 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7115 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7116 else
7117 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7120 # cmdline args
7121 cat "$QMAKE_VARS_FILE" >> "$CACHEFILE.tmp"
7122 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
7124 # incrementals
7125 INCREMENTAL=""
7126 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
7127 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7128 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
7129 # don't need to worry about generated files
7130 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7131 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
7132 # done
7133 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7134 done
7135 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7136 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7139 # replace .qmake.cache if it differs from the newly created temp file
7140 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7141 rm -f "$CACHEFILE.tmp"
7142 else
7143 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7146 #-------------------------------------------------------------------------------
7147 # give feedback on configuration
7148 #-------------------------------------------------------------------------------
7150 case "$COMPILER" in
7151 g++*)
7152 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7153 cat <<EOF
7155 This target is using the GNU C++ compiler ($PLATFORM).
7157 Recent versions of this compiler automatically include code for
7158 exceptions, which increase both the size of the Qt libraries and
7159 the amount of memory taken by your applications.
7161 You may choose to re-run `basename $0` with the -no-exceptions
7162 option to compile Qt without exceptions. This is completely binary
7163 compatible, and existing applications will continue to work.
7168 cc*)
7169 case "$PLATFORM" in
7170 irix-cc*)
7171 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7172 cat <<EOF
7174 This target is using the MIPSpro C++ compiler ($PLATFORM).
7176 You may choose to re-run `basename $0` with the -no-exceptions
7177 option to compile Qt without exceptions. This will make the
7178 size of the Qt library smaller and reduce the amount of memory
7179 taken by your applications.
7184 *) ;;
7185 esac
7187 *) ;;
7188 esac
7190 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7191 cat <<EOF
7192 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
7193 in debug mode will run out of memory on systems with 2GB or less.
7194 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
7195 -no-webkit or -release to skip webkit debug.
7199 echo
7200 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7201 echo "Build type: $PLATFORM"
7202 else
7203 echo "Building on: $PLATFORM"
7204 echo "Building for: $XPLATFORM"
7207 if [ "$PLATFORM_MAC" = "yes" ]; then
7208 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7209 else
7210 echo "Architecture: $CFG_ARCH"
7213 if [ "$PLATFORM_QWS" = "yes" ]; then
7214 echo "Host architecture: $CFG_HOST_ARCH"
7217 if [ "$PLATFORM_MAC" = "yes" ]; then
7218 if [ "$CFG_MAC_COCOA" = "yes" ]; then
7219 if [ "$CFG_MAC_CARBON" = "yes" ]; then
7220 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
7221 else
7222 echo "Using framework: Cocoa"
7224 else
7225 echo "Using framework: Carbon"
7229 if [ -n "$PLATFORM_NOTES" ]; then
7230 echo "Platform notes:"
7231 echo "$PLATFORM_NOTES"
7232 else
7233 echo
7236 if [ "$OPT_VERBOSE" = "yes" ]; then
7237 if echo '\c' | grep '\c' >/dev/null; then
7238 echo -n "qmake vars .......... "
7239 else
7240 echo "qmake vars .......... \c"
7242 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
7243 echo "qmake switches ...... $QMAKE_SWITCHES"
7246 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ......... $INCREMENTAL"
7247 echo "Build ............... $CFG_BUILD_PARTS"
7248 echo "Configuration ....... $QMAKE_CONFIG $QT_CONFIG"
7249 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7250 echo "Debug ............... yes (combined)"
7251 if [ "$CFG_DEBUG" = "yes" ]; then
7252 echo "Default Link ........ debug"
7253 else
7254 echo "Default Link ........ release"
7256 else
7257 echo "Debug ............... $CFG_DEBUG"
7259 echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
7260 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
7261 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
7262 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
7263 echo "QtConcurrent code.... $CFG_CONCURRENT"
7264 echo "QtScript module ..... $CFG_SCRIPT"
7265 echo "QtScriptTools module $CFG_SCRIPTTOOLS"
7266 echo "QtXmlPatterns module $CFG_XMLPATTERNS"
7267 echo "Phonon module ....... $CFG_PHONON"
7268 echo "Multimedia module ... $CFG_MULTIMEDIA"
7269 echo "SVG module .......... $CFG_SVG"
7270 echo "WebKit module ....... $CFG_WEBKIT"
7271 echo "STL support ......... $CFG_STL"
7272 echo "PCH support ......... $CFG_PRECOMPILE"
7273 echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
7274 if [ "${CFG_ARCH}" = "arm" ]; then
7275 echo "iWMMXt support ...... ${CFG_IWMMXT}"
7277 [ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
7278 echo "IPv6 support ........ $CFG_IPV6"
7279 echo "IPv6 ifname support . $CFG_IPV6IFNAME"
7280 echo "getaddrinfo support . $CFG_GETADDRINFO"
7281 echo "getifaddrs support .. $CFG_GETIFADDRS"
7282 echo "Accessibility ....... $CFG_ACCESSIBILITY"
7283 echo "NIS support ......... $CFG_NIS"
7284 echo "CUPS support ........ $CFG_CUPS"
7285 echo "Iconv support ....... $CFG_ICONV"
7286 echo "Glib support ........ $CFG_GLIB"
7287 echo "GStreamer support ... $CFG_GSTREAMER"
7288 echo "Large File support .. $CFG_LARGEFILE"
7289 echo "GIF support ......... $CFG_GIF"
7290 if [ "$CFG_TIFF" = "no" ]; then
7291 echo "TIFF support ........ $CFG_TIFF"
7292 else
7293 echo "TIFF support ........ $CFG_TIFF ($CFG_LIBTIFF)"
7295 if [ "$CFG_JPEG" = "no" ]; then
7296 echo "JPEG support ........ $CFG_JPEG"
7297 else
7298 echo "JPEG support ........ $CFG_JPEG ($CFG_LIBJPEG)"
7300 if [ "$CFG_PNG" = "no" ]; then
7301 echo "PNG support ......... $CFG_PNG"
7302 else
7303 echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
7305 if [ "$CFG_MNG" = "no" ]; then
7306 echo "MNG support ......... $CFG_MNG"
7307 else
7308 echo "MNG support ......... $CFG_MNG ($CFG_LIBMNG)"
7310 echo "zlib support ........ $CFG_ZLIB"
7311 echo "Session management .. $CFG_SM"
7312 if [ "$PLATFORM_QWS" = "yes" ]; then
7313 echo "Embedded support .... $CFG_EMBEDDED"
7314 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
7315 echo "Freetype2 support ... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
7316 else
7317 echo "Freetype2 support ... $CFG_QWS_FREETYPE"
7319 # Normalize the decoration output first
7320 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
7321 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
7322 echo "Graphics (qt) ....... ${CFG_GFX_ON}"
7323 echo "Graphics (plugin) ... ${CFG_GFX_PLUGIN}"
7324 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
7325 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
7326 echo "Decorations (qt) .... $CFG_DECORATION_ON"
7327 echo "Decorations (plugin) $CFG_DECORATION_PLUGIN"
7328 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
7329 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
7330 echo "Keyboard driver (qt). ${CFG_KBD_ON}"
7331 echo "Keyboard driver (plugin) ${CFG_KBD_PLUGIN}"
7332 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
7333 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
7334 echo "Mouse driver (qt) ... $CFG_MOUSE_ON"
7335 echo "Mouse driver (plugin) $CFG_MOUSE_PLUGIN"
7337 if [ "$CFG_OPENGL" = "desktop" ]; then
7338 echo "OpenGL support ...... yes (Desktop OpenGL)"
7339 elif [ "$CFG_OPENGL" = "es1" ]; then
7340 echo "OpenGL support ...... yes (OpenGL ES 1.x Common profile)"
7341 elif [ "$CFG_OPENGL" = "es1cl" ]; then
7342 echo "OpenGL support ...... yes (OpenGL ES 1.x Common Lite profile)"
7343 elif [ "$CFG_OPENGL" = "es2" ]; then
7344 echo "OpenGL support ...... yes (OpenGL ES 2.x)"
7345 else
7346 echo "OpenGL support ...... no"
7348 if [ "$CFG_EGL" != "no" ]; then
7349 if [ "$CFG_EGL_GLES_INCLUDES" != "no" ]; then
7350 echo "EGL support ......... yes <GLES/egl.h>"
7351 else
7352 echo "EGL support ......... yes <EGL/egl.h>"
7355 if [ "$CFG_OPENVG" ]; then
7356 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7357 echo "OpenVG support ...... ShivaVG"
7358 else
7359 echo "OpenVG support ...... $CFG_OPENVG"
7362 if [ "$PLATFORM_X11" = "yes" ]; then
7363 echo "NAS sound support ... $CFG_NAS"
7364 echo "XShape support ...... $CFG_XSHAPE"
7365 echo "XSync support ....... $CFG_XSYNC"
7366 echo "Xinerama support .... $CFG_XINERAMA"
7367 echo "Xcursor support ..... $CFG_XCURSOR"
7368 echo "Xfixes support ...... $CFG_XFIXES"
7369 echo "Xrandr support ...... $CFG_XRANDR"
7370 echo "Xrender support ..... $CFG_XRENDER"
7371 echo "Xi support .......... $CFG_XINPUT"
7372 echo "MIT-SHM support ..... $CFG_MITSHM"
7373 echo "FontConfig support .. $CFG_FONTCONFIG"
7374 echo "XKB Support ......... $CFG_XKB"
7375 echo "immodule support .... $CFG_IM"
7376 echo "GTK theme support ... $CFG_QGTKSTYLE"
7378 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support ....... $CFG_SQL_mysql"
7379 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support .. $CFG_SQL_psql"
7380 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........ $CFG_SQL_odbc"
7381 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ......... $CFG_SQL_oci"
7382 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ......... $CFG_SQL_tds"
7383 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ......... $CFG_SQL_db2"
7384 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ... $CFG_SQL_ibase"
7385 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support .... $CFG_SQL_sqlite2"
7386 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ...... $CFG_SQL_sqlite ($CFG_SQLITE)"
7388 OPENSSL_LINKAGE=""
7389 if [ "$CFG_OPENSSL" = "yes" ]; then
7390 OPENSSL_LINKAGE="(run-time)"
7391 elif [ "$CFG_OPENSSL" = "linked" ]; then
7392 OPENSSL_LINKAGE="(linked)"
7394 echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
7396 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
7398 # complain about not being able to use dynamic plugins if we are using a static build
7399 if [ "$CFG_SHARED" = "no" ]; then
7400 echo
7401 echo "WARNING: Using static linking will disable the use of dynamically"
7402 echo "loaded plugins. Make sure to import all needed static plugins,"
7403 echo "or compile needed modules into the library."
7404 echo
7406 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7407 echo
7408 echo "NOTE: When linking against OpenSSL, you can override the default"
7409 echo "library names through OPENSSL_LIBS."
7410 echo "For example:"
7411 echo " ./configure -openssl-linked OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto'"
7412 echo
7414 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7415 echo
7416 echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
7417 echo
7419 echo "alsa support ........ $CFG_ALSA"
7420 echo
7422 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7423 PROCS=1
7424 EXEC=""
7427 #-------------------------------------------------------------------------------
7428 # build makefiles based on the configuration
7429 #-------------------------------------------------------------------------------
7431 echo "Finding project files. Please wait..."
7432 "$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
7433 if [ -f "${relpath}/projects.pro" ]; then
7434 mkfile="${outpath}/Makefile"
7435 [ -f "$mkfile" ] && chmod +w "$mkfile"
7436 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro" -o "$mkfile"
7439 # .projects -> projects to process
7440 # .projects.1 -> qt and moc
7441 # .projects.2 -> subdirs and libs
7442 # .projects.3 -> the rest
7443 rm -f .projects .projects.1 .projects.2 .projects.3
7445 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7446 if [ -z "$AWK" ]; then
7447 for p in `echo $QMAKE_PROJECTS`; do
7448 echo "$p" >> .projects
7449 done
7450 else
7451 cat >projects.awk <<EOF
7452 BEGIN {
7453 files = 0
7454 target_file = ""
7455 input_file = ""
7457 first = "./.projects.1.tmp"
7458 second = "./.projects.2.tmp"
7459 third = "./.projects.3.tmp"
7462 FNR == 1 {
7463 if ( input_file ) {
7464 if ( ! target_file )
7465 target_file = third
7466 print input_file >target_file
7469 matched_target = 0
7470 template_lib = 0
7471 input_file = FILENAME
7472 target_file = ""
7475 /^(TARGET.*=)/ {
7476 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7477 target_file = first
7478 matched_target = 1
7482 matched_target == 0 && /^(TEMPLATE.*=)/ {
7483 if ( \$3 == "subdirs" )
7484 target_file = second
7485 else if ( \$3 == "lib" )
7486 template_lib = 1
7487 else
7488 target_file = third
7491 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7492 if ( \$0 ~ /plugin/ )
7493 target_file = third
7494 else
7495 target_file = second
7498 END {
7499 if ( input_file ) {
7500 if ( ! target_file )
7501 target_file = third
7502 print input_file >>target_file
7508 rm -f .projects.all
7509 for p in `echo $QMAKE_PROJECTS`; do
7510 echo "$p" >> .projects.all
7511 done
7513 # if you get errors about the length of the command line to awk, change the -l arg
7514 # to split below
7515 split -l 100 .projects.all .projects.all.
7516 for p in .projects.all.*; do
7517 "$AWK" -f projects.awk `cat $p`
7518 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
7519 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
7520 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
7521 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
7522 done
7523 rm -f .projects.all* projects.awk
7525 [ -f .projects.1 ] && cat .projects.1 >>.projects
7526 [ -f .projects.2 ] && cat .projects.2 >>.projects
7527 rm -f .projects.1 .projects.2
7528 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
7529 cat .projects.3 >>.projects
7530 rm -f .projects.3
7533 # don't sort Qt and MOC in with the other project files
7534 # also work around a segfaulting uniq(1)
7535 if [ -f .sorted.projects.2 ]; then
7536 sort .sorted.projects.2 > .sorted.projects.2.new
7537 mv -f .sorted.projects.2.new .sorted.projects.2
7538 cat .sorted.projects.2 >> .sorted.projects.1
7540 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
7541 rm -f .sorted.projects.2 .sorted.projects.1
7543 NORM_PROJECTS=0
7544 FAST_PROJECTS=0
7545 if [ -f .projects ]; then
7546 uniq .projects >.tmp
7547 mv -f .tmp .projects
7548 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
7550 if [ -f .projects.3 ]; then
7551 uniq .projects.3 >.tmp
7552 mv -f .tmp .projects.3
7553 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7555 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7556 echo
7558 PART_ROOTS=
7559 for part in $CFG_BUILD_PARTS; do
7560 case "$part" in
7561 tools) PART_ROOTS="$PART_ROOTS tools" ;;
7562 libs) PART_ROOTS="$PART_ROOTS src" ;;
7563 examples) PART_ROOTS="$PART_ROOTS examples demos" ;;
7564 *) ;;
7565 esac
7566 done
7568 if [ "$CFG_DEV" = "yes" ]; then
7569 PART_ROOTS="$PART_ROOTS tests"
7572 echo "Creating makefiles. Please wait..."
7573 for file in .projects .projects.3; do
7574 [ '!' -f "$file" ] && continue
7575 for a in `cat $file`; do
7576 IN_ROOT=no
7577 for r in $PART_ROOTS; do
7578 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
7579 IN_ROOT=yes
7580 break
7582 done
7583 [ "$IN_ROOT" = "no" ] && continue
7585 case $a in
7586 *winmain/winmain.pro) continue ;;
7587 *s60main/s60main.pro) continue ;;
7588 */qmake/qmake.pro) continue ;;
7589 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*) SPEC=$QMAKESPEC ;;
7590 *) SPEC=$XQMAKESPEC ;;
7591 esac
7592 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
7593 test -d "$dir" || mkdir -p "$dir"
7594 OUTDIR="$outpath/$dir"
7595 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7596 # fast configure - the makefile exists, skip it
7597 # since the makefile exists, it was generated by qmake, which means we
7598 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7599 # file changes...
7600 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7601 continue;
7603 QMAKE_SPEC_ARGS="-spec $SPEC"
7604 if echo '\c' | grep '\c' >/dev/null; then
7605 echo -n " for $a"
7606 else
7607 echo " for $a\c"
7610 QMAKE="$outpath/bin/qmake"
7611 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7612 if [ "$file" = ".projects.3" ]; then
7613 if echo '\c' | grep '\c' >/dev/null; then
7614 echo -n " (fast)"
7615 else
7616 echo " (fast)\c"
7618 echo
7620 cat >"${OUTDIR}/Makefile" <<EOF
7621 # ${OUTDIR}/Makefile: generated by configure
7623 # WARNING: This makefile will be replaced with a real makefile.
7624 # All changes made to this file will be lost.
7626 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7628 cat >>"${OUTDIR}/Makefile" <<EOF
7629 QMAKE = "$QMAKE"
7630 all clean install qmake first Makefile: FORCE
7631 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7632 cd "$OUTDIR"
7633 \$(MAKE) \$@
7635 FORCE:
7638 else
7639 if [ "$OPT_VERBOSE" = "yes" ]; then
7640 echo " (`basename $SPEC`)"
7641 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7642 else
7643 echo
7646 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7647 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7649 done
7650 done
7651 rm -f .projects .projects.3
7653 #-------------------------------------------------------------------------------
7654 # XShape is important, DnD in the Designer doens't work without it
7655 #-------------------------------------------------------------------------------
7656 if [ "$PLATFORM_X11" = "yes" ] && [ "$CFG_XSHAPE" = "no" ]; then
7657 cat <<EOF
7659 NOTICE: Qt will not be built with XShape support.
7661 As a result, drag-and-drop in the Qt Designer will NOT
7662 work. We recommend that you enable XShape support by passing
7663 the -xshape switch to $0.
7667 #-------------------------------------------------------------------------------
7668 # check for platforms that we don't yet know about
7669 #-------------------------------------------------------------------------------
7670 if [ "$CFG_ARCH" = "generic" ]; then
7671 cat <<EOF
7673 NOTICE: Atomic operations are not yet supported for this
7674 architecture.
7676 Qt will use the 'generic' architecture instead, which uses a
7677 single pthread_mutex_t to protect all atomic operations. This
7678 implementation is the slow (but safe) fallback implementation
7679 for architectures Qt does not yet support.
7683 #-------------------------------------------------------------------------------
7684 # check if the user passed the -no-zlib option, which is no longer supported
7685 #-------------------------------------------------------------------------------
7686 if [ -n "$ZLIB_FORCED" ]; then
7687 which_zlib="supplied"
7688 if [ "$CFG_ZLIB" = "system" ]; then
7689 which_zlib="system"
7692 cat <<EOF
7694 NOTICE: The -no-zlib option was supplied but is no longer
7695 supported.
7697 Qt now requires zlib support in all builds, so the -no-zlib
7698 option was ignored. Qt will be built using the $which_zlib
7699 zlib.
7703 #-------------------------------------------------------------------------------
7704 # finally save the executed command to another script
7705 #-------------------------------------------------------------------------------
7706 if [ `basename $0` != "config.status" ]; then
7707 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7709 # add the system variables
7710 for varname in $SYSTEM_VARIABLES; do
7711 cmd=`echo \
7712 'if [ -n "\$'${varname}'" ]; then
7713 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7714 fi'`
7715 eval "$cmd"
7716 done
7718 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7720 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7721 echo "#!/bin/sh" > "$outpath/config.status"
7722 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7723 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7724 echo "else" >> "$outpath/config.status"
7725 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7726 echo "fi" >> "$outpath/config.status"
7727 chmod +x "$outpath/config.status"
7730 if [ -n "$RPATH_MESSAGE" ]; then
7731 echo
7732 echo "$RPATH_MESSAGE"
7735 MAKE=`basename "$MAKE"`
7736 echo
7737 echo Qt is now configured for building. Just run \'$MAKE\'.
7738 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7739 echo Once everything is built, Qt is installed.
7740 echo You should not run \'$MAKE install\'.
7741 else
7742 echo Once everything is built, you must run \'$MAKE install\'.
7743 echo Qt will be installed into $QT_INSTALL_PREFIX
7745 echo
7746 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.
7747 echo