2 #############################################################################
4 ## Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/legal
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## Commercial License Usage
11 ## Licensees holding valid commercial Qt licenses may use this file in
12 ## accordance with the commercial license agreement provided with the
13 ## Software or, alternatively, in accordance with the terms contained in
14 ## a written agreement between you and Digia. For licensing terms and
15 ## conditions see http://qt.digia.com/licensing. For further information
16 ## use the contact form at http://qt.digia.com/contact-us.
18 ## GNU Lesser General Public License Usage
19 ## Alternatively, this file may be used under the terms of the GNU Lesser
20 ## General Public License version 2.1 as published by the Free Software
21 ## Foundation and appearing in the file LICENSE.LGPL included in the
22 ## packaging of this file. Please review the following information to
23 ## ensure the GNU Lesser General Public License version 2.1 requirements
24 ## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
26 ## In addition, as a special exception, Digia gives you certain additional
27 ## rights. These rights are described in the Digia Qt LGPL Exception
28 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
30 ## GNU General Public License Usage
31 ## Alternatively, this file may be used under the terms of the GNU
32 ## General Public License version 3.0 as published by the Free Software
33 ## Foundation and appearing in the file LICENSE.GPL included in the
34 ## packaging of this file. Please review the following information to
35 ## ensure the GNU General Public License version 3.0 requirements will be
36 ## met: http://www.gnu.org/copyleft/gpl.html.
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 #-------------------------------------------------------------------------------
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
102 echo >&2 "BUG: wrong command to QMakeVar: $1"
106 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
109 # Helper function for getQMakeConf. It parses include statements in
110 # qmake.conf and prints out the expanded file
113 while read line; do case "$line" in
115 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
116 current_dir=`dirname "$1"`
117 conf_file="$current_dir/$inc_file"
118 if [ ! -f "$conf_file" ]; then
119 echo "WARNING: Unable to find file $conf_file" >&2
122 getQMakeConf1 "$conf_file"
131 # relies on $QMAKESPEC being set correctly. parses include statements in
132 # qmake.conf and prints out the expanded file
139 getQMakeConf1 "$tmpSPEC/qmake.conf"
142 # relies on $TEST_COMPILER being set correctly
143 compilerSupportsFlag()
145 cat >conftest.cpp <<EOF
146 int main() { return 0; }
148 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
150 rm -f conftest.cpp conftest.o
154 # relies on $TEST_COMPILER being set correctly
160 safe_flag=`shellEscape "$flag"`
161 lflags=$lflags,$safe_flag
163 compilerSupportsFlag "$lflags" >/dev/null 2>&1
166 #-------------------------------------------------------------------------------
167 # operating system detection
168 #-------------------------------------------------------------------------------
170 # need that throughout the script
171 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
172 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
173 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
174 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
176 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
177 if echo '\c' | grep '\c' >/dev/null; then
183 #-------------------------------------------------------------------------------
184 # window system detection
185 #-------------------------------------------------------------------------------
189 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
195 #-----------------------------------------------------------------------------
196 # Qt version detection
197 #-----------------------------------------------------------------------------
198 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
202 if [ -n "$QT_VERSION" ]; then
203 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
204 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
205 if [ -n "$MAJOR" ]; then
206 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
207 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
208 QT_MAJOR_VERSION="$MAJOR"
209 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
210 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
213 if [ -z "$QT_MAJOR_VERSION" ]; then
214 echo "Cannot process version from qglobal.h: $QT_VERSION"
215 echo "Cannot proceed."
219 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
220 if [ -z "$QT_PACKAGEDATE" ]; then
221 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
222 echo "Cannot proceed"
226 #-------------------------------------------------------------------------------
228 #-------------------------------------------------------------------------------
234 EditionString=Commercial
238 # parse the arguments, setting things to "yes" or "no"
239 while [ "$#" -gt 0 ]; do
243 #Autoconf style options
245 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
249 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
253 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
254 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
257 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
262 # this option may or may not be followed by an argument
263 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
270 -h|help|--help|-help)
271 if [ "$VAL" = "yes" ]; then
273 COMMERCIAL_USER="no" #doesn't matter we will display the help
276 COMMERCIAL_USER="no" #doesn't matter we will display the help
280 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
284 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
291 if [ "$UNKNOWN_ARG" = "yes" ]; then
314 COMMERCIAL_USER="yes"
328 if [ "$COMMERCIAL_USER" = "ask" ]; then
330 echo "Which edition of Qt do you want to use ?"
332 echo "Type 'c' if you want to use the Commercial Edition."
333 echo "Type 'o' if you want to use the Open Source Edition."
337 if [ "$commercial" = "c" ]; then
338 COMMERCIAL_USER="yes"
340 elif [ "$commercial" = "o" ]; then
347 if [ "$CFG_NOKIA" = "yes" ]; then
349 Edition="NokiaInternalBuild"
350 EditionString="Nokia Internal Build"
351 QT_EDITION="QT_EDITION_OPENSOURCE"
352 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
353 elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
354 # Commercial preview release
355 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
358 QT_EDITION="QT_EDITION_DESKTOP"
359 LicenseType="Technology Preview"
360 elif [ $COMMERCIAL_USER = "yes" ]; then
361 # one of commercial editions
362 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
363 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
365 # read in the license file
366 if [ -f "$LICENSE_FILE" ]; then
367 . "$LICENSE_FILE" >/dev/null 2>&1
368 if [ -z "$LicenseKeyExt" ]; then
370 echo "You are using an old license file."
372 echo "Please install the license file supplied by Nokia,"
373 echo "or install the Qt Open Source Edition if you intend to"
374 echo "develop free software."
377 if [ -z "$Licensee" ]; then
379 echo "Invalid license key. Please check the license key."
383 if [ -z "$LicenseKeyExt" ]; then
385 echo $ECHO_N "Please enter your license key: $ECHO_C"
387 Licensee="Unknown user"
392 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
393 && LicenseValid="yes" \
395 if [ "$LicenseValid" != "yes" ]; then
397 echo "Invalid license key. Please check the license key."
400 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
401 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
402 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
403 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
405 # determine which edition we are licensed to use
406 case "$LicenseTypeCode" in
408 LicenseType="Commercial"
412 QT_EDITION="QT_EDITION_UNIVERSAL"
415 Edition="FullFramework"
416 EditionString="Full Framework"
417 QT_EDITION="QT_EDITION_DESKTOP"
420 Edition="GUIFramework"
421 EditionString="GUI Framework"
422 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
427 LicenseType="Evaluation"
428 QMakeVar add DEFINES QT_EVAL
432 QT_EDITION="QT_EDITION_EVALUATION"
437 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
439 echo "Invalid license key. Please check the license key."
443 # verify that we are licensed to use Qt on this platform
445 case "$PlatformCode" in
448 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
452 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
455 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
456 X9,* | XC,* | XU,* | XW,* | XM,*)
458 LICENSE_EXTENSION="-ALLOS"
460 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
461 # Qt for Embedded Linux
462 LICENSE_EXTENSION="-EMBEDDED"
464 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
466 LICENSE_EXTENSION="-EMBEDDED"
468 FM,*,no | LM,yes,* | ZM,no,no)
470 LICENSE_EXTENSION="-DESKTOP"
474 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
475 [ "$PLATFORM_QWS" = "yes" ] && Platform='Embedded Linux'
477 echo "You are not licensed for the $Platform platform."
479 echo "Please contact qt-info@nokia.com to upgrade your license to"
480 echo "include the $Platform platform, or install the Qt Open Source Edition"
481 echo "if you intend to develop free software."
486 if test -r "$relpath/.LICENSE"; then
487 # Generic, non-final license
489 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
494 *TECHNOLOGY?PREVIEW*)
501 echo >&2 "Invalid license files; cannot continue"
506 EditionString="$Edition"
507 QT_EDITION="QT_EDITION_DESKTOP"
510 case "$LicenseFeatureCode" in
513 case "$LicenseType" in
515 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
518 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
524 case "$LicenseType" in
526 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
529 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
535 echo "Invalid license key. Please check the license key."
539 case "$LicenseFeatureCode" in
547 if [ '!' -f "$outpath/LICENSE" ]; then
548 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
549 echo "this software has disappeared."
551 echo "Sorry, you are not licensed to use this software."
552 echo "Try re-installing."
556 elif [ $COMMERCIAL_USER = "no" ]; then
557 # Open Source edition - may only be used under the terms of the GPL or LGPL.
558 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
559 Licensee="Open Source"
561 EditionString="Open Source"
562 QT_EDITION="QT_EDITION_OPENSOURCE"
565 #-------------------------------------------------------------------------------
566 # initalize variables
567 #-------------------------------------------------------------------------------
569 SYSTEM_VARIABLES="CC CXX CFLAGS CXXFLAGS LDFLAGS"
570 for varname in $SYSTEM_VARIABLES; do
571 qmakevarname="${varname}"
572 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
573 if [ "${varname}" = "LDFLAGS" ]; then
574 qmakevarname="LFLAGS"
577 'if [ -n "\$'${varname}'" ]; then
578 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
582 # Use CC/CXX to run config.tests
583 mkdir -p "$outpath/config.tests"
584 rm -f "$outpath/config.tests/.qmake.cache"
585 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
587 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
588 QMakeVar add decorations "default windows styled"
589 QMakeVar add mouse-drivers "pc"
590 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
591 QMakeVar add gfx-drivers "linuxfb"
592 QMakeVar add mouse-drivers "linuxtp"
594 QMakeVar add kbd-drivers "tty"
596 if [ "$CFG_DEV" = "yes" ]; then
597 QMakeVar add kbd-drivers "um"
600 # QTDIR may be set and point to an old or system-wide Qt installation
603 # the minimum version of libdbus-1 that we require:
604 MIN_DBUS_1_VERSION=0.93
606 # initalize internal variables
607 CFG_CONFIGURE_EXIT_ON_ERROR=yes
609 CFG_EXCEPTIONS=unspecified
610 CFG_GUI=auto # (yes|no|auto)
611 CFG_SCRIPT=auto # (yes|no|auto)
612 CFG_SCRIPTTOOLS=auto # (yes|no|auto)
613 CFG_XMLPATTERNS=auto # (yes|no|auto)
627 CFG_SYMBIAN_DEFFILES=auto
645 CFG_OPENVG_LC_INCLUDES=no
646 CFG_OPENVG_SHIVA=auto
647 CFG_OPENVG_ON_OPENGL=auto
649 CFG_EGL_GLES_INCLUDES=no
652 CFG_QWS_FREETYPE=auto
655 QT_DEFAULT_BUILD_PARTS="libs tools examples demos docs translations"
660 CFG_PHONON_BACKEND=yes
662 CFG_AUDIO_BACKEND=auto
665 CFG_DECLARATIVE_DEBUG=yes
666 CFG_WEBKIT=auto # (yes|no|auto|debug)
667 CFG_JAVASCRIPTCORE_JIT=auto
669 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
670 CFG_GFX_ON="linuxfb multiscreen"
671 CFG_GFX_PLUGIN_AVAILABLE=
674 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
675 CFG_KBD_ON="tty" #default, see QMakeVar above
676 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
677 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
679 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
680 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
681 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
682 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
687 CFG_KBD_PLUGIN_AVAILABLE=
690 CFG_MOUSE_PLUGIN_AVAILABLE=
695 CFG_DECORATION_AVAILABLE="styled windows default"
696 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
697 CFG_DECORATION_PLUGIN_AVAILABLE=
698 CFG_DECORATION_PLUGIN=
714 CFG_SEPARATE_DEBUG_INFO=no
715 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
716 CFG_REDUCE_EXPORTS=auto
726 CFG_REDUCE_RELOCATIONS=no
731 CFG_ACCESSIBILITY=auto
735 CFG_DOUBLEFORMAT=auto
739 CFG_CLOCK_GETTIME=auto
740 CFG_CLOCK_MONOTONIC=auto
749 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
754 COMMANDLINE_MAC_CARBON=no
756 CFG_PREFIX_INSTALL=yes
764 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian-gcce"
765 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
766 XPLATFORM_SYMBIAN=no # Whether target platform is SYMBIAN (*symbian*)
767 XPLATFORM_SYMBIAN_SBSV2=no # Whether target platform is SYMBIAN_SBSV2 (symbian-sbsv2)
770 OPT_CONFIRM_LICENSE=no
776 CFG_GRAPHICS_SYSTEM=default
784 # initalize variables used for installation
793 QT_INSTALL_TRANSLATIONS=
799 #flags for SQL drivers
807 QT_LFLAGS_ODBC="-lodbc"
810 # flags for libdbus-1
814 # flags for Glib (X11 only)
818 # flags for GStreamer (X11 only)
822 #flag for Symbian fpu settings
825 # flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
826 QT_CFLAGS_CONNSETTINGS=
827 QT_LIBS_CONNSETTINGS=
829 #-------------------------------------------------------------------------------
830 # check SQL drivers, mouse drivers and decorations available in this package
831 #-------------------------------------------------------------------------------
833 # opensource version removes some drivers, so force them to be off
839 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
840 for a in "$relpath/src/plugins/sqldrivers/"*; do
842 base_a=`basename "$a"`
843 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
844 eval "CFG_SQL_${base_a}=auto"
849 CFG_DECORATION_PLUGIN_AVAILABLE=
850 if [ -d "$relpath/src/plugins/decorations" ]; then
851 for a in "$relpath/src/plugins/decorations/"*; do
853 base_a=`basename "$a"`
854 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
859 CFG_KBD_PLUGIN_AVAILABLE=
860 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
861 for a in "$relpath/src/plugins/kbddrivers/"*; do
863 base_a=`basename "$a"`
864 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
869 CFG_MOUSE_PLUGIN_AVAILABLE=
870 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
871 for a in "$relpath/src/plugins/mousedrivers/"*; do
873 base_a=`basename "$a"`
874 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
879 CFG_GFX_PLUGIN_AVAILABLE=
880 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
881 for a in "$relpath/src/plugins/gfxdrivers/"*; do
883 base_a=`basename "$a"`
884 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
887 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
890 #-------------------------------------------------------------------------------
891 # parse command line arguments
892 #-------------------------------------------------------------------------------
894 # parse the arguments, setting things to "yes" or "no"
895 while [ "$#" -gt 0 ]; do
899 #Autoconf style options
901 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
905 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
909 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
910 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
913 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
917 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
921 -no-*-*|-plugin-*-*|-qt-*-*)
922 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
923 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
940 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
943 #Qt style yes options
944 -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles)
945 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
948 #Qt style options that pass an argument
950 if [ "$PLATFORM_QWS" != "yes" ]; then
952 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
956 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
960 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config)
961 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
965 #Qt style complex options in one command
966 -enable-*|-disable-*)
967 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
968 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
970 #Qt Builtin/System style options
971 -no-*|-system-*|-qt-*)
972 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
973 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
975 #Options that cannot be generalized
982 # this option may or may not be followed by an argument
983 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
992 # this option may or may not be followed by an argument
993 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1002 # this option may or may not be followed by an argument
1003 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1011 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1012 # this option may or may not be followed by an argument
1013 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1022 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1026 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1034 VAR="graphicssystem"
1038 -runtimegraphicssystem)
1039 VAR="runtimegraphicssystem"
1050 if [ "$1" = "-D" ]; then
1054 VAL=`echo $1 | sed 's,-D,,'`
1059 # this option may or may not be followed by an argument
1060 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1069 if [ "$1" = "-I" ]; then
1073 VAL=`echo $1 | sed 's,-I,,'`
1078 if [ "$1" = "-L" ]; then
1082 VAL=`echo $1 | sed 's,-L,,'`
1087 if [ "$1" = "-R" ]; then
1091 VAL=`echo $1 | sed 's,-R,,'`
1096 VAL=`echo $1 | sed 's,-l,,'`
1100 if [ "$1" = "-F" ]; then
1104 VAL=`echo $1 | sed 's,-F,,'`
1109 if [ "$1" = "-fw" ]; then
1113 VAL=`echo $1 | sed 's,-fw,,'`
1117 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1124 if [ "$UNKNOWN_ARG" = "yes" ]; then
1125 echo "$1: unknown argument"
1136 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1137 CFG_QT3SUPPORT="$VAL"
1143 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1144 CFG_ACCESSIBILITY="$VAL"
1153 CFG_USE_GNUMAKE="$VAL"
1156 CFG_MYSQL_CONFIG="$VAL"
1159 QT_INSTALL_PREFIX="$VAL"
1162 QT_HOST_PREFIX="$VAL"
1165 QT_FORCE_PKGCONFIG=yes
1168 QT_INSTALL_DOCS="$VAL"
1171 QT_INSTALL_HEADERS="$VAL"
1174 QT_INSTALL_PLUGINS="$VAL"
1177 QT_INSTALL_IMPORTS="$VAL"
1180 QT_INSTALL_DATA="$VAL"
1183 QT_INSTALL_LIBS="$VAL"
1192 QT_INSTALL_TRANSLATIONS="$VAL"
1194 sysconfdir|settingsdir)
1195 QT_INSTALL_SETTINGS="$VAL"
1198 QT_INSTALL_EXAMPLES="$VAL"
1201 QT_INSTALL_DEMOS="$VAL"
1207 QT_INSTALL_BINS="$VAL"
1210 CFG_USER_BUILD_KEY="$VAL"
1222 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1229 if [ "$VAL" = "little" ]; then
1230 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1231 elif [ "$VAL" = "big" ]; then
1232 CFG_ENDIAN="Q_BIG_ENDIAN"
1238 if [ "$VAL" = "little" ]; then
1239 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1240 elif [ "$VAL" = "big" ]; then
1241 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1247 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1254 CFG_QWS_DEPTHS="$VAL"
1257 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1258 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1259 [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
1261 if [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
1269 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1271 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1279 if [ "$PLATFORM_QWS" = "yes" ]; then
1280 echo "Error: Graphics System plugins are not supported on QWS."
1281 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1282 echo " rather than existing as a separate plugin."
1286 if [ "$VAL" = "opengl" ]; then
1287 CFG_GRAPHICS_SYSTEM="opengl"
1288 elif [ "$VAL" = "openvg" ]; then
1289 CFG_GRAPHICS_SYSTEM="openvg"
1290 elif [ "$VAL" = "raster" ]; then
1291 CFG_GRAPHICS_SYSTEM="raster"
1292 elif [ "$VAL" = "runtime" ]; then
1293 CFG_GRAPHICS_SYSTEM="runtime"
1299 runtimegraphicssystem)
1300 if [ "$VAL" != "runtime" ]; then
1301 CFG_RUNTIME_SYSTEM="$VAL"
1305 qvfb) # left for commandline compatibility, not documented
1306 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1307 if [ "$VAL" = "yes" ]; then
1308 QMakeVar add gfx-drivers qvfb
1309 QMakeVar add kbd-drivers qvfb
1310 QMakeVar add mouse-drivers qvfb
1311 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1312 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1313 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1320 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1323 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1331 if [ "$PLATFORM_MAC" = "yes" ]; then
1338 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1339 CFG_MAC_DWARF2="$VAL"
1345 # if this is a Mac then "windows" probably means
1346 # we are cross-compiling for MinGW
1347 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1348 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1357 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1358 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1364 # do nothing - Cocoa is the default.
1367 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1368 CFG_MAC_CARBON="$VAL"
1369 COMMANDLINE_MAC_CARBON="$VAL"
1376 if [ "$PLATFORM_MAC" = "yes" ]; then
1377 CFG_FRAMEWORK="$VAL"
1383 if [ "$VAL" = "yes" ]; then
1385 QMakeVar add QMAKE_CFLAGS -pg
1386 QMakeVar add QMAKE_CXXFLAGS -pg
1387 QMakeVar add QMAKE_LFLAGS -pg
1388 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1393 exceptions|g++-exceptions)
1394 if [ "$VAL" = "no" ]; then
1396 elif [ "$VAL" = "yes" ]; then
1404 # keep compatibility with old platform names
1410 PLATFORM=hpux-acc-o64
1413 PLATFORM=hpux-acc-64
1416 PLATFORM=hpux-acc-64
1428 PLATFORM=reliant-cds-64
1431 PLATFORM=solaris-cc-64
1434 PLATFORM=unixware-cc
1437 PLATFORM=unixware-g++
1440 PLATFORM=unixware-cc
1443 PLATFORM=unixware-g++
1449 i386) NATIVE_64_ARCH="x86_64" ;;
1450 powerpc) NATIVE_64_ARCH="ppc64" ;;
1451 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1453 if [ ! -z "$NATIVE_64_ARCH" ]; then
1454 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1455 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1462 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1463 case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
1464 case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
1467 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1468 CFG_DEBUG_RELEASE="$VAL"
1474 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1475 CFG_RELEASE_QMAKE="$VAL"
1481 if [ "$VAL" = "yes" ]; then
1483 elif [ "$VAL" = "no" ]; then
1490 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1491 CFG_PREFIX_INSTALL="$VAL"
1499 developer-build|commercial|opensource|nokia-developer)
1500 # These switches have been dealt with already
1503 if [ "$VAL" = "yes" ]; then
1505 elif [ "$VAL" = "no" ]; then
1512 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1513 CFG_INCREMENTAL="$VAL"
1519 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1520 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1526 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1527 if [ "$VAL" = "no" ]; then
1528 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1529 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1530 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1536 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1543 [ "$VAL" = "qt" ] && VAL=auto
1544 if [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1551 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1559 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1566 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1573 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1580 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1587 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1594 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1601 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1608 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1609 CFG_PRECOMPILE="$VAL"
1614 separate-debug-info)
1615 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1616 CFG_SEPARATE_DEBUG_INFO="$VAL"
1617 elif [ "$VAL" = "nocopy" ] ; then
1618 CFG_SEPARATE_DEBUG_INFO="yes"
1619 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1625 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1626 CFG_REDUCE_EXPORTS="$VAL"
1632 if [ "$VAL" = "no" ]; then
1639 if [ "$VAL" = "no" ]; then
1646 if [ "$VAL" = "no" ]; then
1653 if [ "$VAL" = "no" ]; then
1660 if [ "$VAL" = "no" ]; then
1667 if [ "$VAL" = "no" ]; then
1674 if [ "$VAL" = "no" ]; then
1681 if [ "$VAL" = "no" ]; then
1688 if [ "$VAL" = "no" ]; then
1698 if [ "$VAL" = "no" ]; then
1705 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1706 CFG_REDUCE_RELOCATIONS="$VAL"
1712 [ "$VAL" = "qt" ] && VAL=yes
1713 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1714 CFG_QWS_FREETYPE="$VAL"
1720 [ "$VAL" = "qt" ] && VAL=yes
1721 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1726 # No longer supported:
1727 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1730 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1737 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1738 CFG_SYMBIAN_DEFFILES="$VAL"
1744 if [ "$VAL" = "system" ]; then
1751 [ "$VAL" = "yes" ] && VAL=qt
1752 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1759 [ "$VAL" = "yes" ] && VAL=qt
1760 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1767 [ "$VAL" = "yes" ] && VAL=qt
1768 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1775 [ "$VAL" = "yes" ] && VAL=qt
1776 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1783 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1790 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1797 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1804 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1811 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1818 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1825 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1826 CFG_FONTCONFIG="$VAL"
1832 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1839 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1846 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1853 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1860 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1861 CFG_GSTREAMER="$VAL"
1867 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1868 CFG_QGTKSTYLE="$VAL"
1874 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ]; then
1875 CFG_QS60STYLE="$VAL"
1881 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1884 if [ "$VAL" = "no" ]; then
1892 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1894 elif [ "$VAL" = "runtime" ]; then
1901 if [ "$VAL" = "yes" ]; then
1908 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1915 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1916 CFG_LARGEFILE="$VAL"
1922 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1929 if [ "$VAL" = "yes" ]; then
1930 CFG_OPENSSL="linked"
1936 if [ "$VAL" = "yes" ]; then
1944 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1945 CFG_XMLPATTERNS="yes"
1947 if [ "$VAL" = "no" ]; then
1948 CFG_XMLPATTERNS="no"
1955 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1958 if [ "$VAL" = "no" ]; then
1966 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1967 CFG_SCRIPTTOOLS="yes"
1969 if [ "$VAL" = "no" ]; then
1970 CFG_SCRIPTTOOLS="no"
1977 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1980 if [ "$VAL" = "no" ]; then
1988 if [ "$VAL" = "yes" ]; then
1989 CFG_DECLARATIVE="yes"
1991 if [ "$VAL" = "no" ]; then
1992 CFG_DECLARATIVE="no"
1999 if [ "$VAL" = "yes" ]; then
2000 CFG_DECLARATIVE_DEBUG="yes"
2002 if [ "$VAL" = "no" ]; then
2003 CFG_DECLARATIVE_DEBUG="no"
2010 [ "$VAL" = "auto" ] && VAL="yes"
2014 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2015 CFG_JAVASCRIPTCORE_JIT="$VAL"
2021 if [ "$VAL" = "yes" ]; then
2022 OPT_CONFIRM_LICENSE="$VAL"
2028 if [ "$VAL" = "yes" ]; then
2034 sql-*|gfx-*|decoration-*|kbd-*|mouse-*)
2035 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2036 # if autoconf style options were used, $VAL can be "yes" or "no"
2037 [ "$VAL" = "yes" ] && VAL=qt
2038 # now $VAL should be "no", "qt", or "plugin"... double-check
2039 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2042 # now $VAL is "no", "qt", or "plugin"
2044 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2045 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2047 # Grab the available values
2050 avail="$CFG_SQL_AVAILABLE"
2053 avail="$CFG_GFX_AVAILABLE"
2054 if [ "$OPT" = "plugin" ]; then
2055 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2059 avail="$CFG_DECORATION_AVAILABLE"
2060 if [ "$OPT" = "plugin" ]; then
2061 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2065 avail="$CFG_KBD_AVAILABLE"
2066 if [ "$OPT" = "plugin" ]; then
2067 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2071 avail="$CFG_MOUSE_AVAILABLE"
2072 if [ "$OPT" = "plugin" ]; then
2073 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2078 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2082 # Check that that user's value is available.
2085 if [ "$VAL" = "$d" ]; then
2090 [ "$found" = yes ] || ERROR=yes
2092 if [ "$VAR" = "sql" ]; then
2093 # set the CFG_SQL_driver
2094 eval "CFG_SQL_$VAL=\$OPT"
2098 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2099 if [ "$OPT" = "plugin" ]; then
2100 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2101 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2102 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2103 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2104 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2105 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2106 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2107 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2110 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2111 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2112 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2113 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2114 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2118 QMakeVar add "${VAR}s" "${VAL}"
2119 elif [ "$OPT" = "no" ]; then
2120 PLUG_VAR="${VAR}-plugin"
2121 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2122 IN_VAR="${VAR}-driver"
2126 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2127 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2128 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2129 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2130 QMakeVar del "${IN_VAR}s" "$VAL"
2131 QMakeVar del "${PLUG_VAR}s" "$VAL"
2133 if [ "$ERROR" = "yes" ]; then
2134 echo "$CURRENT_OPT: unknown argument"
2139 if [ "$VAL" = "yes" ]; then
2140 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2141 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2145 elif [ "$VAL" = "no" ]; then
2146 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2147 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2156 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2163 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2170 D_FLAGS="$D_FLAGS \"$VAL\""
2173 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2176 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2179 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2182 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2185 if [ "$PLATFORM_MAC" = "yes" ]; then
2186 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2187 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2193 if [ "$PLATFORM_MAC" = "yes" ]; then
2194 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2203 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2210 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2211 CFG_PHONON_BACKEND="$VAL"
2217 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2218 CFG_MULTIMEDIA="$VAL"
2230 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2231 CFG_AUDIO_BACKEND="$VAL"
2237 if [ "$VAL" != "no" ]; then
2245 if [ "$UNKNOWN_OPT" = "yes" ]; then
2246 echo "${CURRENT_OPT}: invalid command-line switch"
2252 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2253 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2256 if [ "$CFG_GUI" = "no" ]; then
2257 echo "Warning: -no-gui will disable the qt3support library."
2261 # update QT_CONFIG to show our current predefined configuration
2262 case "$CFG_QCONFIG" in
2263 minimal|small|medium|large|full)
2264 # these are a sequence of increasing functionality
2265 for c in minimal small medium large full; do
2266 QT_CONFIG="$QT_CONFIG $c-config"
2267 [ "$CFG_QCONFIG" = $c ] && break
2271 # not known to be sufficient for anything
2272 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2273 echo >&2 "Error: configuration file not found:"
2274 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2276 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2281 #-------------------------------------------------------------------------------
2282 # build tree initialization
2283 #-------------------------------------------------------------------------------
2285 # where to find which..
2286 unixtests="$relpath/config.tests/unix"
2287 mactests="$relpath/config.tests/mac"
2288 symbiantests="$relpath/config.tests/symbian"
2289 WHICH="$unixtests/which.test"
2291 PERL=`$WHICH perl 2>/dev/null`
2293 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2295 for e in gawk nawk awk; do
2296 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2303 PERL="/usr/bin/perl"
2304 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2308 ### skip this if the user just needs help...
2309 if [ "$OPT_HELP" != "yes" ]; then
2311 # is this a shadow build?
2312 if [ "$OPT_SHADOW" = "maybe" ]; then
2314 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2315 if [ -h "$outpath" ]; then
2316 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2322 if [ "$OPT_SHADOW" = "yes" ]; then
2323 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2324 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2325 echo >&2 "Cannot proceed."
2328 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2331 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2333 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2334 echo "Qt can be built in release mode with separate debug information, so"
2335 echo "-debug-and-release is not necessary anymore"
2339 # detect build style
2340 if [ "$CFG_DEBUG" = "auto" ]; then
2341 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2342 CFG_DEBUG_RELEASE=yes
2344 elif [ "$CFG_DEV" = "yes" ]; then
2345 CFG_DEBUG_RELEASE=no
2348 CFG_DEBUG_RELEASE=no
2352 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2353 QMAKE_CONFIG="$QMAKE_CONFIG build_all"
2356 if [ "$CFG_SILENT" = "yes" ]; then
2357 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2360 # if the source tree is different from the build tree,
2361 # symlink or copy part of the sources
2362 if [ "$OPT_SHADOW" = "yes" ]; then
2363 echo "Preparing build tree..."
2365 if [ -z "$PERL" ]; then
2367 echo "You need perl in your PATH to make a shadow build."
2368 echo "Cannot proceed."
2372 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2374 # symlink the qmake directory
2375 find "$relpath/qmake" | while read a; do
2376 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2377 if [ '!' -f "$my_a" ]; then
2378 if [ -d "$a" ]; then
2379 # directories are created...
2382 a_dir=`dirname "$my_a"`
2383 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2384 # ... and files are symlinked
2385 case `basename "$a"` in
2386 *.o|*.d|GNUmakefile*|qmake)
2397 # make a syncqt script that can be used in the shadow
2398 rm -f "$outpath/bin/syncqt"
2399 if [ -x "$relpath/bin/syncqt" ]; then
2400 mkdir -p "$outpath/bin"
2401 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2402 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
2403 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2404 chmod 755 "$outpath/bin/syncqt"
2407 for i in elf2e32_qtwrapper createpackage patch_capabilities; do
2408 rm -f "$outpath/bin/$i"
2409 if [ -x "$relpath/bin/$i" ]; then
2410 mkdir -p "$outpath/bin"
2411 echo "#!/bin/sh" >"$outpath/bin/$i"
2412 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2413 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2414 chmod 755 "$outpath/bin/$i"
2418 # symlink the mkspecs directory
2419 mkdir -p "$outpath/mkspecs"
2420 rm -rf "$outpath"/mkspecs/*
2421 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2422 rm -f "$outpath/mkspecs/default"
2426 rm -rf "$outpath/mkspecs/$1"
2427 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2428 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2431 # Special case for mkspecs/features directory.
2432 # To be able to place .prf files into a shadow build directory,
2433 # we're creating links for files only. The directory structure is reproduced.
2434 ShadowMkspecs features
2436 # The modules dir is special, too.
2437 ShadowMkspecs modules
2439 # symlink the doc directory
2440 rm -rf "$outpath/doc"
2441 ln -s "$relpath/doc" "$outpath/doc"
2443 # make sure q3porting.xml can be found
2444 mkdir -p "$outpath/tools/porting/src"
2445 rm -f "$outpath/tools/porting/src/q3porting.xml"
2446 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2449 # symlink fonts to be able to run application from build directory
2450 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2451 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2452 mkdir -p "${outpath}/lib"
2453 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2457 if [ "$OPT_FAST" = "auto" ]; then
2458 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2465 # find a make command
2466 if [ -z "$MAKE" ]; then
2468 for mk in gmake make; do
2469 if "$WHICH" $mk >/dev/null 2>&1; then
2474 if [ -z "$MAKE" ]; then
2475 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2476 echo >&2 "Cannot proceed."
2479 # export MAKE, we need it later in the config.tests
2485 #-------------------------------------------------------------------------------
2486 # auto-detect all that hasn't been specified in the arguments
2487 #-------------------------------------------------------------------------------
2489 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2490 if [ "$CFG_EMBEDDED" != "no" ]; then
2491 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2493 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2494 if [ -z "$XPLATFORM" ]; then
2495 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2496 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2500 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2501 if [ -z "$XPLATFORM" ]; then
2502 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2503 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2507 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2508 if [ -z "$XPLATFORM" ]; then
2509 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2510 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2514 if [ -z "$PLATFORM" ]; then
2515 case "$UNAME_MACHINE" in
2517 PLATFORM=qws/linux-x86-g++
2520 PLATFORM=qws/linux-x86_64-g++
2523 PLATFORM=qws/linux-generic-g++
2527 if [ -z "$XPLATFORM" ]; then
2528 if [ "$CFG_EMBEDDED" = "auto" ]; then
2529 if [ -n "$CFG_ARCH" ]; then
2530 CFG_EMBEDDED=$CFG_ARCH
2532 case "$UNAME_MACHINE" in
2540 CFG_EMBEDDED=generic
2545 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2549 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2550 if [ -z "$XPLATFORM" ]; then
2551 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2552 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2556 if [ -z "$XPLATFORM" ]; then
2561 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2567 if [ -z "$PLATFORM" ]; then
2569 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2571 if [ "$PLATFORM_MAC" = "yes" ]; then
2573 # PLATFORM=macx-xcode
2580 #PLATFORM=aix-g++-64
2582 #PLATFORM=aix-xlc-64
2584 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2594 # PLATFORM=dynix-g++
2600 PLATFORM=freebsd-g++
2602 - Also available for FreeBSD: freebsd-icc
2606 PLATFORM=openbsd-g++
2617 #PLATFORM=irix-cc-64
2619 - Also available for IRIX: irix-g++ irix-cc-64
2623 case "$UNAME_MACHINE" in
2625 #PLATFORM=hpuxi-acc-32
2626 PLATFORM=hpuxi-acc-64
2628 - Also available for HP-UXi: hpuxi-acc-32
2634 #PLATFORM=hpux-acc-64
2636 #PLATFORM=hpux-acc-o64
2638 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2647 - Also available for Tru64: tru64-g++
2651 case "$UNAME_MACHINE" in
2653 PLATFORM=linux-g++-64
2660 - Also available for Linux: linux-kcc linux-icc linux-cxx
2664 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2665 PLATFORM="solaris-g++"
2667 #PLATFORM=solaris-g++
2669 #PLATFORM=solaris-cc64
2672 - Also available for Solaris: solaris-g++ solaris-cc-64
2675 ReliantUNIX-*:*|SINIX-*:*)
2676 PLATFORM=reliant-cds
2677 #PLATFORM=reliant-cds-64
2679 - Also available for Reliant UNIX: reliant-cds-64
2689 #PLATFORM=unixware-g++
2690 PLATFORM=unixware-cc
2692 - Also available for OpenUNIX: unixware-g++
2696 #PLATFORM=unixware-g++
2697 PLATFORM=unixware-cc
2699 - Also available for UnixWare: unixware-g++
2706 - Also available for SCO OpenServer: sco-g++
2710 PLATFORM=unixware-g++
2713 PLATFORM=unsupported/qnx-g++
2716 if [ "$OPT_HELP" != "yes" ]; then
2718 for p in $PLATFORMS; do
2719 echo " $relconf $* -platform $p"
2722 echo " The build script does not currently recognize all" >&2
2723 echo " platforms supported by Qt." >&2
2724 echo " Rerun this script with a -platform option listed to" >&2
2725 echo " set the system/compiler combination you use." >&2
2732 if [ "$PLATFORM_QWS" = "yes" ]; then
2734 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2736 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2739 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2741 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2742 case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
2743 case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
2745 if [ -d "$PLATFORM" ]; then
2746 QMAKESPEC="$PLATFORM"
2748 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2750 if [ -d "$XPLATFORM" ]; then
2751 XQMAKESPEC="$XPLATFORM"
2753 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2755 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2756 QT_CROSS_COMPILE=yes
2757 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2760 if [ "$PLATFORM_MAC" = "yes" ]; then
2761 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2763 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2764 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2765 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2766 echo " built with 'macx-g++'" >&2
2772 # check specified platforms are supported
2773 if [ '!' -d "$QMAKESPEC" ]; then
2775 echo " The specified system/compiler is not supported:"
2779 echo " Please see the README file for a complete list."
2783 if [ '!' -d "$XQMAKESPEC" ]; then
2785 echo " The specified system/compiler is not supported:"
2789 echo " Please see the README file for a complete list."
2793 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2795 echo " The specified system/compiler port is not complete:"
2797 echo " $XQMAKESPEC/qplatformdefs.h"
2799 echo " Please contact qt-bugs@trolltech.com."
2804 # now look at the configs and figure out what platform we are config'd for
2805 [ "$CFG_EMBEDDED" = "no" ] \
2806 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2808 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2810 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2811 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2812 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2813 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2814 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2818 #-------------------------------------------------------------------------------
2819 # determine the system architecture
2820 #-------------------------------------------------------------------------------
2821 if [ "$OPT_VERBOSE" = "yes" ]; then
2822 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2825 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2826 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2828 echo "You have specified a target architecture with -embedded and -arch."
2829 echo "The two architectures you have specified are different, so we can"
2830 echo "not proceed. Either set both to be the same, or only use -embedded."
2836 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2837 case `basename "$XPLATFORM"` in
2840 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2842 echo "Please contact qt-info@nokia.com to upgrade your license to"
2843 echo "include this platform, or install the Qt Open Source Edition"
2844 echo "if you intend to develop free software."
2850 if [ -z "${CFG_HOST_ARCH}" ]; then
2851 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2853 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2854 case "$CFG_HOST_ARCH" in
2859 if [ "$OPT_VERBOSE" = "yes" ]; then
2860 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2864 CFG_HOST_ARCH=`uname -p`
2865 if [ "$OPT_VERBOSE" = "yes" ]; then
2866 echo " SGI ($CFG_HOST_ARCH)"
2870 case "$UNAME_MACHINE" in
2872 if [ "$OPT_VERBOSE" = "yes" ]; then
2873 echo " Sun SPARC (sparc)"
2880 if [ "$OPT_VERBOSE" = "yes" ]; then
2881 echo " 64-bit AMD 80x86 (x86_64)"
2883 CFG_HOST_ARCH=x86_64
2886 if [ "$OPT_VERBOSE" = "yes" ]; then
2887 echo " 32-bit Intel 80x86 (i386)"
2895 case "$UNAME_MACHINE" in
2897 if [ "$OPT_VERBOSE" = "yes" ]; then
2898 echo " 32-bit Apple PowerPC (powerpc)"
2902 if [ "$OPT_VERBOSE" = "yes" ]; then
2903 echo " 32-bit Intel 80x86 (i386)"
2907 CFG_HOST_ARCH=macosx
2910 if [ "$OPT_VERBOSE" = "yes" ]; then
2911 echo " 64-bit IBM PowerPC (powerpc)"
2913 CFG_HOST_ARCH=powerpc
2916 if [ "$OPT_VERBOSE" = "yes" ]; then
2917 echo " HP PA-RISC (parisc)"
2919 CFG_HOST_ARCH=parisc
2922 if [ "$OPT_VERBOSE" = "yes" ]; then
2923 echo " 32-bit Intel 80x86 (i386)"
2927 *:*:x86_64|*:*:amd64)
2928 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2929 if [ "$OPT_VERBOSE" = "yes" ]; then
2930 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2934 if [ "$OPT_VERBOSE" = "yes" ]; then
2935 echo " 64-bit AMD 80x86 (x86_64)"
2937 CFG_HOST_ARCH=x86_64
2941 if [ "$OPT_VERBOSE" = "yes" ]; then
2942 echo " 32-bit PowerPC (powerpc)"
2944 CFG_HOST_ARCH=powerpc
2947 if [ "$OPT_VERBOSE" = "yes" ]; then
2948 echo " 64-bit PowerPC (powerpc)"
2950 CFG_HOST_ARCH=powerpc
2953 if [ "$OPT_VERBOSE" = "yes" ]; then
2954 echo " IBM S/390 (s390)"
2959 if [ "$OPT_VERBOSE" = "yes" ]; then
2965 if [ "$OPT_VERBOSE" = "yes" ]; then
2966 echo " Linux on SPARC"
2971 case "$UNAME_MACHINE" in
2973 if [ "$OPT_VERBOSE" = "yes" ]; then
2974 echo " QNX on Intel 80x86 (i386)"
2981 if [ "$OPT_VERBOSE" = "yes" ]; then
2982 echo " Trying '$UNAME_MACHINE'..."
2984 CFG_HOST_ARCH="$UNAME_MACHINE"
2989 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2990 if [ -n "$CFG_ARCH" ]; then
2991 CFG_EMBEDDED=$CFG_ARCH
2994 case "$CFG_EMBEDDED" in
3014 CFG_ARCH="$CFG_EMBEDDED"
3017 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3018 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3019 elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3021 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3022 CFG_ARCH=$CFG_HOST_ARCH
3025 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3026 if [ "$OPT_VERBOSE" = "yes" ]; then
3027 echo " '$CFG_ARCH' is supported"
3030 if [ "$OPT_VERBOSE" = "yes" ]; then
3031 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3035 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3036 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3037 if [ "$OPT_VERBOSE" = "yes" ]; then
3038 echo " '$CFG_HOST_ARCH' is supported"
3041 if [ "$OPT_VERBOSE" = "yes" ]; then
3042 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3044 CFG_HOST_ARCH=generic
3048 if [ "$OPT_VERBOSE" = "yes" ]; then
3049 echo "System architecture: '$CFG_ARCH'"
3050 if [ "$PLATFORM_QWS" = "yes" ]; then
3051 echo "Host architecture: '$CFG_HOST_ARCH'"
3055 #-------------------------------------------------------------------------------
3056 # tests that don't need qmake (must be run before displaying help)
3057 #-------------------------------------------------------------------------------
3059 if [ -z "$PKG_CONFIG" ]; then
3060 # See if PKG_CONFIG is set in the mkspec:
3061 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3063 if [ -z "$PKG_CONFIG" ]; then
3064 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3067 # Work out if we can use pkg-config
3068 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3069 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3071 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3072 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3073 echo >&2 "environment!"
3075 if [ -z "$PKG_CONFIG_PATH" ]; then
3077 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3078 echo >&2 "the host compiler's .pc files will be used. This is probably"
3079 echo >&2 "not what you want."
3081 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3083 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3084 echo >&2 "been set. This means your toolchain's .pc files must contain"
3085 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3086 echo >&2 "tests are failing, please check these files."
3091 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3092 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3093 echo >&2 "dependencies"
3099 # process CFG_MAC_ARCHS
3100 if [ "$PLATFORM_MAC" = "yes" ]; then
3101 # check -arch arguments for validity.
3102 ALLOWED="x86 ppc x86_64 ppc64 i386"
3103 # Save the list so we can re-write it using only valid values
3104 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
3106 for i in $CFG_MAC_ARCHS_IN
3108 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
3109 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
3112 if [ "$i" = "i386" -o "$i" = "x86" ]; then
3113 # These are synonymous values
3114 # CFG_MAC_ARCHS requires x86 while GCC requires i386
3115 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
3116 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
3118 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
3119 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
3124 # pass on $CFG_SDK to the configure tests.
3125 if [ '!' -z "$CFG_SDK" ]; then
3126 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3129 # find the default framework value
3130 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
3131 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3132 CFG_FRAMEWORK="$CFG_SHARED"
3133 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3135 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3143 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3144 TEST_COMPILER="$CXX"
3146 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3147 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3148 #for Symbian we don't need this checking
3149 if [ -z "$TEST_COMPILER" ]; then
3150 echo "ERROR: Cannot set the compiler for the configuration tests"
3156 # auto-detect precompiled header support
3157 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3158 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3160 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3165 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3167 echo "WARNING: Using universal binaries disables precompiled headers."
3172 #auto-detect DWARF2 on the mac
3173 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3174 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3181 # auto-detect support for -Xarch on the mac
3182 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
3183 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3190 # don't autodetect support for separate debug info on objcopy when
3191 # cross-compiling as lots of toolchains seems to have problems with this
3192 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3193 CFG_SEPARATE_DEBUG_INFO="no"
3196 # auto-detect support for separate debug info in objcopy
3197 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3198 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3199 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3200 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3201 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3202 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3203 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3204 CFG_SEPARATE_DEBUG_INFO=no
3208 # binutils on HP-UX is buggy; default to no.
3209 CFG_SEPARATE_DEBUG_INFO=no
3212 CFG_SEPARATE_DEBUG_INFO=yes
3218 # auto-detect -fvisibility support
3219 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3220 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3221 CFG_REDUCE_EXPORTS=no
3223 CFG_REDUCE_EXPORTS=yes
3227 # detect the availability of the -Bsymbolic-functions linker optimization
3228 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3229 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3230 CFG_REDUCE_RELOCATIONS=no
3232 CFG_REDUCE_RELOCATIONS=yes
3236 # auto-detect GNU make support
3237 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3241 # If -opengl wasn't specified, don't try to auto-detect
3242 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3247 if [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then
3248 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3253 # find the default framework value
3254 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
3255 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3256 CFG_FRAMEWORK="$CFG_SHARED"
3257 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3259 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3267 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3268 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3269 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3270 # get the darwin version. 10.0.0 and up means snow leopard.
3271 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3272 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3274 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3279 # x11 tests are done after qmake is built
3282 #setup the build parts
3283 if [ -z "$CFG_BUILD_PARTS" ]; then
3284 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3286 # don't build tools by default when cross-compiling
3287 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3288 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3291 for nobuild in $CFG_NOBUILD_PARTS; do
3292 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3294 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3296 # echo "WARNING: libs is a required part of the build."
3298 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3301 #-------------------------------------------------------------------------------
3302 # post process QT_INSTALL_* variables
3303 #-------------------------------------------------------------------------------
3306 if [ -z "$QT_INSTALL_PREFIX" ]; then
3307 if [ "$CFG_DEV" = "yes" ]; then
3308 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3309 elif [ "$PLATFORM_QWS" = "yes" ]; then
3310 QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
3311 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3312 QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
3314 elif [ -d "$EPOCROOT" ]; then
3315 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3316 QT_INSTALL_PREFIX="$EPOCROOT/epoc32/"
3317 QT_INSTALL_LIBS="$EPOCROOT/epoc32/release/armv5/lib/"
3320 QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
3323 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3325 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3326 [ -z "$QT_HOST_PREFIX" ] && QT_HOST_PREFIX="$QT_INSTALL_PREFIX"
3327 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS=
3328 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS=
3329 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS=
3330 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS=
3331 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="\\\\resource\\\\qt$QT_LIBINFIX\\\\plugins"
3332 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="\\\\resource\\\\qt$QT_LIBINFIX\\\\imports"
3333 [ -z "$QT_INSTALL_DATA" ] && QT_INSTALL_DATA=
3334 [ -z "$QT_INSTALL_TRANSLATIONS" ] && QT_INSTALL_TRANSLATIONS="\\\\resource\\\\qt$QT_LIBINFIX\\\\translations"
3335 [ -z "$QT_INSTALL_SETTINGS" ] && QT_INSTALL_SETTINGS=
3336 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES=
3337 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS=
3340 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3341 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3342 if [ "$PLATFORM_MAC" = "yes" ]; then
3343 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3346 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3349 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3352 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3353 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3354 if [ "$PLATFORM_MAC" = "yes" ]; then
3355 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3360 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3363 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3366 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3367 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3368 if [ "$PLATFORM_MAC" = "yes" ]; then
3369 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3370 QT_INSTALL_LIBS="/Libraries/Frameworks"
3374 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3376 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3379 if [ -z "$QT_INSTALL_BINS" ]; then #default
3380 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3381 if [ "$PLATFORM_MAC" = "yes" ]; then
3382 QT_INSTALL_BINS="/Developer/Applications/Qt"
3385 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3388 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3391 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3392 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3393 if [ "$PLATFORM_MAC" = "yes" ]; then
3394 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3397 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3399 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3402 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3403 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3404 if [ "$PLATFORM_MAC" = "yes" ]; then
3405 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3408 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3410 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3413 if [ -z "$QT_INSTALL_DATA" ]; then #default
3414 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3416 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3419 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3420 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3422 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3425 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3426 if [ "$PLATFORM_MAC" = "yes" ]; then
3427 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3429 QT_INSTALL_SETTINGS=/etc/xdg
3432 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3435 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3436 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3437 if [ "$PLATFORM_MAC" = "yes" ]; then
3438 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3441 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3443 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3446 if [ -z "$QT_INSTALL_DEMOS" ]; then #default
3447 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3448 if [ "$PLATFORM_MAC" = "yes" ]; then
3449 QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos"
3452 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos"
3454 QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
3457 #-------------------------------------------------------------------------------
3458 # help - interactive parts of the script _after_ this section please
3459 #-------------------------------------------------------------------------------
3461 # next, emit a usage message if something failed.
3462 if [ "$OPT_HELP" = "yes" ]; then
3463 [ "x$ERROR" = "xyes" ] && echo
3464 if [ "$CFG_NIS" = "no" ]; then
3471 if [ "$CFG_CUPS" = "no" ]; then
3478 if [ "$CFG_ICONV" = "no" ]; then
3485 if [ "$CFG_LARGEFILE" = "no" ]; then
3492 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3499 if [ "$CFG_IPV6" = "auto" ]; then
3503 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3512 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3513 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3514 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3515 [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
3516 [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3517 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3518 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3519 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3520 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3521 [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3522 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3523 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3524 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3525 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3526 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3527 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3528 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3529 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3530 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3531 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3532 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3533 [-no-openssl] [-openssl] [-openssl-linked]
3534 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3535 [-no-javascript-jit] [-javascript-jit]
3536 [-no-script] [-script] [-no-scripttools] [-scripttools]
3537 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3538 [additional platform specific options (see below)]
3541 Installation options:
3543 These are optional, but you may specify install directories.
3545 -prefix <dir> ...... This will install everything relative to <dir>
3546 (default $QT_INSTALL_PREFIX)
3548 if [ "$PLATFORM_QWS" = "yes" ]; then
3551 -hostprefix [dir] .. Tools and libraries needed when developing
3552 applications are installed in [dir]. If [dir] is
3553 not given, the current build directory will be used.
3558 * -prefix-install .... Force a sandboxed "local" installation of
3559 Qt. This will install into
3560 $QT_INSTALL_PREFIX, if this option is
3561 disabled then some platforms will attempt a
3562 "system" install by placing default values to
3563 be placed in a system location other than
3566 You may use these to separate different parts of the install:
3568 -bindir <dir> ......... Executables will be installed to <dir>
3569 (default PREFIX/bin)
3570 -libdir <dir> ......... Libraries will be installed to <dir>
3571 (default PREFIX/lib)
3572 -docdir <dir> ......... Documentation will be installed to <dir>
3573 (default PREFIX/doc)
3574 -headerdir <dir> ...... Headers will be installed to <dir>
3575 (default PREFIX/include)
3576 -plugindir <dir> ...... Plugins will be installed to <dir>
3577 (default PREFIX/plugins)
3578 -importdir <dir> ...... Imports for QML will be installed to <dir>
3579 (default PREFIX/imports)
3580 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3582 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3583 (default PREFIX/translations)
3584 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3585 (default PREFIX/etc/settings)
3586 -examplesdir <dir> .... Examples will be installed to <dir>
3587 (default PREFIX/examples)
3588 -demosdir <dir> ....... Demos will be installed to <dir>
3589 (default PREFIX/demos)
3591 You may use these options to turn on strict plugin loading.
3593 -buildkey <key> .... Build the Qt library and plugins using the specified
3594 <key>. When the library loads plugins, it will only
3595 load those that have a matching key.
3599 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3600 that needs to be evaluated. If the evaluation succeeds, the feature is
3601 included. Here is a short explanation of each option:
3603 * -release ........... Compile and link Qt with debugging turned off.
3604 -debug ............. Compile and link Qt with debugging turned on.
3605 -debug-and-release . Compile and link two versions of Qt, with and without
3606 debugging turned on (Mac only).
3608 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3610 -opensource ........ Compile and link the Open-Source Edition of Qt.
3611 -commercial ........ Compile and link the Commercial Edition of Qt.
3614 * -shared ............ Create and use shared Qt libraries.
3615 -static ............ Create and use static Qt libraries.
3617 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3619 -fast .............. Configure Qt quickly by generating Makefiles only for
3620 library and subdirectory targets. All other Makefiles
3621 are created as wrappers, which will in turn run qmake.
3623 -no-largefile ...... Disables large file support.
3624 + -largefile ......... Enables Qt to access files larger than 4 GB.
3627 if [ "$PLATFORM_QWS" = "yes" ]; then
3634 if [ "$CFG_DBUS" = "no" ]; then
3643 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3644 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3646 -no-accessibility .. Do not compile Accessibility support.
3647 * -accessibility ..... Compile Accessibility support.
3649 $SHN -no-stl ............ Do not compile STL support.
3650 $SHY -stl ............... Compile STL support.
3652 -no-sql-<driver> ... Disable SQL <driver> entirely.
3653 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3655 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3658 Possible values for <driver>:
3659 [ $CFG_SQL_AVAILABLE ]
3661 -system-sqlite ..... Use sqlite from the operating system.
3663 -no-qt3support ..... Disables the Qt 3 support functionality.
3664 * -qt3support ........ Enables the Qt 3 support functionality.
3666 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3667 + -xmlpatterns ....... Build the QtXmlPatterns module.
3668 QtXmlPatterns is built if a decent C++ compiler
3669 is used and exceptions are enabled.
3671 -no-multimedia ..... Do not build the QtMultimedia module.
3672 + -multimedia ........ Build the QtMultimedia module.
3674 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3675 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3677 -no-phonon ......... Do not build the Phonon module.
3678 + -phonon ............ Build the Phonon module.
3679 Phonon is built if a decent C++ compiler is used.
3680 -no-phonon-backend.. Do not build the platform phonon plugin.
3681 + -phonon-backend..... Build the platform phonon plugin.
3683 -no-svg ............ Do not build the SVG module.
3684 + -svg ............... Build the SVG module.
3686 -no-webkit ......... Do not build the WebKit module.
3687 + -webkit ............ Build the WebKit module.
3688 WebKit is built if a decent C++ compiler is used.
3689 -webkit-debug ...... Build the WebKit module with debug symbols.
3691 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3692 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3694 -no-script ......... Do not build the QtScript module.
3695 + -script ............ Build the QtScript module.
3697 -no-scripttools .... Do not build the QtScriptTools module.
3698 + -scripttools ....... Build the QtScriptTools module.
3700 -no-declarative ..... Do not build the declarative module.
3701 + -declarative ....... Build the declarative module.
3703 -no-declarative-debug ..... Do not build the declarative debugging support.
3704 + -declarative-debug ....... Build the declarative debugging support.
3706 -platform target ... The operating system and compiler you are building
3709 See the README file for a list of supported
3710 operating systems and compilers.
3712 if [ "${PLATFORM_QWS}" != "yes" ]; then
3714 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3715 raster - Software rasterizer
3716 opengl - Rendering via OpenGL, Experimental!
3717 openvg - Rendering via OpenVG, Experimental!
3723 -no-mmx ............ Do not compile with use of MMX instructions.
3724 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3725 -no-sse ............ Do not compile with use of SSE instructions.
3726 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3727 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3728 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3729 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3730 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3731 -no-avx ............ Do not compile with use of AVX instructions.
3732 -no-neon ........... Do not compile with use of NEON instructions.
3734 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3735 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3737 -D <string> ........ Add an explicit define to the preprocessor.
3738 -I <string> ........ Add an explicit include path.
3739 -L <string> ........ Add an explicit library path.
3741 -help, -h .......... Display this information.
3743 Third Party Libraries:
3745 -qt-zlib ........... Use the zlib bundled with Qt.
3746 + -system-zlib ....... Use zlib from the operating system.
3747 See http://www.gzip.org/zlib
3749 -no-gif ............ Do not compile GIF reading support.
3750 * -qt-gif ............ Compile GIF reading support.
3751 See also src/gui/image/qgifhandler_p.h
3753 -no-libtiff ........ Do not compile TIFF support.
3754 -qt-libtiff ........ Use the libtiff bundled with Qt.
3755 + -system-libtiff .... Use libtiff from the operating system.
3756 See http://www.libtiff.org
3758 -no-libpng ......... Do not compile PNG support.
3759 -qt-libpng ......... Use the libpng bundled with Qt.
3760 + -system-libpng ..... Use libpng from the operating system.
3761 See http://www.libpng.org/pub/png
3763 -no-libmng ......... Do not compile MNG support.
3764 -qt-libmng ......... Use the libmng bundled with Qt.
3765 + -system-libmng ..... Use libmng from the operating system.
3766 See http://www.libmng.com
3768 -no-libjpeg ........ Do not compile JPEG support.
3769 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3770 + -system-libjpeg .... Use libjpeg from the operating system.
3771 See http://www.ijg.org
3773 -no-openssl ........ Do not compile support for OpenSSL.
3774 + -openssl ........... Enable run-time OpenSSL support.
3775 -openssl-linked .... Enabled linked OpenSSL support.
3777 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3782 -make <part> ....... Add part to the list of parts to be built at make time.
3783 ($QT_DEFAULT_BUILD_PARTS)
3784 -nomake <part> ..... Exclude part from the list of parts to be built.
3786 -R <string> ........ Add an explicit runtime library path to the Qt
3788 -l <string> ........ Add an explicit library.
3790 -no-rpath .......... Do not use the library install path as a runtime
3792 + -rpath ............. Link Qt libraries and executables using the library
3793 install path as a runtime library path. Equivalent
3794 to -R install_libpath
3796 -continue .......... Continue as far as possible if an error occurs.
3798 -verbose, -v ....... Print verbose information about each step of the
3801 -silent ............ Reduce the build output so that warnings and errors
3802 can be seen more easily.
3804 * -no-optimized-qmake ... Do not build qmake optimized.
3805 -optimized-qmake ...... Build qmake optimized.
3807 -no-gui ............ Don't build the Qt GUI library
3809 $NSN -no-nis ............ Do not compile NIS support.
3810 $NSY -nis ............... Compile NIS support.
3812 $CUN -no-cups ........... Do not compile CUPS support.
3813 $CUY -cups .............. Compile CUPS support.
3814 Requires cups/cups.h and libcups.so.2.
3816 $CIN -no-iconv .......... Do not compile support for iconv(3).
3817 $CIY -iconv ............. Compile support for iconv(3).
3819 $PHN -no-pch ............ Do not use precompiled header support.
3820 $PHY -pch ............... Use precompiled header support.
3822 $DBN -no-dbus ........... Do not compile the QtDBus module.
3823 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3824 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3826 -reduce-relocations ..... Reduce relocations in the libraries through extra
3827 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3828 experimental; needs GNU ld >= 2.18).
3831 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3832 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3839 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3847 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
3851 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3852 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3858 if [ "$PLATFORM_X11" = "yes" ]; then
3859 if [ "$CFG_SM" = "no" ]; then
3866 if [ "$CFG_XSHAPE" = "no" ]; then
3873 if [ "$CFG_XVIDEO" = "no" ]; then
3880 if [ "$CFG_XINERAMA" = "no" ]; then
3887 if [ "$CFG_FONTCONFIG" = "no" ]; then
3894 if [ "$CFG_XCURSOR" = "no" ]; then
3901 if [ "$CFG_XFIXES" = "no" ]; then
3908 if [ "$CFG_XRANDR" = "no" ]; then
3915 if [ "$CFG_XRENDER" = "no" ]; then
3922 if [ "$CFG_MITSHM" = "no" ]; then
3929 if [ "$CFG_XINPUT" = "no" ]; then
3936 if [ "$CFG_XKB" = "no" ]; then
3943 if [ "$CFG_IM" = "no" ]; then
3954 -no-gtkstyle ....... Do not build the GTK theme integration.
3955 + -gtkstyle .......... Build the GTK theme integration.
3957 * -no-nas-sound ...... Do not compile in NAS sound support.
3958 -system-nas-sound .. Use NAS libaudio from the operating system.
3959 See http://radscan.com/nas.html
3961 -egl ............... Use EGL instead of GLX to manage contexts.
3962 When building for desktop OpenGL, this option will
3963 make Qt use EGL to manage contexts rather than the
3964 GLX, which is the default. Note: For OpenGL ES, EGL
3967 -no-opengl ......... Do not support OpenGL.
3968 + -opengl <api> ...... Enable OpenGL support.
3969 With no parameter, this will auto-detect the "best"
3970 OpenGL API to use. If desktop OpenGL is available, it
3971 will be used. Use desktop, es1, or es2 for <api>
3972 to force the use of the Desktop (OpenGL 1.x or 2.x),
3973 OpenGL ES 1.x Common profile, or 2.x APIs instead.
3975 -no-openvg ........ Do not support OpenVG.
3976 + -openvg ........... Enable OpenVG support.
3977 Requires EGL support, typically supplied by an OpenGL
3978 or other graphics implementation.
3980 $SMN -no-sm ............. Do not support X Session Management.
3981 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3983 $SHN -no-xshape ......... Do not compile XShape support.
3984 $SHY -xshape ............ Compile XShape support.
3985 Requires X11/extensions/shape.h.
3987 $XVN -no-xvideo ......... Do not compile XVideo support.
3988 $XVY -xvideo ............ Compile XVideo support.
3989 Requires X11/extensions/Xv.h & Xvlib.h.
3991 $SHN -no-xsync .......... Do not compile XSync support.
3992 $SHY -xsync ............. Compile XSync support.
3993 Requires X11/extensions/sync.h.
3995 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3996 $XAY -xinerama .......... Compile Xinerama support.
3997 Requires X11/extensions/Xinerama.h and libXinerama.
3998 By default, Xinerama support will be compiled if
3999 available and the shared libraries are dynamically
4002 $XCN -no-xcursor ........ Do not compile Xcursor support.
4003 $XCY -xcursor ........... Compile Xcursor support.
4004 Requires X11/Xcursor/Xcursor.h and libXcursor.
4005 By default, Xcursor support will be compiled if
4006 available and the shared libraries are dynamically
4009 $XFN -no-xfixes ......... Do not compile Xfixes support.
4010 $XFY -xfixes ............ Compile Xfixes support.
4011 Requires X11/extensions/Xfixes.h and libXfixes.
4012 By default, Xfixes support will be compiled if
4013 available and the shared libraries are dynamically
4016 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4017 $XZY -xrandr ............ Compile Xrandr support.
4018 Requires X11/extensions/Xrandr.h and libXrandr.
4020 $XRN -no-xrender ........ Do not compile Xrender support.
4021 $XRY -xrender ........... Compile Xrender support.
4022 Requires X11/extensions/Xrender.h and libXrender.
4024 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4025 $XMY -mitshm ............ Compile MIT-SHM support.
4026 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4028 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4029 $FCGY -fontconfig ........ Compile FontConfig support.
4030 Requires fontconfig/fontconfig.h, libfontconfig,
4031 freetype.h and libfreetype.
4033 $XIN -no-xinput ......... Do not compile Xinput support.
4034 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4035 which requires IRIX with wacom.h and libXi or
4036 XFree86 with X11/extensions/XInput.h and libXi.
4038 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4039 $XKY -xkb ............... Compile XKB support.
4044 if [ "$PLATFORM_MAC" = "yes" ]; then
4049 -Fstring ........... Add an explicit framework path.
4050 -fw string ......... Add an explicit framework.
4052 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
4054 -carbon .............Build the Carbon version of Qt. 64-bit archs
4055 are not supported by carbon and will be built
4058 * -framework ......... Build Qt as a series of frameworks and
4059 link tools against those frameworks.
4060 -no-framework ...... Do not build Qt as a series of frameworks.
4062 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4063 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4065 -universal ......... Equivalent to -arch "ppc x86"
4067 -arch <arch> ....... Build Qt for <arch>
4068 Example values for <arch>: x86 ppc x86_64 ppc64
4069 Multiple -arch arguments can be specified.
4071 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4072 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4077 if [ "$PLATFORM_QWS" = "yes" ]; then
4080 Qt for Embedded Linux only:
4082 -xplatform target ... The target platform when cross-compiling.
4084 -no-feature-<feature> Do not compile in <feature>.
4085 -feature-<feature> .. Compile in <feature>. The available features
4086 are described in src/corelib/global/qfeatures.txt
4088 -embedded <arch> .... This will enable the embedded build, you must have a
4089 proper license for this switch to work.
4090 Example values for <arch>: arm mips x86 generic
4092 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4093 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4095 The floating point format is usually autodetected by configure. Use this
4096 to override the detected value.
4098 -little-endian ...... Target platform is little endian (LSB first).
4099 -big-endian ......... Target platform is big endian (MSB first).
4101 -host-little-endian . Host platform is little endian (LSB first).
4102 -host-big-endian .... Host platform is big endian (MSB first).
4104 You only need to specify the endianness when
4105 cross-compiling, otherwise the host
4106 endianness will be used.
4108 -no-freetype ........ Do not compile in Freetype2 support.
4109 -qt-freetype ........ Use the libfreetype bundled with Qt.
4110 * -system-freetype .... Use libfreetype from the operating system.
4111 See http://www.freetype.org/
4113 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4114 default ($CFG_QCONFIG).
4116 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4117 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4119 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4120 by default all available decorations are on.
4121 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4122 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4123 linked to at run time.