2 #############################################################################
4 ## Copyright (C) 2011 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 #-------------------------------------------------------------------------------
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 #-------------------------------------------------------------------------------
191 if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ] && [ -d /System/Library/Frameworks/Carbon.framework ]; then
193 # ~ the Carbon SDK exists
194 # ~ src/gui/base/qapplication_mac.cpp is present
195 # ~ this is the internal edition and Qt/Mac sources exist
197 elif [ -f "$relpath"/src/gui/kernel/qapplication_qws.cpp ]; then
199 # ~ src/gui/base/qapplication_qws.cpp is present
200 # ~ this is the free or commercial edition
201 # ~ this is the internal edition and Qt Embedded is explicitly enabled
202 if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ]; then
203 # This is a depot build, or an all-platforms package
206 # This must be the embedded package, since the Qt/Mac source files are not present
211 #-----------------------------------------------------------------------------
212 # Qt version detection
213 #-----------------------------------------------------------------------------
214 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
218 if [ -n "$QT_VERSION" ]; then
219 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
220 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
221 if [ -n "$MAJOR" ]; then
222 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
223 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
224 QT_MAJOR_VERSION="$MAJOR"
225 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
226 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
229 if [ -z "$QT_MAJOR_VERSION" ]; then
230 echo "Cannot process version from qglobal.h: $QT_VERSION"
231 echo "Cannot proceed."
235 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
236 if [ -z "$QT_PACKAGEDATE" ]; then
237 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
238 echo "Cannot proceed"
242 #-------------------------------------------------------------------------------
244 #-------------------------------------------------------------------------------
250 EditionString=Commercial
254 # parse the arguments, setting things to "yes" or "no"
255 while [ "$#" -gt 0 ]; do
259 #Autoconf style options
261 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
265 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
269 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
270 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
273 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
278 # this option may or may not be followed by an argument
279 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
286 -h|help|--help|-help)
287 if [ "$VAL" = "yes" ]; then
289 COMMERCIAL_USER="no" #doesn't matter we will display the help
292 COMMERCIAL_USER="no" #doesn't matter we will display the help
296 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
300 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
307 if [ "$UNKNOWN_ARG" = "yes" ]; then
317 if [ "$PLATFORM_QWS" != "no" ]; then
318 if [ "$PLATFORM_QWS" = "maybe" ]; then
324 echo "No license exists to enable Qt for Embedded Linux. Disabling."
337 COMMERCIAL_USER="yes"
351 if [ "$COMMERCIAL_USER" = "ask" ]; then
353 echo "Which edition of Qt do you want to use ?"
355 echo "Type 'c' if you want to use the Commercial Edition."
356 echo "Type 'o' if you want to use the Open Source Edition."
360 if [ "$commercial" = "c" ]; then
361 COMMERCIAL_USER="yes"
363 elif [ "$commercial" = "o" ]; then
370 if [ "$CFG_NOKIA" = "yes" ]; then
372 Edition="NokiaInternalBuild"
373 EditionString="Nokia Internal Build"
374 QT_EDITION="QT_EDITION_OPENSOURCE"
375 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
376 elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
377 # Commercial preview release
378 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
381 QT_EDITION="QT_EDITION_DESKTOP"
382 LicenseType="Technology Preview"
383 elif [ $COMMERCIAL_USER = "yes" ]; then
384 # one of commercial editions
385 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
386 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
388 # read in the license file
389 if [ -f "$LICENSE_FILE" ]; then
390 . "$LICENSE_FILE" >/dev/null 2>&1
391 if [ -z "$LicenseKeyExt" ]; then
393 echo "You are using an old license file."
395 echo "Please install the license file supplied by Nokia,"
396 echo "or install the Qt Open Source Edition if you intend to"
397 echo "develop free software."
400 if [ -z "$Licensee" ]; then
402 echo "Invalid license key. Please check the license key."
406 if [ -z "$LicenseKeyExt" ]; then
408 echo $ECHO_N "Please enter your license key: $ECHO_C"
410 Licensee="Unknown user"
415 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
416 && LicenseValid="yes" \
418 if [ "$LicenseValid" != "yes" ]; then
420 echo "Invalid license key. Please check the license key."
423 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
424 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
425 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
426 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
428 # determine which edition we are licensed to use
429 case "$LicenseTypeCode" in
431 LicenseType="Commercial"
435 QT_EDITION="QT_EDITION_UNIVERSAL"
438 Edition="FullFramework"
439 EditionString="Full Framework"
440 QT_EDITION="QT_EDITION_DESKTOP"
443 Edition="GUIFramework"
444 EditionString="GUI Framework"
445 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
450 LicenseType="Evaluation"
451 QMakeVar add DEFINES QT_EVAL
455 QT_EDITION="QT_EDITION_EVALUATION"
460 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
462 echo "Invalid license key. Please check the license key."
466 # verify that we are licensed to use Qt on this platform
468 case "$PlatformCode" in
471 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
475 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
478 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
479 X9,* | XC,* | XU,* | XW,* | XM,*)
481 LICENSE_EXTENSION="-ALLOS"
483 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
484 # Qt for Embedded Linux
485 LICENSE_EXTENSION="-EMBEDDED"
487 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
489 LICENSE_EXTENSION="-EMBEDDED"
491 FM,*,no | LM,yes,* | ZM,no,no)
493 LICENSE_EXTENSION="-DESKTOP"
497 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
498 [ "$PLATFORM_QWS" = "yes" ] && Platform='Embedded Linux'
500 echo "You are not licensed for the $Platform platform."
502 echo "Please contact qt-info@nokia.com to upgrade your license to"
503 echo "include the $Platform platform, or install the Qt Open Source Edition"
504 echo "if you intend to develop free software."
509 if test -r "$relpath/.LICENSE"; then
510 # Generic, non-final license
512 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
517 *TECHNOLOGY?PREVIEW*)
524 echo >&2 "Invalid license files; cannot continue"
529 EditionString="$Edition"
530 QT_EDITION="QT_EDITION_DESKTOP"
533 case "$LicenseFeatureCode" in
536 case "$LicenseType" in
538 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
541 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
547 case "$LicenseType" in
549 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
552 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
558 echo "Invalid license key. Please check the license key."
562 case "$LicenseFeatureCode" in
570 if [ '!' -f "$outpath/LICENSE" ]; then
571 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
572 echo "this software has disappeared."
574 echo "Sorry, you are not licensed to use this software."
575 echo "Try re-installing."
579 elif [ $COMMERCIAL_USER = "no" ]; then
580 # Open Source edition - may only be used under the terms of the GPL or LGPL.
581 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
582 Licensee="Open Source"
584 EditionString="Open Source"
585 QT_EDITION="QT_EDITION_OPENSOURCE"
588 #-------------------------------------------------------------------------------
589 # initalize variables
590 #-------------------------------------------------------------------------------
592 SYSTEM_VARIABLES="CC CXX CFLAGS CXXFLAGS LDFLAGS"
593 for varname in $SYSTEM_VARIABLES; do
594 qmakevarname="${varname}"
595 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
596 if [ "${varname}" = "LDFLAGS" ]; then
597 qmakevarname="LFLAGS"
600 'if [ -n "\$'${varname}'" ]; then
601 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
605 # Use CC/CXX to run config.tests
606 mkdir -p "$outpath/config.tests"
607 rm -f "$outpath/config.tests/.qmake.cache"
608 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
610 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
611 QMakeVar add decorations "default windows styled"
612 QMakeVar add mouse-drivers "pc"
613 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
614 QMakeVar add gfx-drivers "linuxfb"
615 QMakeVar add mouse-drivers "linuxtp"
617 QMakeVar add kbd-drivers "tty"
619 if [ "$CFG_DEV" = "yes" ]; then
620 QMakeVar add kbd-drivers "um"
623 # QTDIR may be set and point to an old or system-wide Qt installation
626 # the minimum version of libdbus-1 that we require:
627 MIN_DBUS_1_VERSION=0.93
629 # initalize internal variables
630 CFG_CONFIGURE_EXIT_ON_ERROR=yes
632 CFG_EXCEPTIONS=unspecified
633 CFG_GUI=auto # (yes|no|auto)
634 CFG_SCRIPT=auto # (yes|no|auto)
635 CFG_SCRIPTTOOLS=auto # (yes|no|auto)
636 CFG_XMLPATTERNS=auto # (yes|no|auto)
650 CFG_SYMBIAN_DEFFILES=auto
668 CFG_OPENVG_LC_INCLUDES=no
670 CFG_OPENVG_ON_OPENGL=no
672 CFG_EGL_GLES_INCLUDES=no
675 CFG_QWS_FREETYPE=auto
678 QT_DEFAULT_BUILD_PARTS="libs tools examples demos docs translations"
683 CFG_PHONON_BACKEND=yes
685 CFG_AUDIO_BACKEND=auto
688 CFG_DECLARATIVE_DEBUG=yes
689 CFG_WEBKIT=auto # (yes|no|auto|debug)
690 CFG_JAVASCRIPTCORE_JIT=auto
692 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
693 CFG_GFX_ON="linuxfb multiscreen"
694 CFG_GFX_PLUGIN_AVAILABLE=
697 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
698 CFG_KBD_ON="tty" #default, see QMakeVar above
699 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
700 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
702 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
703 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
704 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
705 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
710 CFG_KBD_PLUGIN_AVAILABLE=
713 CFG_MOUSE_PLUGIN_AVAILABLE=
718 CFG_DECORATION_AVAILABLE="styled windows default"
719 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
720 CFG_DECORATION_PLUGIN_AVAILABLE=
721 CFG_DECORATION_PLUGIN=
737 CFG_SEPARATE_DEBUG_INFO=no
738 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
739 CFG_REDUCE_EXPORTS=auto
749 CFG_REDUCE_RELOCATIONS=no
754 CFG_ACCESSIBILITY=auto
758 CFG_DOUBLEFORMAT=auto
762 CFG_CLOCK_GETTIME=auto
763 CFG_CLOCK_MONOTONIC=auto
772 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
777 COMMANDLINE_MAC_CARBON=no
779 CFG_PREFIX_INSTALL=yes
787 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian/linux-gcce"
788 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
791 OPT_CONFIRM_LICENSE=no
797 CFG_GRAPHICS_SYSTEM=default
805 # initalize variables used for installation
814 QT_INSTALL_TRANSLATIONS=
820 #flags for SQL drivers
828 QT_LFLAGS_ODBC="-lodbc"
831 # flags for libdbus-1
835 # flags for Glib (X11 only)
839 # flags for GStreamer (X11 only)
843 #flag for Symbian fpu settings
846 # flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
847 QT_CFLAGS_CONNSETTINGS=
848 QT_LIBS_CONNSETTINGS=
850 #-------------------------------------------------------------------------------
851 # check SQL drivers, mouse drivers and decorations available in this package
852 #-------------------------------------------------------------------------------
854 # opensource version removes some drivers, so force them to be off
860 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
861 for a in "$relpath/src/plugins/sqldrivers/"*; do
863 base_a=`basename "$a"`
864 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
865 eval "CFG_SQL_${base_a}=auto"
870 CFG_DECORATION_PLUGIN_AVAILABLE=
871 if [ -d "$relpath/src/plugins/decorations" ]; then
872 for a in "$relpath/src/plugins/decorations/"*; do
874 base_a=`basename "$a"`
875 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
880 CFG_KBD_PLUGIN_AVAILABLE=
881 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
882 for a in "$relpath/src/plugins/kbddrivers/"*; do
884 base_a=`basename "$a"`
885 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
890 CFG_MOUSE_PLUGIN_AVAILABLE=
891 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
892 for a in "$relpath/src/plugins/mousedrivers/"*; do
894 base_a=`basename "$a"`
895 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
900 CFG_GFX_PLUGIN_AVAILABLE=
901 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
902 for a in "$relpath/src/plugins/gfxdrivers/"*; do
904 base_a=`basename "$a"`
905 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
908 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
911 #-------------------------------------------------------------------------------
912 # parse command line arguments
913 #-------------------------------------------------------------------------------
915 # parse the arguments, setting things to "yes" or "no"
916 while [ "$#" -gt 0 ]; do
920 #Autoconf style options
922 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
926 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
930 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
931 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
934 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
938 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
942 -no-*-*|-plugin-*-*|-qt-*-*)
943 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
944 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
961 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
964 #Qt style yes options
965 -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|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles)
966 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
969 #Qt style options that pass an argument
971 if [ "$PLATFORM_QWS" != "yes" ]; then
973 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
977 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
981 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config)
982 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
986 #Qt style complex options in one command
987 -enable-*|-disable-*)
988 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
989 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
991 #Qt Builtin/System style options
992 -no-*|-system-*|-qt-*)
993 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
994 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
996 #Options that cannot be generalized
1003 # this option may or may not be followed by an argument
1004 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1013 # this option may or may not be followed by an argument
1014 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1023 # this option may or may not be followed by an argument
1024 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1032 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1033 # this option may or may not be followed by an argument
1034 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1043 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1047 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1055 VAR="graphicssystem"
1059 -runtimegraphicssystem)
1060 VAR="runtimegraphicssystem"
1071 if [ "$1" = "-D" ]; then
1075 VAL=`echo $1 | sed 's,-D,,'`
1080 # this option may or may not be followed by an argument
1081 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1090 if [ "$1" = "-I" ]; then
1094 VAL=`echo $1 | sed 's,-I,,'`
1099 if [ "$1" = "-L" ]; then
1103 VAL=`echo $1 | sed 's,-L,,'`
1108 if [ "$1" = "-R" ]; then
1112 VAL=`echo $1 | sed 's,-R,,'`
1117 VAL=`echo $1 | sed 's,-l,,'`
1121 if [ "$1" = "-F" ]; then
1125 VAL=`echo $1 | sed 's,-F,,'`
1130 if [ "$1" = "-fw" ]; then
1134 VAL=`echo $1 | sed 's,-fw,,'`
1138 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1145 if [ "$UNKNOWN_ARG" = "yes" ]; then
1146 echo "$1: unknown argument"
1157 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1158 CFG_QT3SUPPORT="$VAL"
1164 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1165 CFG_ACCESSIBILITY="$VAL"
1174 CFG_USE_GNUMAKE="$VAL"
1177 CFG_MYSQL_CONFIG="$VAL"
1180 QT_INSTALL_PREFIX="$VAL"
1183 QT_HOST_PREFIX="$VAL"
1186 QT_FORCE_PKGCONFIG=yes
1189 QT_INSTALL_DOCS="$VAL"
1192 QT_INSTALL_HEADERS="$VAL"
1195 QT_INSTALL_PLUGINS="$VAL"
1198 QT_INSTALL_IMPORTS="$VAL"
1201 QT_INSTALL_DATA="$VAL"
1204 QT_INSTALL_LIBS="$VAL"
1213 QT_INSTALL_TRANSLATIONS="$VAL"
1215 sysconfdir|settingsdir)
1216 QT_INSTALL_SETTINGS="$VAL"
1219 QT_INSTALL_EXAMPLES="$VAL"
1222 QT_INSTALL_DEMOS="$VAL"
1228 QT_INSTALL_BINS="$VAL"
1231 CFG_USER_BUILD_KEY="$VAL"
1238 if [ "$PLATFORM_QWS" != "no" ]; then
1239 if [ "$PLATFORM_QWS" = "maybe" ]; then
1245 echo "No license exists to enable Qt for Embedded Linux. Disabling."
1250 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1257 if [ "$VAL" = "little" ]; then
1258 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1259 elif [ "$VAL" = "big" ]; then
1260 CFG_ENDIAN="Q_BIG_ENDIAN"
1266 if [ "$VAL" = "little" ]; then
1267 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1268 elif [ "$VAL" = "big" ]; then
1269 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1275 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1282 CFG_QWS_DEPTHS="$VAL"
1285 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1286 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1287 [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
1289 if [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
1297 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1305 if [ "$PLATFORM_QWS" = "yes" ]; then
1306 echo "Error: Graphics System plugins are not supported on QWS."
1307 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1308 echo " rather than existing as a separate plugin."
1312 if [ "$VAL" = "opengl" ]; then
1313 CFG_GRAPHICS_SYSTEM="opengl"
1314 elif [ "$VAL" = "openvg" ]; then
1315 CFG_GRAPHICS_SYSTEM="openvg"
1316 elif [ "$VAL" = "raster" ]; then
1317 CFG_GRAPHICS_SYSTEM="raster"
1318 elif [ "$VAL" = "runtime" ]; then
1319 CFG_GRAPHICS_SYSTEM="runtime"
1325 runtimegraphicssystem)
1326 if [ "$VAL" != "runtime" ]; then
1327 CFG_RUNTIME_SYSTEM="$VAL"
1331 qvfb) # left for commandline compatibility, not documented
1332 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1333 if [ "$VAL" = "yes" ]; then
1334 QMakeVar add gfx-drivers qvfb
1335 QMakeVar add kbd-drivers qvfb
1336 QMakeVar add mouse-drivers qvfb
1337 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1338 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1339 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1346 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1349 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1352 if [ "$PLATFORM_MAC" = "yes" ]; then
1354 elif [ "$PLATFORM_QWS" = "yes" ]; then
1357 if [ "$CFG_FRAMEWORK" = "auto" ]; then
1363 if [ "$PLATFORM_MAC" = "yes" ]; then
1370 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1371 CFG_MAC_DWARF2="$VAL"
1377 # if this is a Mac then "windows" probably means
1378 # we are cross-compiling for MinGW
1379 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1380 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1389 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1390 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1396 # do nothing - Cocoa is the default.
1399 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1400 CFG_MAC_CARBON="$VAL"
1401 COMMANDLINE_MAC_CARBON="$VAL"
1408 if [ "$PLATFORM_MAC" = "yes" ]; then
1409 CFG_FRAMEWORK="$VAL"
1415 if [ "$VAL" = "yes" ]; then
1417 QMakeVar add QMAKE_CFLAGS -pg
1418 QMakeVar add QMAKE_CXXFLAGS -pg
1419 QMakeVar add QMAKE_LFLAGS -pg
1420 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1425 exceptions|g++-exceptions)
1426 if [ "$VAL" = "no" ]; then
1428 elif [ "$VAL" = "yes" ]; then
1436 # keep compatibility with old platform names
1442 PLATFORM=hpux-acc-o64
1445 PLATFORM=hpux-acc-64
1448 PLATFORM=hpux-acc-64
1460 PLATFORM=reliant-cds-64
1463 PLATFORM=solaris-cc-64
1466 PLATFORM=unixware-cc
1469 PLATFORM=unixware-g++
1472 PLATFORM=unixware-cc
1475 PLATFORM=unixware-g++
1481 i386) NATIVE_64_ARCH="x86_64" ;;
1482 powerpc) NATIVE_64_ARCH="ppc64" ;;
1483 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1485 if [ ! -z "$NATIVE_64_ARCH" ]; then
1486 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1487 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1494 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1497 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1498 CFG_DEBUG_RELEASE="$VAL"
1504 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1505 CFG_RELEASE_QMAKE="$VAL"
1511 if [ "$VAL" = "yes" ]; then
1513 elif [ "$VAL" = "no" ]; then
1520 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1521 CFG_PREFIX_INSTALL="$VAL"
1529 developer-build|commercial|opensource|nokia-developer)
1530 # These switches have been dealt with already
1533 if [ "$VAL" = "yes" ]; then
1535 elif [ "$VAL" = "no" ]; then
1542 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1543 CFG_INCREMENTAL="$VAL"
1549 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1550 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1556 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1557 if [ "$VAL" = "no" ]; then
1558 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1559 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1560 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1566 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1573 [ "$VAL" = "qt" ] && VAL=auto
1574 if [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1581 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1589 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1596 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1603 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1610 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1617 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1624 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1631 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1638 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1639 CFG_PRECOMPILE="$VAL"
1644 separate-debug-info)
1645 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1646 CFG_SEPARATE_DEBUG_INFO="$VAL"
1647 elif [ "$VAL" = "nocopy" ] ; then
1648 CFG_SEPARATE_DEBUG_INFO="yes"
1649 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1655 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1656 CFG_REDUCE_EXPORTS="$VAL"
1662 if [ "$VAL" = "no" ]; then
1669 if [ "$VAL" = "no" ]; then
1676 if [ "$VAL" = "no" ]; then
1683 if [ "$VAL" = "no" ]; then
1690 if [ "$VAL" = "no" ]; then
1697 if [ "$VAL" = "no" ]; then
1704 if [ "$VAL" = "no" ]; then
1711 if [ "$VAL" = "no" ]; then
1718 if [ "$VAL" = "no" ]; then
1728 if [ "$VAL" = "no" ]; then
1735 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1736 CFG_REDUCE_RELOCATIONS="$VAL"
1742 [ "$VAL" = "qt" ] && VAL=yes
1743 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1744 CFG_QWS_FREETYPE="$VAL"
1750 [ "$VAL" = "qt" ] && VAL=yes
1751 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1756 # No longer supported:
1757 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1760 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1767 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1768 CFG_SYMBIAN_DEFFILES="$VAL"
1774 if [ "$VAL" = "system" ]; then
1781 [ "$VAL" = "yes" ] && VAL=qt
1782 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1789 [ "$VAL" = "yes" ] && VAL=qt
1790 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1797 [ "$VAL" = "yes" ] && VAL=qt
1798 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1805 [ "$VAL" = "yes" ] && VAL=qt
1806 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1813 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1820 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1827 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1834 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1841 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1848 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1855 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1856 CFG_FONTCONFIG="$VAL"
1862 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1869 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1876 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1883 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1890 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1891 CFG_GSTREAMER="$VAL"
1897 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1898 CFG_QGTKSTYLE="$VAL"
1904 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ]; then
1905 CFG_QS60STYLE="$VAL"
1911 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1914 if [ "$VAL" = "no" ]; then
1922 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1924 elif [ "$VAL" = "runtime" ]; then
1931 if [ "$VAL" = "yes" ]; then
1938 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1945 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1946 CFG_LARGEFILE="$VAL"
1952 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1959 if [ "$VAL" = "yes" ]; then
1960 CFG_OPENSSL="linked"
1966 if [ "$VAL" = "yes" ]; then
1974 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1975 CFG_XMLPATTERNS="yes"
1977 if [ "$VAL" = "no" ]; then
1978 CFG_XMLPATTERNS="no"
1985 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1988 if [ "$VAL" = "no" ]; then
1996 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1997 CFG_SCRIPTTOOLS="yes"
1999 if [ "$VAL" = "no" ]; then
2000 CFG_SCRIPTTOOLS="no"
2007 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2010 if [ "$VAL" = "no" ]; then
2018 if [ "$VAL" = "yes" ]; then
2019 CFG_DECLARATIVE="yes"
2021 if [ "$VAL" = "no" ]; then
2022 CFG_DECLARATIVE="no"
2029 if [ "$VAL" = "yes" ]; then
2030 CFG_DECLARATIVE_DEBUG="yes"
2032 if [ "$VAL" = "no" ]; then
2033 CFG_DECLARATIVE_DEBUG="no"
2040 [ "$VAL" = "auto" ] && VAL="yes"
2044 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2045 CFG_JAVASCRIPTCORE_JIT="$VAL"
2051 if [ "$VAL" = "yes" ]; then
2052 OPT_CONFIRM_LICENSE="$VAL"
2058 if [ "$VAL" = "yes" ]; then
2064 sql-*|gfx-*|decoration-*|kbd-*|mouse-*)
2065 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2066 # if autoconf style options were used, $VAL can be "yes" or "no"
2067 [ "$VAL" = "yes" ] && VAL=qt
2068 # now $VAL should be "no", "qt", or "plugin"... double-check
2069 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2072 # now $VAL is "no", "qt", or "plugin"
2074 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2075 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2077 # Grab the available values
2080 avail="$CFG_SQL_AVAILABLE"
2083 avail="$CFG_GFX_AVAILABLE"
2084 if [ "$OPT" = "plugin" ]; then
2085 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2089 avail="$CFG_DECORATION_AVAILABLE"
2090 if [ "$OPT" = "plugin" ]; then
2091 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2095 avail="$CFG_KBD_AVAILABLE"
2096 if [ "$OPT" = "plugin" ]; then
2097 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2101 avail="$CFG_MOUSE_AVAILABLE"
2102 if [ "$OPT" = "plugin" ]; then
2103 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2108 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2112 # Check that that user's value is available.
2115 if [ "$VAL" = "$d" ]; then
2120 [ "$found" = yes ] || ERROR=yes
2122 if [ "$VAR" = "sql" ]; then
2123 # set the CFG_SQL_driver
2124 eval "CFG_SQL_$VAL=\$OPT"
2128 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2129 if [ "$OPT" = "plugin" ]; then
2130 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2131 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2132 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2133 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2134 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2135 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2136 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2137 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2140 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2141 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2142 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2143 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2144 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2148 QMakeVar add "${VAR}s" "${VAL}"
2149 elif [ "$OPT" = "no" ]; then
2150 PLUG_VAR="${VAR}-plugin"
2151 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2152 IN_VAR="${VAR}-driver"
2156 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2157 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2158 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2159 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2160 QMakeVar del "${IN_VAR}s" "$VAL"
2161 QMakeVar del "${PLUG_VAR}s" "$VAL"
2163 if [ "$ERROR" = "yes" ]; then
2164 echo "$CURRENT_OPT: unknown argument"
2169 if [ "$VAL" = "yes" ]; then
2170 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2171 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2175 elif [ "$VAL" = "no" ]; then
2176 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2177 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2186 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2193 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2200 D_FLAGS="$D_FLAGS \"$VAL\""
2203 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2206 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2209 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2212 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2215 if [ "$PLATFORM_MAC" = "yes" ]; then
2216 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2217 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2223 if [ "$PLATFORM_MAC" = "yes" ]; then
2224 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2233 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2240 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2241 CFG_PHONON_BACKEND="$VAL"
2247 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2248 CFG_MULTIMEDIA="$VAL"
2260 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2261 CFG_AUDIO_BACKEND="$VAL"
2267 if [ "$VAL" != "no" ]; then
2275 if [ "$UNKNOWN_OPT" = "yes" ]; then
2276 echo "${CURRENT_OPT}: invalid command-line switch"
2282 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2283 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2286 if [ "$CFG_GUI" = "no" ]; then
2287 echo "Warning: -no-gui will disable the qt3support library."
2291 # update QT_CONFIG to show our current predefined configuration
2292 case "$CFG_QCONFIG" in
2293 minimal|small|medium|large|full)
2294 # these are a sequence of increasing functionality
2295 for c in minimal small medium large full; do
2296 QT_CONFIG="$QT_CONFIG $c-config"
2297 [ "$CFG_QCONFIG" = $c ] && break
2301 # not known to be sufficient for anything
2302 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2303 echo >&2 "Error: configuration file not found:"
2304 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2306 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2311 #-------------------------------------------------------------------------------
2312 # build tree initialization
2313 #-------------------------------------------------------------------------------
2315 # where to find which..
2316 unixtests="$relpath/config.tests/unix"
2317 mactests="$relpath/config.tests/mac"
2318 symbiantests="$relpath/config.tests/symbian"
2319 WHICH="$unixtests/which.test"
2321 PERL=`$WHICH perl 2>/dev/null`
2323 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2325 for e in gawk nawk awk; do
2326 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2333 PERL="/usr/bin/perl"
2334 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2338 ### skip this if the user just needs help...
2339 if [ "$OPT_HELP" != "yes" ]; then
2341 # is this a shadow build?
2342 if [ "$OPT_SHADOW" = "maybe" ]; then
2344 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2345 if [ -h "$outpath" ]; then
2346 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2352 if [ "$OPT_SHADOW" = "yes" ]; then
2353 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2354 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2355 echo >&2 "Cannot proceed."
2358 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2361 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2363 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2364 echo "Qt can be built in release mode with separate debug information, so"
2365 echo "-debug-and-release is not necessary anymore"
2369 # detect build style
2370 if [ "$CFG_DEBUG" = "auto" ]; then
2371 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2372 CFG_DEBUG_RELEASE=yes
2374 elif [ "$CFG_DEV" = "yes" ]; then
2375 CFG_DEBUG_RELEASE=no
2378 CFG_DEBUG_RELEASE=no
2382 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2383 QMAKE_CONFIG="$QMAKE_CONFIG build_all"
2386 if [ "$CFG_SILENT" = "yes" ]; then
2387 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2390 # if the source tree is different from the build tree,
2391 # symlink or copy part of the sources
2392 if [ "$OPT_SHADOW" = "yes" ]; then
2393 echo "Preparing build tree..."
2395 if [ -z "$PERL" ]; then
2397 echo "You need perl in your PATH to make a shadow build."
2398 echo "Cannot proceed."
2402 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2404 # symlink the qmake directory
2405 find "$relpath/qmake" | while read a; do
2406 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2407 if [ '!' -f "$my_a" ]; then
2408 if [ -d "$a" ]; then
2409 # directories are created...
2412 a_dir=`dirname "$my_a"`
2413 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2414 # ... and files are symlinked
2415 case `basename "$a"` in
2416 *.o|*.d|GNUmakefile*|qmake)
2427 # make a syncqt script that can be used in the shadow
2428 rm -f "$outpath/bin/syncqt"
2429 if [ -x "$relpath/bin/syncqt" ]; then
2430 mkdir -p "$outpath/bin"
2431 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2432 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
2433 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2434 chmod 755 "$outpath/bin/syncqt"
2437 for i in elf2e32_qtwrapper createpackage patch_capabilities; do
2438 rm -f "$outpath/bin/$i"
2439 if [ -x "$relpath/bin/$i" ]; then
2440 mkdir -p "$outpath/bin"
2441 echo "#!/bin/sh" >"$outpath/bin/$i"
2442 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2443 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2444 chmod 755 "$outpath/bin/$i"
2448 # symlink the mkspecs directory
2449 mkdir -p "$outpath/mkspecs"
2450 rm -rf "$outpath"/mkspecs/*
2451 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2452 rm -f "$outpath/mkspecs/default"
2456 rm -rf "$outpath/mkspecs/$1"
2457 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2458 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2461 # Special case for mkspecs/features directory.
2462 # To be able to place .prf files into a shadow build directory,
2463 # we're creating links for files only. The directory structure is reproduced.
2464 ShadowMkspecs features
2466 # The modules dir is special, too.
2467 ShadowMkspecs modules
2469 # symlink the doc directory
2470 rm -rf "$outpath/doc"
2471 ln -s "$relpath/doc" "$outpath/doc"
2473 # make sure q3porting.xml can be found
2474 mkdir -p "$outpath/tools/porting/src"
2475 rm -f "$outpath/tools/porting/src/q3porting.xml"
2476 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2479 # symlink fonts to be able to run application from build directory
2480 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2481 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2482 mkdir -p "${outpath}/lib"
2483 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2487 if [ "$OPT_FAST" = "auto" ]; then
2488 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2495 # find a make command
2496 if [ -z "$MAKE" ]; then
2498 for mk in gmake make; do
2499 if "$WHICH" $mk >/dev/null 2>&1; then
2504 if [ -z "$MAKE" ]; then
2505 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2506 echo >&2 "Cannot proceed."
2509 # export MAKE, we need it later in the config.tests
2515 #-------------------------------------------------------------------------------
2516 # auto-detect all that hasn't been specified in the arguments
2517 #-------------------------------------------------------------------------------
2519 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2520 if [ "$CFG_EMBEDDED" != "no" ]; then
2521 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2523 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2524 if [ -z "$XPLATFORM" ]; then
2525 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2526 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2530 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2531 if [ -z "$XPLATFORM" ]; then
2532 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2533 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2537 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2538 if [ -z "$XPLATFORM" ]; then
2539 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2540 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2544 if [ -z "$PLATFORM" ]; then
2545 case "$UNAME_MACHINE" in
2547 PLATFORM=qws/linux-x86-g++
2550 PLATFORM=qws/linux-x86_64-g++
2553 PLATFORM=qws/linux-generic-g++
2557 if [ -z "$XPLATFORM" ]; then
2558 if [ "$CFG_EMBEDDED" = "auto" ]; then
2559 if [ -n "$CFG_ARCH" ]; then
2560 CFG_EMBEDDED=$CFG_ARCH
2562 case "$UNAME_MACHINE" in
2570 CFG_EMBEDDED=generic
2575 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2579 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2580 if [ -z "$XPLATFORM" ]; then
2581 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2582 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2586 if [ -z "$XPLATFORM" ]; then
2591 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2597 if [ -z "$PLATFORM" ]; then
2599 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2601 if [ "$PLATFORM_MAC" = "yes" ]; then
2603 # PLATFORM=macx-xcode
2610 #PLATFORM=aix-g++-64
2612 #PLATFORM=aix-xlc-64
2614 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2624 # PLATFORM=dynix-g++
2630 PLATFORM=freebsd-g++
2632 - Also available for FreeBSD: freebsd-icc
2636 PLATFORM=openbsd-g++
2647 #PLATFORM=irix-cc-64
2649 - Also available for IRIX: irix-g++ irix-cc-64
2653 case "$UNAME_MACHINE" in
2655 #PLATFORM=hpuxi-acc-32
2656 PLATFORM=hpuxi-acc-64
2658 - Also available for HP-UXi: hpuxi-acc-32
2664 #PLATFORM=hpux-acc-64
2666 #PLATFORM=hpux-acc-o64
2668 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2677 - Also available for Tru64: tru64-g++
2681 case "$UNAME_MACHINE" in
2683 PLATFORM=linux-g++-64
2690 - Also available for Linux: linux-kcc linux-icc linux-cxx
2694 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2695 PLATFORM="solaris-g++"
2697 #PLATFORM=solaris-g++
2699 #PLATFORM=solaris-cc64
2702 - Also available for Solaris: solaris-g++ solaris-cc-64
2705 ReliantUNIX-*:*|SINIX-*:*)
2706 PLATFORM=reliant-cds
2707 #PLATFORM=reliant-cds-64
2709 - Also available for Reliant UNIX: reliant-cds-64
2719 #PLATFORM=unixware-g++
2720 PLATFORM=unixware-cc
2722 - Also available for OpenUNIX: unixware-g++
2726 #PLATFORM=unixware-g++
2727 PLATFORM=unixware-cc
2729 - Also available for UnixWare: unixware-g++
2736 - Also available for SCO OpenServer: sco-g++
2740 PLATFORM=unixware-g++
2743 PLATFORM=unsupported/qnx-g++
2746 if [ "$OPT_HELP" != "yes" ]; then
2748 for p in $PLATFORMS; do
2749 echo " $relconf $* -platform $p"
2752 echo " The build script does not currently recognize all" >&2
2753 echo " platforms supported by Qt." >&2
2754 echo " Rerun this script with a -platform option listed to" >&2
2755 echo " set the system/compiler combination you use." >&2
2762 if [ "$PLATFORM_QWS" = "yes" ]; then
2764 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2766 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2769 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2771 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2773 if [ -d "$PLATFORM" ]; then
2774 QMAKESPEC="$PLATFORM"
2776 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2778 if [ -d "$XPLATFORM" ]; then
2779 XQMAKESPEC="$XPLATFORM"
2781 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2783 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2784 QT_CROSS_COMPILE=yes
2785 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2788 if [ "$PLATFORM_MAC" = "yes" ]; then
2789 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2791 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2792 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2793 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2794 echo " built with 'macx-g++'" >&2
2800 # check specified platforms are supported
2801 if [ '!' -d "$QMAKESPEC" ]; then
2803 echo " The specified system/compiler is not supported:"
2807 echo " Please see the README file for a complete list."
2811 if [ '!' -d "$XQMAKESPEC" ]; then
2813 echo " The specified system/compiler is not supported:"
2817 echo " Please see the README file for a complete list."
2821 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2823 echo " The specified system/compiler port is not complete:"
2825 echo " $XQMAKESPEC/qplatformdefs.h"
2827 echo " Please contact qt-bugs@trolltech.com."
2832 # now look at the configs and figure out what platform we are config'd for
2833 [ "$CFG_EMBEDDED" = "no" ] \
2834 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2836 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2838 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2839 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2840 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2841 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2842 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2846 #-------------------------------------------------------------------------------
2847 # determine the system architecture
2848 #-------------------------------------------------------------------------------
2849 if [ "$OPT_VERBOSE" = "yes" ]; then
2850 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2853 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2854 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2856 echo "You have specified a target architecture with -embedded and -arch."
2857 echo "The two architectures you have specified are different, so we can"
2858 echo "not proceed. Either set both to be the same, or only use -embedded."
2864 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2865 case `basename "$XPLATFORM"` in
2868 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2870 echo "Please contact qt-info@nokia.com to upgrade your license to"
2871 echo "include this platform, or install the Qt Open Source Edition"
2872 echo "if you intend to develop free software."
2878 if [ -z "${CFG_HOST_ARCH}" ]; then
2879 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2881 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2882 case "$CFG_HOST_ARCH" in
2887 if [ "$OPT_VERBOSE" = "yes" ]; then
2888 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2892 CFG_HOST_ARCH=`uname -p`
2893 if [ "$OPT_VERBOSE" = "yes" ]; then
2894 echo " SGI ($CFG_HOST_ARCH)"
2898 case "$UNAME_MACHINE" in
2900 if [ "$OPT_VERBOSE" = "yes" ]; then
2901 echo " Sun SPARC (sparc)"
2908 if [ "$OPT_VERBOSE" = "yes" ]; then
2909 echo " 64-bit AMD 80x86 (x86_64)"
2911 CFG_HOST_ARCH=x86_64
2914 if [ "$OPT_VERBOSE" = "yes" ]; then
2915 echo " 32-bit Intel 80x86 (i386)"
2923 case "$UNAME_MACHINE" in
2925 if [ "$OPT_VERBOSE" = "yes" ]; then
2926 echo " 32-bit Apple PowerPC (powerpc)"
2930 if [ "$OPT_VERBOSE" = "yes" ]; then
2931 echo " 32-bit Intel 80x86 (i386)"
2935 CFG_HOST_ARCH=macosx
2938 if [ "$OPT_VERBOSE" = "yes" ]; then
2939 echo " 64-bit IBM PowerPC (powerpc)"
2941 CFG_HOST_ARCH=powerpc
2944 if [ "$OPT_VERBOSE" = "yes" ]; then
2945 echo " HP PA-RISC (parisc)"
2947 CFG_HOST_ARCH=parisc
2950 if [ "$OPT_VERBOSE" = "yes" ]; then
2951 echo " 32-bit Intel 80x86 (i386)"
2955 *:*:x86_64|*:*:amd64)
2956 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2957 if [ "$OPT_VERBOSE" = "yes" ]; then
2958 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2962 if [ "$OPT_VERBOSE" = "yes" ]; then
2963 echo " 64-bit AMD 80x86 (x86_64)"
2965 CFG_HOST_ARCH=x86_64
2969 if [ "$OPT_VERBOSE" = "yes" ]; then
2970 echo " 32-bit PowerPC (powerpc)"
2972 CFG_HOST_ARCH=powerpc
2975 if [ "$OPT_VERBOSE" = "yes" ]; then
2976 echo " 64-bit PowerPC (powerpc)"
2978 CFG_HOST_ARCH=powerpc
2981 if [ "$OPT_VERBOSE" = "yes" ]; then
2982 echo " IBM S/390 (s390)"
2987 if [ "$OPT_VERBOSE" = "yes" ]; then
2993 if [ "$OPT_VERBOSE" = "yes" ]; then
2994 echo " Linux on SPARC"
2999 case "$UNAME_MACHINE" in
3001 if [ "$OPT_VERBOSE" = "yes" ]; then
3002 echo " QNX on Intel 80x86 (i386)"
3009 if [ "$OPT_VERBOSE" = "yes" ]; then
3010 echo " Trying '$UNAME_MACHINE'..."
3012 CFG_HOST_ARCH="$UNAME_MACHINE"
3017 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3018 if [ -n "$CFG_ARCH" ]; then
3019 CFG_EMBEDDED=$CFG_ARCH
3022 case "$CFG_EMBEDDED" in
3042 CFG_ARCH="$CFG_EMBEDDED"
3045 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3046 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3047 elif echo "$XPLATFORM" | grep symbian > /dev/null; then
3049 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3050 CFG_ARCH=$CFG_HOST_ARCH
3053 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3054 if [ "$OPT_VERBOSE" = "yes" ]; then
3055 echo " '$CFG_ARCH' is supported"
3058 if [ "$OPT_VERBOSE" = "yes" ]; then
3059 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3063 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3064 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3065 if [ "$OPT_VERBOSE" = "yes" ]; then
3066 echo " '$CFG_HOST_ARCH' is supported"
3069 if [ "$OPT_VERBOSE" = "yes" ]; then
3070 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3072 CFG_HOST_ARCH=generic
3076 if [ "$OPT_VERBOSE" = "yes" ]; then
3077 echo "System architecture: '$CFG_ARCH'"
3078 if [ "$PLATFORM_QWS" = "yes" ]; then
3079 echo "Host architecture: '$CFG_HOST_ARCH'"
3083 #-------------------------------------------------------------------------------
3084 # tests that don't need qmake (must be run before displaying help)
3085 #-------------------------------------------------------------------------------
3087 if [ -z "$PKG_CONFIG" ]; then
3088 # See if PKG_CONFIG is set in the mkspec:
3089 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3091 if [ -z "$PKG_CONFIG" ]; then
3092 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3095 # Work out if we can use pkg-config
3096 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3097 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3099 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3100 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3101 echo >&2 "environment!"
3103 if [ -z "$PKG_CONFIG_PATH" ]; then
3105 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3106 echo >&2 "the host compiler's .pc files will be used. This is probably"
3107 echo >&2 "not what you want."
3109 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3111 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3112 echo >&2 "been set. This means your toolchain's .pc files must contain"
3113 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3114 echo >&2 "tests are failing, please check these files."
3119 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3120 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3121 echo >&2 "dependencies"
3127 # process CFG_MAC_ARCHS
3128 if [ "$PLATFORM_MAC" = "yes" ]; then
3129 # check -arch arguments for validity.
3130 ALLOWED="x86 ppc x86_64 ppc64 i386"
3131 # Save the list so we can re-write it using only valid values
3132 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
3134 for i in $CFG_MAC_ARCHS_IN
3136 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
3137 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
3140 if [ "$i" = "i386" -o "$i" = "x86" ]; then
3141 # These are synonymous values
3142 # CFG_MAC_ARCHS requires x86 while GCC requires i386
3143 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
3144 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
3146 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
3147 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
3152 # pass on $CFG_SDK to the configure tests.
3153 if [ '!' -z "$CFG_SDK" ]; then
3154 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3157 # find the default framework value
3158 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
3159 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3160 CFG_FRAMEWORK="$CFG_SHARED"
3161 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3163 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3171 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3172 TEST_COMPILER="$CXX"
3174 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3175 if [ "$XPLATFORM" != "symbian-sbsv2" ]; then
3176 #for Symbian we don't need this checking
3177 if [ -z "$TEST_COMPILER" ]; then
3178 echo "ERROR: Cannot set the compiler for the configuration tests"
3184 # auto-detect precompiled header support
3185 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3186 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3188 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3193 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3195 echo "WARNING: Using universal binaries disables precompiled headers."
3200 #auto-detect DWARF2 on the mac
3201 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3202 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3209 # auto-detect support for -Xarch on the mac
3210 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
3211 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3218 # don't autodetect support for separate debug info on objcopy when
3219 # cross-compiling as lots of toolchains seems to have problems with this
3220 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3221 CFG_SEPARATE_DEBUG_INFO="no"
3224 # auto-detect support for separate debug info in objcopy
3225 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3226 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3227 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3228 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3229 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3230 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3231 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3232 CFG_SEPARATE_DEBUG_INFO=no
3236 # binutils on HP-UX is buggy; default to no.
3237 CFG_SEPARATE_DEBUG_INFO=no
3240 CFG_SEPARATE_DEBUG_INFO=yes
3246 # auto-detect -fvisibility support
3247 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3248 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3249 CFG_REDUCE_EXPORTS=no
3251 CFG_REDUCE_EXPORTS=yes
3255 # detect the availability of the -Bsymbolic-functions linker optimization
3256 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3257 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3258 CFG_REDUCE_RELOCATIONS=no
3260 CFG_REDUCE_RELOCATIONS=yes
3264 # auto-detect GNU make support
3265 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3269 # If -opengl wasn't specified, don't try to auto-detect
3270 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3275 if [ "$PLATFORM_MAC" = "yes" ]; then
3276 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3281 # find the default framework value
3282 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
3283 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3284 CFG_FRAMEWORK="$CFG_SHARED"
3285 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3287 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3295 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3296 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3297 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3298 # get the darwin version. 10.0.0 and up means snow leopard.
3299 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3300 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3302 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3307 # x11 tests are done after qmake is built
3310 #setup the build parts
3311 if [ -z "$CFG_BUILD_PARTS" ]; then
3312 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3314 # don't build tools by default when cross-compiling
3315 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3316 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3319 for nobuild in $CFG_NOBUILD_PARTS; do
3320 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3322 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3324 # echo "WARNING: libs is a required part of the build."
3326 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3329 #-------------------------------------------------------------------------------
3330 # post process QT_INSTALL_* variables
3331 #-------------------------------------------------------------------------------
3334 if [ -z "$QT_INSTALL_PREFIX" ]; then
3335 if [ "$CFG_DEV" = "yes" ]; then
3336 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3337 elif [ "$PLATFORM_QWS" = "yes" ]; then
3338 QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
3339 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3340 QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
3342 elif [ -d "$EPOCROOT" ] && echo $XPLATFORM | grep symbian > /dev/null; then
3343 QT_INSTALL_PREFIX="$EPOCROOT/epoc32/"
3344 QT_INSTALL_LIBS="$EPOCROOT/epoc32/release/armv5/lib/"
3346 QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
3349 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3351 if echo $XPLATFORM | grep symbian > /dev/null; then
3352 [ -z "$QT_HOST_PREFIX" ] && QT_HOST_PREFIX="$QT_INSTALL_PREFIX"
3353 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS=
3354 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS=
3355 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS=
3356 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS=
3357 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="\\\\resource\\\\qt$QT_LIBINFIX\\\\plugins"
3358 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="\\\\resource\\\\qt$QT_LIBINFIX\\\\imports"
3359 [ -z "$QT_INSTALL_DATA" ] && QT_INSTALL_DATA=
3360 [ -z "$QT_INSTALL_TRANSLATIONS" ] && QT_INSTALL_TRANSLATIONS="\\\\resource\\\\qt$QT_LIBINFIX\\\\translations"
3361 [ -z "$QT_INSTALL_SETTINGS" ] && QT_INSTALL_SETTINGS=
3362 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES=
3363 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS=
3366 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3367 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3368 if [ "$PLATFORM_MAC" = "yes" ]; then
3369 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3372 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3375 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3378 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3379 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3380 if [ "$PLATFORM_MAC" = "yes" ]; then
3381 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3386 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3389 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3392 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3393 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3394 if [ "$PLATFORM_MAC" = "yes" ]; then
3395 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3396 QT_INSTALL_LIBS="/Libraries/Frameworks"
3400 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3402 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3405 if [ -z "$QT_INSTALL_BINS" ]; then #default
3406 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3407 if [ "$PLATFORM_MAC" = "yes" ]; then
3408 QT_INSTALL_BINS="/Developer/Applications/Qt"
3411 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3414 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3417 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3418 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3419 if [ "$PLATFORM_MAC" = "yes" ]; then
3420 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3423 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3425 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3428 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3429 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3430 if [ "$PLATFORM_MAC" = "yes" ]; then
3431 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3434 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3436 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3439 if [ -z "$QT_INSTALL_DATA" ]; then #default
3440 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3442 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3445 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3446 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3448 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3451 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3452 if [ "$PLATFORM_MAC" = "yes" ]; then
3453 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3455 QT_INSTALL_SETTINGS=/etc/xdg
3458 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3461 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3462 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3463 if [ "$PLATFORM_MAC" = "yes" ]; then
3464 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3467 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3469 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3472 if [ -z "$QT_INSTALL_DEMOS" ]; then #default
3473 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3474 if [ "$PLATFORM_MAC" = "yes" ]; then
3475 QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos"
3478 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos"
3480 QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
3483 #-------------------------------------------------------------------------------
3484 # help - interactive parts of the script _after_ this section please
3485 #-------------------------------------------------------------------------------
3487 # next, emit a usage message if something failed.
3488 if [ "$OPT_HELP" = "yes" ]; then
3489 [ "x$ERROR" = "xyes" ] && echo
3490 if [ "$CFG_NIS" = "no" ]; then
3497 if [ "$CFG_CUPS" = "no" ]; then
3504 if [ "$CFG_ICONV" = "no" ]; then
3511 if [ "$CFG_LARGEFILE" = "no" ]; then
3518 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3525 if [ "$CFG_IPV6" = "auto" ]; then
3529 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3538 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3539 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3540 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3541 [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
3542 [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3543 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3544 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3545 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3546 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3547 [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3548 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3549 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3550 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3551 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3552 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3553 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3554 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3555 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3556 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3557 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3558 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3559 [-no-openssl] [-openssl] [-openssl-linked]
3560 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3561 [-no-javascript-jit] [-javascript-jit]
3562 [-no-script] [-script] [-no-scripttools] [-scripttools]
3563 [-no-declarative] [-declarative][-no-declarative-debug] [-declarative-debug]
3564 [additional platform specific options (see below)]
3567 Installation options:
3569 These are optional, but you may specify install directories.
3571 -prefix <dir> ...... This will install everything relative to <dir>
3572 (default $QT_INSTALL_PREFIX)
3574 if [ "$PLATFORM_QWS" = "yes" ]; then
3577 -hostprefix [dir] .. Tools and libraries needed when developing
3578 applications are installed in [dir]. If [dir] is
3579 not given, the current build directory will be used.
3584 * -prefix-install .... Force a sandboxed "local" installation of
3585 Qt. This will install into
3586 $QT_INSTALL_PREFIX, if this option is
3587 disabled then some platforms will attempt a
3588 "system" install by placing default values to
3589 be placed in a system location other than
3592 You may use these to separate different parts of the install:
3594 -bindir <dir> ......... Executables will be installed to <dir>
3595 (default PREFIX/bin)
3596 -libdir <dir> ......... Libraries will be installed to <dir>
3597 (default PREFIX/lib)
3598 -docdir <dir> ......... Documentation will be installed to <dir>
3599 (default PREFIX/doc)
3600 -headerdir <dir> ...... Headers will be installed to <dir>
3601 (default PREFIX/include)
3602 -plugindir <dir> ...... Plugins will be installed to <dir>
3603 (default PREFIX/plugins)
3604 -importdir <dir> ...... Imports for QML will be installed to <dir>
3605 (default PREFIX/imports)
3606 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3608 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3609 (default PREFIX/translations)
3610 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3611 (default PREFIX/etc/settings)
3612 -examplesdir <dir> .... Examples will be installed to <dir>
3613 (default PREFIX/examples)
3614 -demosdir <dir> ....... Demos will be installed to <dir>
3615 (default PREFIX/demos)
3617 You may use these options to turn on strict plugin loading.
3619 -buildkey <key> .... Build the Qt library and plugins using the specified
3620 <key>. When the library loads plugins, it will only
3621 load those that have a matching key.
3625 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3626 that needs to be evaluated. If the evaluation succeeds, the feature is
3627 included. Here is a short explanation of each option:
3629 * -release ........... Compile and link Qt with debugging turned off.
3630 -debug ............. Compile and link Qt with debugging turned on.
3631 -debug-and-release . Compile and link two versions of Qt, with and without
3632 debugging turned on (Mac only).
3634 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3636 -opensource ........ Compile and link the Open-Source Edition of Qt.
3637 -commercial ........ Compile and link the Commercial Edition of Qt.
3640 * -shared ............ Create and use shared Qt libraries.
3641 -static ............ Create and use static Qt libraries.
3643 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3645 -fast .............. Configure Qt quickly by generating Makefiles only for
3646 library and subdirectory targets. All other Makefiles
3647 are created as wrappers, which will in turn run qmake.
3649 -no-largefile ...... Disables large file support.
3650 + -largefile ......... Enables Qt to access files larger than 4 GB.
3653 if [ "$PLATFORM_QWS" = "yes" ]; then
3660 if [ "$CFG_DBUS" = "no" ]; then
3669 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3670 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3672 -no-accessibility .. Do not compile Accessibility support.
3673 * -accessibility ..... Compile Accessibility support.
3675 $SHN -no-stl ............ Do not compile STL support.
3676 $SHY -stl ............... Compile STL support.
3678 -no-sql-<driver> ... Disable SQL <driver> entirely.
3679 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3681 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3684 Possible values for <driver>:
3685 [ $CFG_SQL_AVAILABLE ]
3687 -system-sqlite ..... Use sqlite from the operating system.
3689 -no-qt3support ..... Disables the Qt 3 support functionality.
3690 * -qt3support ........ Enables the Qt 3 support functionality.
3692 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3693 + -xmlpatterns ....... Build the QtXmlPatterns module.
3694 QtXmlPatterns is built if a decent C++ compiler
3695 is used and exceptions are enabled.
3697 -no-multimedia ..... Do not build the QtMultimedia module.
3698 + -multimedia ........ Build the QtMultimedia module.
3700 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3701 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3703 -no-phonon ......... Do not build the Phonon module.
3704 + -phonon ............ Build the Phonon module.
3705 Phonon is built if a decent C++ compiler is used.
3706 -no-phonon-backend.. Do not build the platform phonon plugin.
3707 + -phonon-backend..... Build the platform phonon plugin.
3709 -no-svg ............ Do not build the SVG module.
3710 + -svg ............... Build the SVG module.
3712 -no-webkit ......... Do not build the WebKit module.
3713 + -webkit ............ Build the WebKit module.
3714 WebKit is built if a decent C++ compiler is used.
3715 -webkit-debug ...... Build the WebKit module with debug symbols.
3717 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3718 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3720 -no-script ......... Do not build the QtScript module.
3721 + -script ............ Build the QtScript module.
3723 -no-scripttools .... Do not build the QtScriptTools module.
3724 + -scripttools ....... Build the QtScriptTools module.
3726 -no-declarative ..... Do not build the declarative module.
3727 + -declarative ....... Build the declarative module.
3729 -no-declarative-debug ..... Do not build the declarative debugging support.
3730 + -declarative-debug ....... Build the declarative debugging support.
3732 -platform target ... The operating system and compiler you are building
3735 See the README file for a list of supported
3736 operating systems and compilers.
3738 if [ "${PLATFORM_QWS}" != "yes" ]; then
3740 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3741 raster - Software rasterizer
3742 opengl - Rendering via OpenGL, Experimental!
3743 openvg - Rendering via OpenVG, Experimental!
3749 -no-mmx ............ Do not compile with use of MMX instructions.
3750 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3751 -no-sse ............ Do not compile with use of SSE instructions.
3752 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3753 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3754 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3755 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3756 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.