2 #############################################################################
4 ## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
5 ## All rights reserved.
6 ## Contact: Nokia Corporation (qt-info@nokia.com)
8 ## This file is the build configuration utility of the Qt Toolkit.
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
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.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
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
73 QMAKE_VARS_FILE=.qmake.vars
77 #-------------------------------------------------------------------------------
79 #-------------------------------------------------------------------------------
81 # Adds a new qmake variable to the cache
82 # Usage: QMakeVar mode varname contents
83 # where mode is one of: set, add, del
97 echo >&2 "BUG: wrong command to QMakeVar: $1"
101 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
104 # relies on $QMAKESPEC being set correctly. parses include statements in
105 # qmake.conf and prints out the expanded file
112 $AWK -v "QMAKESPEC=$tmpSPEC" '
114 fname = QMAKESPEC "/" substr($0, 9, length($0) - 9)
115 while ((getline line < fname) > 0)
120 { print }' "$tmpSPEC/qmake.conf"
123 #-------------------------------------------------------------------------------
124 # operating system detection
125 #-------------------------------------------------------------------------------
127 # need that throughout the script
128 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
129 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
130 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
131 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
134 #-------------------------------------------------------------------------------
135 # window system detection
136 #-------------------------------------------------------------------------------
142 if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ] && [ -d /System/Library/Frameworks/Carbon.framework ]; then
144 # ~ the Carbon SDK exists
145 # ~ src/gui/base/qapplication_mac.cpp is present
146 # ~ this is the internal edition and Qt/Mac sources exist
148 elif [ -f "$relpath"/src/gui/kernel/qapplication_qws.cpp ]; then
150 # ~ src/gui/base/qapplication_qws.cpp is present
151 # ~ this is the free or commercial edition
152 # ~ this is the internal edition and Qt Embedded is explicitly enabled
153 if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ]; then
154 # This is a depot build, or an all-platforms package
157 # This must be the embedded package, since the Qt/Mac source files are not present
162 #-----------------------------------------------------------------------------
163 # Qt version detection
164 #-----------------------------------------------------------------------------
165 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
169 if [ -n "$QT_VERSION" ]; then
170 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
171 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
172 if [ -n "$MAJOR" ]; then
173 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
174 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
175 QT_MAJOR_VERSION="$MAJOR"
176 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
177 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
180 if [ -z "$QT_MAJOR_VERSION" ]; then
181 echo "Cannot process version from qglobal.h: $QT_VERSION"
182 echo "Cannot proceed."
186 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
187 if [ -z "$QT_PACKAGEDATE" ]; then
188 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
189 echo "Cannot proceed"
193 #-------------------------------------------------------------------------------
195 #-------------------------------------------------------------------------------
200 EditionString=Commercial
204 # parse the arguments, setting things to "yes" or "no"
205 while [ "$#" -gt 0 ]; do
209 #Autoconf style options
211 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
215 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
219 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
220 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
223 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
228 # this option may or may not be followed by an argument
229 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
236 -h|help|--help|-help)
237 if [ "$VAL" = "yes" ]; then
239 COMMERCIAL_USER="no" #doesn't matter we will display the help
242 COMMERCIAL_USER="no" #doesn't matter we will display the help
246 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
250 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
257 if [ "$UNKNOWN_ARG" = "yes" ]; then
267 if [ "$PLATFORM_QWS" != "no" ]; then
268 if [ "$PLATFORM_QWS" = "maybe" ]; then
274 echo "No license exists to enable Qt for Embedded Linux. Disabling."
287 COMMERCIAL_USER="yes"
301 if [ "$COMMERCIAL_USER" = "ask" ]; then
303 echo "Which edition of Qt do you want to use ?"
305 echo "Type 'c' if you want to use the Commercial Edition."
306 echo "Type 'o' if you want to use the Open Source Edition."
310 if [ "$commercial" = "c" ]; then
311 COMMERCIAL_USER="yes"
313 elif [ "$commercial" = "o" ]; then
320 if [ "$CFG_NOKIA" = "yes" ]; then
322 Edition="NokiaInternalBuild"
323 EditionString="Nokia Internal Build"
324 QT_EDITION="QT_EDITION_OPENSOURCE"
325 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
326 elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
327 # Commercial preview release
328 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
331 QT_EDITION="QT_EDITION_DESKTOP"
332 LicenseType="Technology Preview"
333 elif [ $COMMERCIAL_USER = "yes" ]; then
334 # one of commercial editions
335 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
336 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes
338 # read in the license file
339 if [ -f "$LICENSE_FILE" ]; then
340 . "$LICENSE_FILE" >/dev/null 2>&1
341 if [ -z "$LicenseKeyExt" ]; then
343 echo "You are using an old license file."
345 echo "Please install the license file supplied by Nokia,"
346 echo "or install the Qt Open Source Edition if you intend to"
347 echo "develop free software."
350 if [ -z "$Licensee" ]; then
352 echo "Invalid license key. Please check the license key."
356 if [ -z "$LicenseKeyExt" ]; then
358 if echo '\c' | grep '\c' >/dev/null; then
359 echo -n "Please enter your license key: "
361 echo "Please enter your license key: \c"
364 Licensee="Unknown user"
369 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
370 && LicenseValid="yes" \
372 if [ "$LicenseValid" != "yes" ]; then
374 echo "Invalid license key. Please check the license key."
377 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
378 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d - | cut -b 1`
379 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
380 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
382 # determine which edition we are licensed to use
383 case "$LicenseTypeCode" in
385 LicenseType="Commercial"
389 QT_EDITION="QT_EDITION_UNIVERSAL"
392 Edition="FullFramework"
393 EditionString="Full Framework"
394 QT_EDITION="QT_EDITION_DESKTOP"
397 Edition="GUIFramework"
398 EditionString="GUI Framework"
399 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
404 LicenseType="Evaluation"
408 QT_EDITION="QT_EDITION_EVALUATION"
413 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
415 echo "Invalid license key. Please check the license key."
419 # verify that we are licensed to use Qt on this platform
421 if [ "$PlatformCode" = "X" ]; then
423 LICENSE_EXTENSION="-ALLOS"
424 elif [ "$PLATFORM_QWS" = "yes" ]; then
425 case $PlatformCode in
426 2|4|8|A|B|E|G|J|K|P|Q|S|U|V|W)
427 # Qt for Embedded Linux
428 LICENSE_EXTENSION="-EMBEDDED"
432 echo "You are not licensed for Qt for Embedded Linux."
434 echo "Please contact qt-info@nokia.com to upgrade your license"
435 echo "to include Qt for Embedded Linux, or install the"
436 echo "Qt Open Source Edition if you intend to develop free software."
440 elif [ "$PLATFORM_MAC" = "yes" ]; then
441 case $PlatformCode in
442 2|4|5|7|9|B|C|E|F|G|L|M|U|W|Y)
444 LICENSE_EXTENSION="-DESKTOP"
446 3|6|8|A|D|H|J|K|P|Q|S|V)
448 LICENSE_EXTENSION="-EMBEDDED"
452 echo "You are not licensed for the Qt/Mac platform."
454 echo "Please contact qt-info@nokia.com to upgrade your license"
455 echo "to include the Qt/Mac platform."
460 case $PlatformCode in
461 2|3|4|5|7|D|E|F|J|M|Q|S|T|V|Z)
463 LICENSE_EXTENSION="-DESKTOP"
465 6|8|9|A|B|C|G|H|K|P|U|W)
467 LICENSE_EXTENSION="-EMBEDDED"
471 echo "You are not licensed for the Qt/X11 platform."
473 echo "Please contact qt-info@nokia.com to upgrade your license to"
474 echo "include the Qt/X11 platform, or install the Qt Open Source Edition"
475 echo "if you intend to develop free software."
481 if test -r "$relpath/.LICENSE"; then
482 # Generic, non-final license
484 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
489 *TECHNOLOGY?PREVIEW*)
496 echo >&2 "Invalid license files; cannot continue"
501 EditionString="$Edition"
502 QT_EDITION="QT_EDITION_DESKTOP"
505 case "$LicenseFeatureCode" in
508 case "$LicenseType" in
510 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
513 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
519 case "$LicenseType" in
521 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
524 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
530 echo "Invalid license key. Please check the license key."
534 if [ '!' -f "$outpath/LICENSE" ]; then
535 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
536 echo "this software has disappeared."
538 echo "Sorry, you are not licensed to use this software."
539 echo "Try re-installing."
543 elif [ $COMMERCIAL_USER = "no" ]; then
544 # Open Source edition - may only be used under the terms of the GPL or LGPL.
545 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
546 Licensee="Open Source"
548 EditionString="Open Source"
549 QT_EDITION="QT_EDITION_OPENSOURCE"
552 #-------------------------------------------------------------------------------
553 # initalize variables
554 #-------------------------------------------------------------------------------
556 SYSTEM_VARIABLES="CC CXX CFLAGS CXXFLAGS LDFLAGS"
557 for varname in $SYSTEM_VARIABLES; do
558 qmakevarname="${varname}"
559 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
560 if [ "${varname}" = "LDFLAGS" ]; then
561 qmakevarname="LFLAGS"
564 'if [ -n "\$'${varname}'" ]; then
565 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
569 # Use CC/CXX to run config.tests
570 mkdir -p "$outpath/config.tests"
571 rm -f "$outpath/config.tests/.qmake.cache"
572 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
574 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
575 QMakeVar add decorations "default windows styled"
576 QMakeVar add gfx-drivers "linuxfb"
577 QMakeVar add kbd-drivers "tty"
578 QMakeVar add mouse-drivers "pc linuxtp"
580 if [ "$CFG_DEV" = "yes" ]; then
581 QMakeVar add kbd-drivers "um"
584 # QTDIR may be set and point to an old or system-wide Qt installation
587 # the minimum version of libdbus-1 that we require:
588 MIN_DBUS_1_VERSION=0.62
590 # initalize internal variables
591 CFG_CONFIGURE_EXIT_ON_ERROR=yes
593 CFG_EXCEPTIONS=unspecified
594 CFG_SCRIPTTOOLS=auto # (yes|no|auto)
595 CFG_XMLPATTERNS=auto # (yes|no|auto)
625 CFG_QWS_FREETYPE=auto
628 QT_DEFAULT_BUILD_PARTS="libs tools examples demos docs translations"
633 CFG_PHONON_BACKEND=yes
635 CFG_WEBKIT=auto # (yes|no|auto)
637 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen"
638 CFG_GFX_ON="linuxfb multiscreen"
639 CFG_GFX_PLUGIN_AVAILABLE=
642 CFG_KBD_AVAILABLE="tty usb sl5000 yopy vr41xx qvfb"
643 CFG_KBD_ON="tty" #default, see QMakeVar above
644 CFG_MOUSE_AVAILABLE="pc bus linuxtp yopy vr41xx tslib qvfb"
645 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
649 CFG_KBD_PLUGIN_AVAILABLE=
652 CFG_MOUSE_PLUGIN_AVAILABLE=
657 CFG_DECORATION_AVAILABLE="styled windows default"
658 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
659 CFG_DECORATION_PLUGIN_AVAILABLE=
660 CFG_DECORATION_PLUGIN=
675 CFG_SEPARATE_DEBUG_INFO=auto
676 CFG_REDUCE_EXPORTS=auto
681 CFG_REDUCE_RELOCATIONS=no
686 CFG_ACCESSIBILITY=auto
690 CFG_DOUBLEFORMAT=auto
693 CFG_CLOCK_GETTIME=auto
694 CFG_CLOCK_MONOTONIC=auto
703 MAC_ARCHS_COMMANDLINE=
708 COMMANDLINE_MAC_COCOA=no
710 CFG_PREFIX_INSTALL=yes
718 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
721 OPT_CONFIRM_LICENSE=no
727 CFG_GRAPHICS_SYSTEM=default
729 # initalize variables used for installation
737 QT_INSTALL_TRANSLATIONS=
743 #flags for SQL drivers
752 # flags for libdbus-1
756 # flags for Glib (X11 only)
760 # flags for GStreamer (X11 only)
764 #-------------------------------------------------------------------------------
765 # check SQL drivers, mouse drivers and decorations available in this package
766 #-------------------------------------------------------------------------------
768 # opensource version removes some drivers, so force them to be off
774 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
775 for a in "$relpath/src/plugins/sqldrivers/"*; do
778 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
779 eval "CFG_SQL_${base_a}=auto"
784 CFG_DECORATION_PLUGIN_AVAILABLE=
785 if [ -d "$relpath/src/plugins/decorations" ]; then
786 for a in "$relpath/src/plugins/decorations/"*; do
789 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
794 CFG_KBD_PLUGIN_AVAILABLE=
795 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
796 for a in "$relpath/src/plugins/kbddrivers/"*; do
799 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
804 CFG_MOUSE_PLUGIN_AVAILABLE=
805 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
806 for a in "$relpath/src/plugins/mousedrivers/"*; do
809 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
814 CFG_GFX_PLUGIN_AVAILABLE=
815 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
816 for a in "$relpath/src/plugins/gfxdrivers/"*; do
819 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
822 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
825 #-------------------------------------------------------------------------------
826 # parse command line arguments
827 #-------------------------------------------------------------------------------
829 # parse the arguments, setting things to "yes" or "no"
830 while [ "$#" -gt 0 ]; do
834 #Autoconf style options
836 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
840 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
844 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
845 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
848 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
852 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
856 -no-*-*|-plugin-*-*|-qt-*-*)
857 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
858 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
862 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
865 #Qt style yes options
866 -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xshape|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-svg|-webkit|-scripttools|-rpath|-force-pkg-config)
867 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
870 #Qt style options that pass an argument
872 if [ "$PLATFORM_QWS" = "yes" ]; then
874 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
881 -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config)
882 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
886 #Qt style complex options in one command
887 -enable-*|-disable-*)
888 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
889 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
891 #Qt Builtin/System style options
892 -no-*|-system-*|-qt-*)
893 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
894 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
896 #Options that cannot be generalized
903 # this option may or may not be followed by an argument
904 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
913 # this option may or may not be followed by an argument
914 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
922 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
923 # this option may or may not be followed by an argument
924 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
933 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
937 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
956 if [ "$1" = "-D" ]; then
960 VAL=`echo $1 | sed 's,-D,,'`
965 if [ "$1" = "-I" ]; then
969 VAL=`echo $1 | sed 's,-I,,'`
974 if [ "$1" = "-L" ]; then
978 VAL=`echo $1 | sed 's,-L,,'`
983 if [ "$1" = "-R" ]; then
987 VAL=`echo $1 | sed 's,-R,,'`
992 VAL=`echo $1 | sed 's,-l,,'`
996 if [ "$1" = "-F" ]; then
1000 VAL=`echo $1 | sed 's,-F,,'`
1005 if [ "$1" = "-fw" ]; then
1009 VAL=`echo $1 | sed 's,-fw,,'`
1013 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1020 if [ "$UNKNOWN_ARG" = "yes" ]; then
1021 echo "$1: unknown argument"
1032 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1033 CFG_QT3SUPPORT="$VAL"
1039 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1040 CFG_ACCESSIBILITY="$VAL"
1049 CFG_USE_GNUMAKE="$VAL"
1052 CFG_MYSQL_CONFIG="$VAL"
1055 QT_INSTALL_PREFIX="$VAL"
1058 QT_HOST_PREFIX="$VAL"
1061 QT_FORCE_PKGCONFIG=yes
1064 QT_INSTALL_DOCS="$VAL"
1067 QT_INSTALL_HEADERS="$VAL"
1070 QT_INSTALL_PLUGINS="$VAL"
1073 QT_INSTALL_DATA="$VAL"
1076 QT_INSTALL_LIBS="$VAL"
1085 QT_INSTALL_TRANSLATIONS="$VAL"
1087 sysconfdir|settingsdir)
1088 QT_INSTALL_SETTINGS="$VAL"
1091 QT_INSTALL_EXAMPLES="$VAL"
1094 QT_INSTALL_DEMOS="$VAL"
1100 QT_INSTALL_BINS="$VAL"
1103 CFG_USER_BUILD_KEY="$VAL"
1110 if [ "$PLATFORM_QWS" != "no" ]; then
1111 if [ "$PLATFORM_QWS" = "maybe" ]; then
1117 echo "No license exists to enable Qt for Embedded Linux. Disabling."
1122 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1129 if [ "$VAL" = "little" ]; then
1130 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1131 elif [ "$VAL" = "big" ]; then
1132 CFG_ENDIAN="Q_BIG_ENDIAN"
1138 if [ "$VAL" = "little" ]; then
1139 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1140 elif [ "$VAL" = "big" ]; then
1141 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1147 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1154 CFG_QWS_DEPTHS="$VAL"
1157 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1158 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1159 [ "$VAL" = "es1cl" ] || [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
1166 if [ "$PLATFORM_QWS" = "yes" ]; then
1167 echo "Error: Graphics System plugins are not supported on QWS."
1168 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1169 echo " rather than existing as a separate plugin."
1173 if [ "$VAL" = "opengl" ]; then
1174 CFG_GRAPHICS_SYSTEM="opengl"
1175 elif [ "$VAL" = "raster" ]; then
1176 CFG_GRAPHICS_SYSTEM="raster"
1183 qvfb) # left for commandline compatibility, not documented
1184 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1185 if [ "$VAL" = "yes" ]; then
1186 QMakeVar add gfx-drivers qvfb
1187 QMakeVar add kbd-drivers qvfb
1188 QMakeVar add mouse-drivers qvfb
1189 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1190 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1191 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1198 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1201 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1204 if [ "$PLATFORM_MAC" = "yes" ]; then
1206 elif [ "$PLATFORM_QWS" = "yes" ]; then
1209 if [ "$CFG_FRAMEWORK" = "auto" ]; then
1215 if [ "$PLATFORM_MAC" = "yes" ]; then
1222 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1223 CFG_MAC_DWARF2="$VAL"
1229 if [ "$PLATFORM_MAC" = "yes" ]; then
1230 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1239 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1240 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1246 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1247 CFG_MAC_COCOA="$VAL"
1248 COMMANDLINE_MAC_COCOA="$VAL"
1254 if [ "$PLATFORM_MAC" = "yes" ]; then
1255 CFG_FRAMEWORK="$VAL"
1261 if [ "$VAL" = "yes" ]; then
1263 QMakeVar add QMAKE_CFLAGS -pg
1264 QMakeVar add QMAKE_CXXFLAGS -pg
1265 QMakeVar add QMAKE_LFLAGS -pg
1266 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1271 exceptions|g++-exceptions)
1272 if [ "$VAL" = "no" ]; then
1274 elif [ "$VAL" = "yes" ]; then
1282 # keep compatibility with old platform names
1288 PLATFORM=hpux-acc-o64
1291 PLATFORM=hpux-acc-64
1294 PLATFORM=hpux-acc-64
1306 PLATFORM=reliant-cds-64
1309 PLATFORM=solaris-cc-64
1312 PLATFORM=solaris-cc-64
1315 PLATFORM=unixware-cc
1318 PLATFORM=unixware-g++
1321 PLATFORM=unixware-cc
1324 PLATFORM=unixware-g++
1330 i386) NATIVE_64_ARCH="x86_64" ;;
1331 powerpc) NATIVE_64_ARCH="ppc64" ;;
1332 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1334 if [ ! -z "$NATIVE_64_ARCH" ]; then
1335 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1336 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1345 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1346 CFG_DEBUG_RELEASE="$VAL"
1352 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1353 CFG_RELEASE_QMAKE="$VAL"
1359 if [ "$VAL" = "yes" ]; then
1361 elif [ "$VAL" = "no" ]; then
1368 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1369 CFG_PREFIX_INSTALL="$VAL"
1377 developer-build|commercial|opensource|nokia-developer)
1378 # These switches have been dealt with already
1381 if [ "$VAL" = "yes" ]; then
1383 elif [ "$VAL" = "no" ]; then
1390 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1391 CFG_INCREMENTAL="$VAL"
1397 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1398 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1404 if [ "$PLATFORM_QWS" = "yes" ]; then
1405 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1406 if [ "$VAL" = "no" ]; then
1407 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1408 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1409 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1418 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1425 [ "$VAL" = "qt" ] && VAL=yes
1426 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1433 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1441 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1448 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1455 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1462 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1469 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1476 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1477 CFG_PRECOMPILE="$VAL"
1482 separate-debug-info)
1483 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1484 CFG_SEPARATE_DEBUG_INFO="$VAL"
1490 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1491 CFG_REDUCE_EXPORTS="$VAL"
1497 if [ "$VAL" = "no" ]; then
1504 if [ "$VAL" = "no" ]; then
1511 if [ "$VAL" = "no" ]; then
1518 if [ "$VAL" = "no" ]; then
1528 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1529 CFG_REDUCE_RELOCATIONS="$VAL"
1535 [ "$VAL" = "qt" ] && VAL=yes
1536 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1537 CFG_QWS_FREETYPE="$VAL"
1543 [ "$VAL" = "qt" ] && VAL=yes
1544 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1549 # No longer supported:
1550 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1553 if [ "$VAL" = "system" ]; then
1560 [ "$VAL" = "yes" ] && VAL=qt
1561 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1568 [ "$VAL" = "yes" ] && VAL=qt
1569 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1576 [ "$VAL" = "yes" ] && VAL=qt
1577 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1584 [ "$VAL" = "yes" ] && VAL=qt
1585 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1592 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1599 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1606 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1613 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1620 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1627 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1634 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1635 CFG_FONTCONFIG="$VAL"
1641 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1648 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1655 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1662 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1669 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1670 CFG_GSTREAMER="$VAL"
1676 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1677 CFG_QGTKSTYLE="$VAL"
1683 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1685 elif [ "$VAL" = "runtime" ]; then
1692 if [ "$VAL" = "yes" ]; then
1699 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1706 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1707 CFG_LARGEFILE="$VAL"
1713 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1720 if [ "$VAL" = "yes" ]; then
1721 CFG_OPENSSL="linked"
1727 if [ "$VAL" = "yes" ]; then
1735 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1736 CFG_XMLPATTERNS="yes"
1738 if [ "$VAL" = "no" ]; then
1739 CFG_XMLPATTERNS="no"
1746 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1747 CFG_SCRIPTTOOLS="yes"
1749 if [ "$VAL" = "no" ]; then
1750 CFG_SCRIPTTOOLS="no"
1757 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1760 if [ "$VAL" = "no" ]; then
1768 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1771 if [ "$VAL" = "no" ]; then
1779 if [ "$VAL" = "yes" ]; then
1780 OPT_CONFIRM_LICENSE="$VAL"
1786 if [ "$VAL" = "yes" ]; then
1792 sql-*|gfx-*|decoration-*|kbd-*|mouse-*)
1793 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1794 # if autoconf style options were used, $VAL can be "yes" or "no"
1795 [ "$VAL" = "yes" ] && VAL=qt
1796 # now $VAL should be "no", "qt", or "plugin"... double-check
1797 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1800 # now $VAL is "no", "qt", or "plugin"
1802 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1803 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1805 # Grab the available values
1808 avail="$CFG_SQL_AVAILABLE"
1811 avail="$CFG_GFX_AVAILABLE"
1812 if [ "$OPT" = "plugin" ]; then
1813 avail="$CFG_GFX_PLUGIN_AVAILABLE"
1817 avail="$CFG_DECORATION_AVAILABLE"
1818 if [ "$OPT" = "plugin" ]; then
1819 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
1823 avail="$CFG_KBD_AVAILABLE"
1824 if [ "$OPT" = "plugin" ]; then
1825 avail="$CFG_KBD_PLUGIN_AVAILABLE"
1829 avail="$CFG_MOUSE_AVAILABLE"
1830 if [ "$OPT" = "plugin" ]; then
1831 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
1836 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1840 # Check that that user's value is available.
1843 if [ "$VAL" = "$d" ]; then
1848 [ "$found" = yes ] || ERROR=yes
1850 if [ "$VAR" = "sql" ]; then
1851 # set the CFG_SQL_driver
1852 eval "CFG_SQL_$VAL=\$OPT"
1856 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1857 if [ "$OPT" = "plugin" ]; then
1858 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
1859 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
1860 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
1861 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
1862 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
1863 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
1864 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
1865 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
1868 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
1869 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
1870 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
1871 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
1872 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
1876 QMakeVar add "${VAR}s" "${VAL}"
1877 elif [ "$OPT" = "no" ]; then
1878 PLUG_VAR="${VAR}-plugin"
1879 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
1880 IN_VAR="${VAR}-driver"
1884 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
1885 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
1886 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
1887 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
1888 QMakeVar del "${IN_VAR}s" "$VAL"
1889 QMakeVar del "${PLUG_VAR}s" "$VAL"
1891 if [ "$ERROR" = "yes" ]; then
1892 echo "$CURRENT_OPT: unknown argument"
1897 if [ "$VAL" = "yes" ]; then
1898 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1899 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1903 elif [ "$VAL" = "no" ]; then
1904 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1905 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1914 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1921 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1928 D_FLAGS="$D_FLAGS \"$VAL\""
1931 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1934 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1937 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1940 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1943 if [ "$PLATFORM_MAC" = "yes" ]; then
1944 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1945 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1951 if [ "$PLATFORM_MAC" = "yes" ]; then
1952 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1961 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1968 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1969 CFG_PHONON_BACKEND="$VAL"
1978 if [ "$UNKNOWN_OPT" = "yes" ]; then
1979 echo "${CURRENT_OPT}: invalid command-line switch"
1985 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
1986 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
1990 # update QT_CONFIG to show our current predefined configuration
1991 case "$CFG_QCONFIG" in
1992 minimal|small|medium|large|full)
1993 # these are a sequence of increasing functionality
1994 for c in minimal small medium large full; do
1995 QT_CONFIG="$QT_CONFIG $c-config"
1996 [ "$CFG_QCONFIG" = $c ] && break
2000 # not known to be sufficient for anything
2001 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ]; then
2002 echo >&2 "Error: configuration file not found:"
2003 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2008 #-------------------------------------------------------------------------------
2009 # build tree initialization
2010 #-------------------------------------------------------------------------------
2012 # where to find which..
2013 unixtests="$relpath/config.tests/unix"
2014 mactests="$relpath/config.tests/mac"
2015 WHICH="$unixtests/which.test"
2017 PERL=`$WHICH perl 2>/dev/null`
2019 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2021 for e in gawk nawk awk; do
2022 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2028 ### skip this if the user just needs help...
2029 if [ "$OPT_HELP" != "yes" ]; then
2031 # is this a shadow build?
2032 if [ "$OPT_SHADOW" = "maybe" ]; then
2034 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2035 if [ -h "$outpath" ]; then
2036 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2042 if [ "$OPT_SHADOW" = "yes" ]; then
2043 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" ]; then
2044 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2045 echo >&2 "Cannot proceed."
2048 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2051 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2053 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2054 echo "By default, Qt is built in release mode with separate debug information, so"
2055 echo "-debug-and-release is not necessary anymore"
2059 # detect build style
2060 if [ "$CFG_DEBUG" = "auto" ]; then
2061 if [ "$PLATFORM_MAC" = "yes" ]; then
2062 CFG_DEBUG_RELEASE=yes
2064 elif [ "$CFG_DEV" = "yes" ]; then
2065 CFG_DEBUG_RELEASE=no
2068 CFG_DEBUG_RELEASE=no
2072 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2073 QMAKE_CONFIG="$QMAKE_CONFIG build_all"
2076 if [ "$CFG_SILENT" = "yes" ]; then
2077 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2080 # if the source tree is different from the build tree,
2081 # symlink or copy part of the sources
2082 if [ "$OPT_SHADOW" = "yes" ]; then
2083 echo "Preparing build tree..."
2085 if [ -z "$PERL" ]; then
2087 echo "You need perl in your PATH to make a shadow build."
2088 echo "Cannot proceed."
2092 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2094 # symlink the qmake directory
2095 find "$relpath/qmake" | while read a; do
2096 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2097 if [ '!' -f "$my_a" ]; then
2098 if [ -d "$a" ]; then
2099 # directories are created...
2102 a_dir=`dirname "$my_a"`
2103 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2104 # ... and files are symlinked
2105 case `basename "$a"` in
2106 *.o|*.d|GNUmakefile*|qmake)
2117 # make a syncqt script that can be used in the shadow
2118 rm -f "$outpath/bin/syncqt"
2119 if [ -x "$relpath/bin/syncqt" ]; then
2120 mkdir -p "$outpath/bin"
2121 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2122 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
2123 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" $*" >>"$outpath/bin/syncqt"
2124 chmod 755 "$outpath/bin/syncqt"
2127 # symlink the mkspecs directory
2128 mkdir -p "$outpath/mkspecs"
2129 rm -f "$outpath"/mkspecs/*
2130 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2131 rm -f "$outpath/mkspecs/default"
2133 # symlink the doc directory
2134 rm -rf "$outpath/doc"
2135 ln -s "$relpath/doc" "$outpath/doc"
2137 # make sure q3porting.xml can be found
2138 mkdir -p "$outpath/tools/porting/src"
2139 rm -f "$outpath/tools/porting/src/q3porting.xml"
2140 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2143 # symlink files from src/gui/embedded neccessary to build qvfb
2144 if [ "$CFG_DEV" = "yes" ]; then
2145 for f in qvfbhdr.h qlock_p.h qlock.cpp qwssignalhandler_p.h qwssignalhandler.cpp; do
2146 dest="${relpath}/tools/qvfb/${f}"
2148 ln -s "${relpath}/src/gui/embedded/${f}" "${dest}"
2152 # symlink fonts to be able to run application from build directory
2153 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then
2154 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2155 mkdir -p "${outpath}/lib"
2156 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2160 if [ "$OPT_FAST" = "auto" ]; then
2161 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2168 # find a make command
2169 if [ -z "$MAKE" ]; then
2171 for mk in gmake make; do
2172 if "$WHICH" $mk >/dev/null 2>&1; then
2177 if [ -z "$MAKE" ]; then
2178 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2179 echo >&2 "Cannot proceed."
2186 #-------------------------------------------------------------------------------
2187 # auto-detect all that hasn't been specified in the arguments
2188 #-------------------------------------------------------------------------------
2190 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2191 if [ "$CFG_EMBEDDED" != "no" ]; then
2192 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2194 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2195 if [ -z "$XPLATFORM" ]; then
2196 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2197 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2201 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2202 if [ -z "$XPLATFORM" ]; then
2203 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2204 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2208 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2209 if [ -z "$XPLATFORM" ]; then
2210 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2211 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2215 if [ -z "$PLATFORM" ]; then
2216 case "$UNAME_MACHINE" in
2218 PLATFORM=qws/linux-x86-g++
2221 PLATFORM=qws/linux-x86_64-g++
2224 PLATFORM=qws/linux-ppc-g++
2227 PLATFORM=qws/linux-generic-g++
2231 if [ -z "$XPLATFORM" ]; then
2232 if [ "$CFG_EMBEDDED" = "auto" ]; then
2233 if [ -n "$CFG_ARCH" ]; then
2234 CFG_EMBEDDED=$CFG_ARCH
2236 case "$UNAME_MACHINE" in
2247 CFG_EMBEDDED=generic
2252 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2259 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2265 if [ -z "$PLATFORM" ]; then
2267 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2269 if [ "$PLATFORM_MAC" = "yes" ]; then
2271 # PLATFORM=macx-xcode
2278 #PLATFORM=aix-g++-64
2280 #PLATFORM=aix-xlc-64
2282 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2292 # PLATFORM=dynix-g++
2298 PLATFORM=freebsd-g++
2300 - Also available for FreeBSD: freebsd-icc
2304 PLATFORM=openbsd-g++
2315 #PLATFORM=irix-cc-64
2317 - Also available for IRIX: irix-g++ irix-cc-64
2321 case "$UNAME_MACHINE" in
2323 #PLATFORM=hpuxi-acc-32
2324 PLATFORM=hpuxi-acc-64
2326 - Also available for HP-UXi: hpuxi-acc-32
2332 #PLATFORM=hpux-acc-64
2334 #PLATFORM=hpux-acc-o64
2336 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2345 - Also available for Tru64: tru64-g++
2349 case "$UNAME_MACHINE" in
2351 PLATFORM=linux-g++-64
2358 - Also available for Linux: linux-kcc linux-icc linux-cxx
2362 #PLATFORM=solaris-g++
2364 #PLATFORM=solaris-cc64
2366 - Also available for Solaris: solaris-g++ solaris-cc-64
2369 ReliantUNIX-*:*|SINIX-*:*)
2370 PLATFORM=reliant-cds
2371 #PLATFORM=reliant-cds-64
2373 - Also available for Reliant UNIX: reliant-cds-64
2383 #PLATFORM=unixware-g++
2384 PLATFORM=unixware-cc
2386 - Also available for OpenUNIX: unixware-g++
2390 #PLATFORM=unixware-g++
2391 PLATFORM=unixware-cc
2393 - Also available for UnixWare: unixware-g++
2400 - Also available for SCO OpenServer: sco-g++
2404 PLATFORM=unixware-g++
2407 if [ "$OPT_HELP" != "yes" ]; then
2409 for p in $PLATFORMS; do
2410 echo " $relconf $* -platform $p"
2413 echo " The build script does not currently recognize all" >&2
2414 echo " platforms supported by Qt." >&2
2415 echo " Rerun this script with a -platform option listed to" >&2
2416 echo " set the system/compiler combination you use." >&2
2423 if [ "$PLATFORM_QWS" = "yes" ]; then
2425 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2427 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2430 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2431 if [ -d "$PLATFORM" ]; then
2432 QMAKESPEC="$PLATFORM"
2434 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2436 if [ -d "$XPLATFORM" ]; then
2437 XQMAKESPEC="$XPLATFORM"
2439 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2441 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2442 QT_CROSS_COMPILE=yes
2443 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2446 if [ "$PLATFORM_MAC" = "yes" ]; then
2447 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2449 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2450 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2451 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2452 echo " built with 'macx-g++'" >&2
2458 # check specified platforms are supported
2459 if [ '!' -d "$QMAKESPEC" ]; then
2461 echo " The specified system/compiler is not supported:"
2465 echo " Please see the README file for a complete list."
2469 if [ '!' -d "$XQMAKESPEC" ]; then
2471 echo " The specified system/compiler is not supported:"
2475 echo " Please see the README file for a complete list."
2479 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2481 echo " The specified system/compiler port is not complete:"
2483 echo " $XQMAKESPEC/qplatformdefs.h"
2485 echo " Please contact qt-bugs@trolltech.com."
2490 # now look at the configs and figure out what platform we are config'd for
2491 [ "$CFG_EMBEDDED" = "no" ] \
2492 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2494 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2496 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2497 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2498 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2499 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2500 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2504 #-------------------------------------------------------------------------------
2505 # determine the system architecture
2506 #-------------------------------------------------------------------------------
2507 if [ "$OPT_VERBOSE" = "yes" ]; then
2508 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2511 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2512 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2514 echo "You have specified a target architecture with -embedded and -arch."
2515 echo "The two architectures you have specified are different, so we can"
2516 echo "not proceed. Either set both to be the same, or only use -embedded."
2522 if [ -z "${CFG_HOST_ARCH}" ]; then
2523 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2525 CFG_HOST_ARCH=`uname -p`
2526 if [ "$OPT_VERBOSE" = "yes" ]; then
2527 echo " SGI ($CFG_HOST_ARCH)"
2531 case "$UNAME_MACHINE" in
2533 if [ "$OPT_VERBOSE" = "yes" ]; then
2534 echo " Sun SPARC (sparc)"
2541 if [ "$OPT_VERBOSE" = "yes" ]; then
2542 echo " 64-bit AMD 80x86 (x86_64)"
2544 CFG_HOST_ARCH=x86_64
2547 if [ "$OPT_VERBOSE" = "yes" ]; then
2548 echo " 32-bit Intel 80x86 (i386)"
2556 case "$UNAME_MACHINE" in
2558 if [ "$OPT_VERBOSE" = "yes" ]; then
2559 echo " 32-bit Apple PowerPC (powerpc)"
2563 if [ "$OPT_VERBOSE" = "yes" ]; then
2564 echo " 32-bit Intel 80x86 (i386)"
2568 CFG_HOST_ARCH=macosx
2571 if [ "$OPT_VERBOSE" = "yes" ]; then
2572 echo " 64-bit IBM PowerPC (powerpc)"
2574 CFG_HOST_ARCH=powerpc
2577 if [ "$OPT_VERBOSE" = "yes" ]; then
2578 echo " HP PA-RISC (parisc)"
2580 CFG_HOST_ARCH=parisc
2583 if [ "$OPT_VERBOSE" = "yes" ]; then
2584 echo " 32-bit Intel 80x86 (i386)"
2588 *:*:x86_64|*:*:amd64)
2589 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2590 if [ "$OPT_VERBOSE" = "yes" ]; then
2591 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2595 if [ "$OPT_VERBOSE" = "yes" ]; then
2596 echo " 64-bit AMD 80x86 (x86_64)"
2598 CFG_HOST_ARCH=x86_64
2602 if [ "$OPT_VERBOSE" = "yes" ]; then
2603 echo " 32-bit PowerPC (powerpc)"
2605 CFG_HOST_ARCH=powerpc
2608 if [ "$OPT_VERBOSE" = "yes" ]; then
2609 echo " 64-bit PowerPC (powerpc)"
2611 CFG_HOST_ARCH=powerpc
2614 if [ "$OPT_VERBOSE" = "yes" ]; then
2615 echo " IBM S/390 (s390)"
2620 if [ "$OPT_VERBOSE" = "yes" ]; then
2626 if [ "$OPT_VERBOSE" = "yes" ]; then
2627 echo " Linux on SPARC"
2632 if [ "$OPT_VERBOSE" = "yes" ]; then
2633 echo " Trying '$UNAME_MACHINE'..."
2635 CFG_HOST_ARCH="$UNAME_MACHINE"
2640 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2641 if [ -n "$CFG_ARCH" ]; then
2642 CFG_EMBEDDED=$CFG_ARCH
2645 case "$CFG_EMBEDDED" in
2665 CFG_ARCH="$CFG_EMBEDDED"
2668 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2669 CFG_ARCH=$CFG_HOST_ARCH
2672 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
2673 if [ "$OPT_VERBOSE" = "yes" ]; then
2674 echo " '$CFG_ARCH' is supported"
2677 if [ "$OPT_VERBOSE" = "yes" ]; then
2678 echo " '$CFG_ARCH' is unsupported, using 'generic'"
2682 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
2683 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
2684 if [ "$OPT_VERBOSE" = "yes" ]; then
2685 echo " '$CFG_HOST_ARCH' is supported"
2688 if [ "$OPT_VERBOSE" = "yes" ]; then
2689 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
2691 CFG_HOST_ARCH=generic
2695 if [ "$OPT_VERBOSE" = "yes" ]; then
2696 echo "System architecture: '$CFG_ARCH'"
2697 if [ "$PLATFORM_QWS" = "yes" ]; then
2698 echo "Host architecture: '$CFG_HOST_ARCH'"
2702 #-------------------------------------------------------------------------------
2703 # tests that don't need qmake (must be run before displaying help)
2704 #-------------------------------------------------------------------------------
2706 if [ -z "$PKG_CONFIG" ]; then
2707 # See if PKG_CONFIG is set in the mkspec:
2708 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
2710 if [ -z "$PKG_CONFIG" ]; then
2711 PKG_CONFIG=`$WHICH pkg-config 2>/dev/null`
2714 # Work out if we can use pkg-config
2715 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2716 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2718 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2719 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2720 echo >&2 "environment!"
2722 if [ -z "$PKG_CONFIG_PATH" ]; then
2724 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2725 echo >&2 "the host compiler's .pc files will be used. This is probably"
2726 echo >&2 "not what you want."
2728 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2730 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2731 echo >&2 "been set. This means your toolchain's .pc files must contain"
2732 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2733 echo >&2 "tests are failing, please check these files."
2741 # process CFG_MAC_ARCHS
2742 if [ "$PLATFORM_MAC" = "yes" ]; then
2743 # check -arch arguments for validity.
2744 ALLOWED="x86 ppc x86_64 ppc64 i386"
2745 # Save the list so we can re-write it using only valid values
2746 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
2748 for i in $CFG_MAC_ARCHS_IN
2750 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
2751 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
2754 if [ "$i" = "i386" -o "$i" = "x86" ]; then
2755 # These are synonymous values
2756 # CFG_MAC_ARCHS requires x86 while GCC requires i386
2757 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
2758 MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch i386"
2760 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
2761 MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch $i"
2766 # find the default framework value
2767 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2768 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2769 CFG_FRAMEWORK="$CFG_SHARED"
2770 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2772 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2780 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
2782 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
2784 # auto-detect precompiled header support
2785 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2786 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2788 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2793 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2795 echo "WARNING: Using universal binaries disables precompiled headers."
2800 #auto-detect DWARF2 on the mac
2801 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "auto" ]; then
2802 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2809 # auto-detect support for -Xarch on the mac
2810 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" == "auto" ]; then
2811 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2818 # don't autodetect support for separate debug info on objcopy when
2819 # cross-compiling as lots of toolchains seems to have problems with this
2820 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2821 CFG_SEPARATE_DEBUG_INFO="no"
2824 # auto-detect support for separate debug info in objcopy
2825 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2826 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_].*=%%p' | tr '\n' ' '`
2827 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_].*=%%p' | tr '\n' ' '`
2828 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
2829 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2830 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2831 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2832 CFG_SEPARATE_DEBUG_INFO=no
2836 # binutils on HP-UX is buggy; default to no.
2837 CFG_SEPARATE_DEBUG_INFO=no
2840 CFG_SEPARATE_DEBUG_INFO=yes
2846 # auto-detect -fvisibility support
2847 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2848 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2849 CFG_REDUCE_EXPORTS=no
2851 CFG_REDUCE_EXPORTS=yes
2855 # detect the availability of the -Bsymbolic-functions linker optimization
2856 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2857 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2858 CFG_REDUCE_RELOCATIONS=no
2860 CFG_REDUCE_RELOCATIONS=yes
2864 # auto-detect GNU make support
2865 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2869 # If -opengl wasn't specified, don't try to auto-detect
2870 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
2875 if [ "$PLATFORM_MAC" = "yes" ]; then
2876 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
2881 # find the default framework value
2882 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2883 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2884 CFG_FRAMEWORK="$CFG_SHARED"
2885 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2887 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2895 # x11 tests are done after qmake is built
2898 #setup the build parts
2899 if [ -z "$CFG_BUILD_PARTS" ]; then
2900 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2902 # don't build tools by default when cross-compiling
2903 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2904 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2907 for nobuild in $CFG_NOBUILD_PARTS; do
2908 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2910 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2912 # echo "WARNING: libs is a required part of the build."
2914 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2917 #-------------------------------------------------------------------------------
2918 # post process QT_INSTALL_* variables
2919 #-------------------------------------------------------------------------------
2922 if [ -z "$QT_INSTALL_PREFIX" ]; then
2923 if [ "$CFG_DEV" = "yes" ]; then
2924 QT_INSTALL_PREFIX="$outpath" # In Qt Development, we use sandboxed builds by default
2925 elif [ "$PLATFORM_QWS" = "yes" ]; then
2926 QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
2927 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2928 QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
2931 QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
2934 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2937 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2938 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2939 if [ "$PLATFORM_MAC" = "yes" ]; then
2940 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2943 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2946 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2949 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2950 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2951 if [ "$PLATFORM_MAC" = "yes" ]; then
2952 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2957 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2960 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2963 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2964 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2965 if [ "$PLATFORM_MAC" = "yes" ]; then
2966 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2967 QT_INSTALL_LIBS="/Libraries/Frameworks"
2971 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2973 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2976 if [ -z "$QT_INSTALL_BINS" ]; then #default
2977 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2978 if [ "$PLATFORM_MAC" = "yes" ]; then
2979 QT_INSTALL_BINS="/Developer/Applications/Qt"
2982 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2985 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2988 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2989 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2990 if [ "$PLATFORM_MAC" = "yes" ]; then
2991 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2994 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2996 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2999 if [ -z "$QT_INSTALL_DATA" ]; then #default
3000 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3002 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3005 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3006 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3008 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3011 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3012 if [ "$PLATFORM_MAC" = "yes" ]; then
3013 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3015 QT_INSTALL_SETTINGS=/etc/xdg
3018 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3021 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3022 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3023 if [ "$PLATFORM_MAC" = "yes" ]; then
3024 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3027 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3029 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3032 if [ -z "$QT_INSTALL_DEMOS" ]; then #default
3033 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3034 if [ "$PLATFORM_MAC" = "yes" ]; then
3035 QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos"
3038 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos"
3040 QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
3042 #-------------------------------------------------------------------------------
3043 # help - interactive parts of the script _after_ this section please
3044 #-------------------------------------------------------------------------------
3046 # next, emit a usage message if something failed.
3047 if [ "$OPT_HELP" = "yes" ]; then
3048 [ "x$ERROR" = "xyes" ] && echo
3049 if [ "$CFG_NIS" = "no" ]; then
3056 if [ "$CFG_CUPS" = "no" ]; then
3063 if [ "$CFG_ICONV" = "no" ]; then
3070 if [ "$CFG_LARGEFILE" = "no" ]; then
3077 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3084 if [ "$CFG_IPV6" = "auto" ]; then
3088 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3097 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3098 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
3099 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3100 [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
3101 [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3102 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3103 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3104 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3105 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3106 [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3107 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3108 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3109 [-no-make <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3110 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3111 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
3112 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3113 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3114 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3115 [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3116 [-no-openssl] [-openssl] [-openssl-linked]
3117 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit]
3118 [-no-scripttools] [-scripttools]
3120 [additional platform specific options (see below)]
3123 Installation options:
3125 These are optional, but you may specify install directories.
3127 -prefix <dir> ...... This will install everything relative to <dir>
3128 (default $QT_INSTALL_PREFIX)
3130 if [ "$PLATFORM_QWS" = "yes" ]; then
3133 -hostprefix [dir] .. Tools and libraries needed when developing
3134 applications are installed in [dir]. If [dir] is
3135 not given, the current build directory will be used.
3140 * -prefix-install .... Force a sandboxed "local" installation of
3141 Qt. This will install into
3142 $QT_INSTALL_PREFIX, if this option is
3143 disabled then some platforms will attempt a
3144 "system" install by placing default values to
3145 be placed in a system location other than
3148 You may use these to separate different parts of the install:
3150 -bindir <dir> ......... Executables will be installed to <dir>
3151 (default PREFIX/bin)
3152 -libdir <dir> ......... Libraries will be installed to <dir>
3153 (default PREFIX/lib)
3154 -docdir <dir> ......... Documentation will be installed to <dir>
3155 (default PREFIX/doc)
3156 -headerdir <dir> ...... Headers will be installed to <dir>
3157 (default PREFIX/include)
3158 -plugindir <dir> ...... Plugins will be installed to <dir>
3159 (default PREFIX/plugins)
3160 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3162 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3163 (default PREFIX/translations)
3164 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3165 (default PREFIX/etc/settings)
3166 -examplesdir <dir> .... Examples will be installed to <dir>
3167 (default PREFIX/examples)
3168 -demosdir <dir> ....... Demos will be installed to <dir>
3169 (default PREFIX/demos)
3171 You may use these options to turn on strict plugin loading.
3173 -buildkey <key> .... Build the Qt library and plugins using the specified
3174 <key>. When the library loads plugins, it will only
3175 load those that have a matching key.
3179 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3180 that needs to be evaluated. If the evaluation succeeds, the feature is
3181 included. Here is a short explanation of each option:
3183 * -release ........... Compile and link Qt with debugging turned off.
3184 -debug ............. Compile and link Qt with debugging turned on.
3185 -debug-and-release . Compile and link two versions of Qt, with and without
3186 debugging turned on (Mac only).
3188 -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting)
3190 -opensource......... Compile and link the Open-Source Edition of Qt.
3191 -commercial......... Compile and link the Commercial Edition of Qt.
3194 * -shared ............ Create and use shared Qt libraries.
3195 -static ............ Create and use static Qt libraries.
3197 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3199 -fast .............. Configure Qt quickly by generating Makefiles only for
3200 library and subdirectory targets. All other Makefiles
3201 are created as wrappers, which will in turn run qmake.
3203 -no-largefile ...... Disables large file support.
3204 + -largefile ......... Enables Qt to access files larger than 4 GB.
3207 if [ "$PLATFORM_QWS" = "yes" ]; then
3214 if [ "$CFG_DBUS" = "no" ]; then
3223 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3224 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3226 -no-accessibility .. Do not compile Accessibility support.
3227 * -accessibility ..... Compile Accessibility support.
3229 $SHN -no-stl ............ Do not compile STL support.
3230 $SHY -stl ............... Compile STL support.
3232 -no-sql-<driver> ... Disable SQL <driver> entirely.
3233 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3235 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3238 Possible values for <driver>:
3239 [ $CFG_SQL_AVAILABLE ]
3241 -system-sqlite ..... Use sqlite from the operating system.
3243 -no-qt3support ..... Disables the Qt 3 support functionality.
3244 * -qt3support ........ Enables the Qt 3 support functionality.
3246 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3247 + -xmlpatterns ....... Build the QtXmlPatterns module.
3248 QtXmlPatterns is built if a decent C++ compiler
3249 is used and exceptions are enabled.
3251 -no-phonon ......... Do not build the Phonon module.
3252 + -phonon ............ Build the Phonon module.
3253 Phonon is built if a decent C++ compiler is used.
3254 -no-phonon-backend.. Do not build the platform phonon plugin.
3255 + -phonon-backend..... Build the platform phonon plugin.
3257 -no-svg ............ Do not build the SVG module.
3258 + -svg ............... Build the SVG module.
3260 -no-webkit ......... Do not build the WebKit module.
3261 + -webkit ............ Build the WebKit module.
3262 WebKit is built if a decent C++ compiler is used.
3264 -no-scripttools .... Do not build the QtScriptTools module.
3265 + -scripttools ....... Build the QtScriptTools module.
3267 -platform target ... The operating system and compiler you are building
3270 See the README file for a list of supported
3271 operating systems and compilers.
3273 if [ "${PLATFORM_QWS}" != "yes" ]; then
3275 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3276 raster - Software rasterizer
3277 opengl - Rendering via OpenGL, Experimental!
3282 -no-mmx ............ Do not compile with use of MMX instructions.
3283 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3284 -no-sse ............ Do not compile with use of SSE instructions.
3285 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3287 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3288 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3290 -D <string> ........ Add an explicit define to the preprocessor.
3291 -I <string> ........ Add an explicit include path.
3292 -L <string> ........ Add an explicit library path.
3294 -help, -h .......... Display this information.
3296 Third Party Libraries:
3298 -qt-zlib ........... Use the zlib bundled with Qt.
3299 + -system-zlib ....... Use zlib from the operating system.
3300 See http://www.gzip.org/zlib
3302 -no-gif ............ Do not compile the plugin for GIF reading support.
3303 * -qt-gif ............ Compile the plugin for GIF reading support.
3304 See also src/plugins/imageformats/gif/qgifhandler.h
3306 -no-libtiff ........ Do not compile the plugin for TIFF support.
3307 -qt-libtiff ........ Use the libtiff bundled with Qt.
3308 + -system-libtiff .... Use libtiff from the operating system.
3309 See http://www.libtiff.org
3311 -no-libpng ......... Do not compile in PNG support.
3312 -qt-libpng ......... Use the libpng bundled with Qt.
3313 + -system-libpng ..... Use libpng from the operating system.
3314 See http://www.libpng.org/pub/png
3316 -no-libmng ......... Do not compile the plugin for MNG support.
3317 -qt-libmng ......... Use the libmng bundled with Qt.
3318 + -system-libmng ..... Use libmng from the operating system.
3319 See http://www.libmng.com
3321 -no-libjpeg ........ Do not compile the plugin for JPEG support.
3322 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3323 + -system-libjpeg .... Use libjpeg from the operating system.
3324 See http://www.ijg.org
3326 -no-openssl ........ Do not compile support for OpenSSL.
3327 + -openssl ........... Enable run-time OpenSSL support.
3328 -openssl-linked .... Enabled linked OpenSSL support.
3330 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3335 -make <part> ....... Add part to the list of parts to be built at make time.
3336 ($QT_DEFAULT_BUILD_PARTS)
3337 -nomake <part> ..... Exclude part from the list of parts to be built.
3339 -R <string> ........ Add an explicit runtime library path to the Qt
3341 -l <string> ........ Add an explicit library.
3343 -no-rpath .......... Do not use the library install path as a runtime
3345 + -rpath ............. Link Qt libraries and executables using the library
3346 install path as a runtime library path. Equivalent
3347 to -R install_libpath
3349 -continue .......... Continue as far as possible if an error occurs.
3351 -verbose, -v ....... Print verbose information about each step of the
3354 -silent ............ Reduce the build output so that warnings and errors
3355 can be seen more easily.
3357 * -no-optimized-qmake ... Do not build qmake optimized.
3358 -optimized-qmake ...... Build qmake optimized.
3360 $NSN -no-nis ............ Do not compile NIS support.
3361 $NSY -nis ............... Compile NIS support.
3363 $CUN -no-cups ........... Do not compile CUPS support.
3364 $CUY -cups .............. Compile CUPS support.
3365 Requires cups/cups.h and libcups.so.2.
3367 $CIN -no-iconv .......... Do not compile support for iconv(3).
3368 $CIY -iconv ............. Compile support for iconv(3).
3370 $PHN -no-pch ............ Do not use precompiled header support.
3371 $PHY -pch ............... Use precompiled header support.
3373 $DBN -no-dbus ........... Do not compile the QtDBus module.
3374 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3375 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3377 -reduce-relocations ..... Reduce relocations in the libraries through extra
3378 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3379 experimental; needs GNU ld >= 2.18).
3382 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3383 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3390 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3398 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
3402 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3403 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3409 if [ "$PLATFORM_X11" = "yes" ]; then
3410 if [ "$CFG_SM" = "no" ]; then
3417 if [ "$CFG_XSHAPE" = "no" ]; then
3424 if [ "$CFG_XINERAMA" = "no" ]; then
3431 if [ "$CFG_FONTCONFIG" = "no" ]; then
3438 if [ "$CFG_XCURSOR" = "no" ]; then
3445 if [ "$CFG_XFIXES" = "no" ]; then
3452 if [ "$CFG_XRANDR" = "no" ]; then
3459 if [ "$CFG_XRENDER" = "no" ]; then
3466 if [ "$CFG_MITSHM" = "no" ]; then
3473 if [ "$CFG_XINPUT" = "no" ]; then
3480 if [ "$CFG_XKB" = "no" ]; then
3487 if [ "$CFG_IM" = "no" ]; then
3498 -no-gtkstyle ....... Do not build the GTK theme integration.
3499 + -gtkstyle .......... Build the GTK theme integration.
3501 * -no-nas-sound ...... Do not compile in NAS sound support.
3502 -system-nas-sound .. Use NAS libaudio from the operating system.
3503 See http://radscan.com/nas.html
3505 -no-opengl ......... Do not support OpenGL.
3506 + -opengl <api> ...... Enable OpenGL support.
3507 With no parameter, this will auto-detect the "best"
3508 OpenGL API to use. If desktop OpenGL is avaliable, it
3509 will be used. Use desktop, es1, es1cl or es2 for <api>
3510 to force the use of the Desktop (OpenGL 1.x or 2.x),
3511 OpenGL ES 1.x Common profile, 1.x Common Lite profile
3512 or 2.x APIs instead. On X11, the EGL API will be used
3513 to manage GL contexts in the case of OpenGL ES.
3515 $SMN -no-sm ............. Do not support X Session Management.
3516 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3518 $SHN -no-xshape ......... Do not compile XShape support.
3519 $SHY -xshape ............ Compile XShape support.
3520 Requires X11/extensions/shape.h.
3522 $SHN -no-xsync .......... Do not compile XSync support.
3523 $SHY -xsync ............. Compile XSync support.
3524 Requires X11/extensions/sync.h.
3526 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3527 $XAY -xinerama .......... Compile Xinerama support.
3528 Requires X11/extensions/Xinerama.h and libXinerama.
3529 By default, Xinerama support will be compiled if
3530 available and the shared libraries are dynamically
3533 $XCN -no-xcursor ........ Do not compile Xcursor support.
3534 $XCY -xcursor ........... Compile Xcursor support.
3535 Requires X11/Xcursor/Xcursor.h and libXcursor.
3536 By default, Xcursor support will be compiled if
3537 available and the shared libraries are dynamically
3540 $XFN -no-xfixes ......... Do not compile Xfixes support.
3541 $XFY -xfixes ............ Compile Xfixes support.
3542 Requires X11/extensions/Xfixes.h and libXfixes.
3543 By default, Xfixes support will be compiled if
3544 available and the shared libraries are dynamically
3547 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3548 $XZY -xrandr ............ Compile Xrandr support.
3549 Requires X11/extensions/Xrandr.h and libXrandr.
3551 $XRN -no-xrender ........ Do not compile Xrender support.
3552 $XRY -xrender ........... Compile Xrender support.
3553 Requires X11/extensions/Xrender.h and libXrender.
3555 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3556 $XMY -mitshm ............ Compile MIT-SHM support.
3557 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3559 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3560 $FCGY -fontconfig ........ Compile FontConfig support.
3561 Requires fontconfig/fontconfig.h, libfontconfig,
3562 freetype.h and libfreetype.
3564 $XIN -no-xinput.......... Do not compile Xinput support.
3565 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3566 which requires IRIX with wacom.h and libXi or
3567 XFree86 with X11/extensions/XInput.h and libXi.
3569 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3570 $XKY -xkb ............... Compile XKB support.
3575 if [ "$PLATFORM_MAC" = "yes" ]; then
3580 -Fstring ........... Add an explicit framework path.
3581 -fw string ......... Add an explicit framework.
3583 -cocoa ............. Build the Cocoa version of Qt. Note that -no-framework
3584 and -static is not supported with -cocoa. Specifying
3585 this option creates Qt binaries that requires Mac OS X
3588 * -framework ......... Build Qt as a series of frameworks and
3589 link tools against those frameworks.
3590 -no-framework ...... Do not build Qt as a series of frameworks.
3592 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3593 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3595 -universal ......... Equivalent to -arch "ppc x86"
3597 -arch <arch> ....... Build Qt for <arch>
3598 Example values for <arch>: x86 ppc x86_64 ppc64
3599 Multiple -arch arguments can be specified, 64-bit archs
3600 will be built with the Cocoa framework.
3602 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3603 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3608 if [ "$PLATFORM_QWS" = "yes" ]; then
3611 Qt for Embedded Linux only:
3613 -xplatform target ... The target platform when cross-compiling.
3615 -no-feature-<feature> Do not compile in <feature>.
3616 -feature-<feature> .. Compile in <feature>. The available features
3617 are described in src/corelib/global/qfeatures.txt
3619 -embedded <arch> .... This will enable the embedded build, you must have a
3620 proper license for this switch to work.
3621 Example values for <arch>: arm mips x86 generic
3623 -armfpa ............. Target platform is uses the ARM-FPA floating point format.
3624 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3626 The floating point format is usually autodetected by configure. Use this
3627 to override the detected value.
3629 -little-endian ...... Target platform is little endian (LSB first).
3630 -big-endian ......... Target platform is big endian (MSB first).
3632 -host-little-endian . Host platform is little endian (LSB first).
3633 -host-big-endian .... Host platform is big endian (MSB first).
3635 You only need to specify the endianness when
3636 cross-compiling, otherwise the host
3637 endianness will be used.
3639 -no-freetype ........ Do not compile in Freetype2 support.
3640 -qt-freetype ........ Use the libfreetype bundled with Qt.
3641 * -system-freetype .... Use libfreetype from the operating system.
3642 See http://www.freetype.org/
3644 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3645 default ($CFG_QCONFIG).
3647 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3648 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3650 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3651 by default all available decorations are on.
3652 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3653 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3654 linked to at run time.
3655 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3656 -no-decoration-<style> ....Disable decoration <style> entirely.
3657 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3659 -no-opengl .......... Do not support OpenGL.
3660 -opengl <api> ....... Enable OpenGL ES support
3661 With no parameter, this will attempt to auto-detect OpenGL ES 1.x
3662 or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection.
3664 NOTE: A QGLScreen driver for the hardware is required to support
3665 OpenGL ES on Qt for Embedded Linux.
3667 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3668 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3669 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3670 linked to at run time.
3671 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3672 -no-gfx-<driver> ... Disable graphics <driver> entirely.
3673 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3675 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
3676 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3678 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
3680 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
3682 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
3683 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3685 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
3686 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3687 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
3689 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
3690 -no-mouse-<driver> ... Disable mouse <driver> entirely.
3691 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3693 -iwmmxt ............ Compile using the iWMMXt instruction set
3694 (available on some XScale CPUs).
3700 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3701 if [ "$CFG_GLIB" = "no" ]; then
3709 $GBN -no-glib ........... Do not compile Glib support.
3710 $GBY -glib .............. Compile Glib support.
3715 [ "x$ERROR" = "xyes" ] && exit 1
3720 # -----------------------------------------------------------------------------
3721 # LICENSING, INTERACTIVE PART
3722 # -----------------------------------------------------------------------------
3724 if [ "$PLATFORM_QWS" = "yes" ]; then
3725 Platform="Qt for Embedded Linux"
3726 elif [ "$PLATFORM_MAC" = "yes" ]; then
3734 echo "This is the $Platform ${EditionString} Edition."
3737 if [ "$Edition" = "NokiaInternalBuild" ]; then
3738 echo "Detected -nokia-developer option"
3739 echo "Nokia employees and agents are allowed to&n