2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## conditions contained in a signed written agreement between you and Nokia.
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 #-------------------------------------------------------------------------------
192 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
197 #-----------------------------------------------------------------------------
198 # Qt version detection
199 #-----------------------------------------------------------------------------
200 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
204 if [ -n "$QT_VERSION" ]; then
205 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
206 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
207 if [ -n "$MAJOR" ]; then
208 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
209 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
210 QT_MAJOR_VERSION="$MAJOR"
211 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
212 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
215 if [ -z "$QT_MAJOR_VERSION" ]; then
216 echo "Cannot process version from qglobal.h: $QT_VERSION"
217 echo "Cannot proceed."
221 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
222 if [ -z "$QT_PACKAGEDATE" ]; then
223 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
224 echo "Cannot proceed"
228 #-------------------------------------------------------------------------------
230 #-------------------------------------------------------------------------------
235 EditionString=Commercial
239 # parse the arguments, setting things to "yes" or "no"
240 while [ "$#" -gt 0 ]; do
244 #Autoconf style options
246 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
250 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
254 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
255 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
258 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
263 # this option may or may not be followed by an argument
264 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
273 # this option may or may not be followed by an argument
274 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
281 -h|help|--help|-help)
282 if [ "$VAL" = "yes" ]; then
284 COMMERCIAL_USER="no" #doesn't matter we will display the help
287 COMMERCIAL_USER="no" #doesn't matter we will display the help
291 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
295 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
302 if [ "$UNKNOWN_ARG" = "yes" ]; then
319 if [ "$PLATFORM_QPA" != "no" ]; then
320 if [ "$PLATFORM_QPA" = "maybe" ]; then
327 echo "No license exists to enable Qt QPA. Disabling."
335 COMMERCIAL_USER="yes"
349 if [ "$COMMERCIAL_USER" = "ask" ]; then
351 echo "Which edition of Qt do you want to use ?"
353 echo "Type 'c' if you want to use the Commercial Edition."
354 echo "Type 'o' if you want to use the Open Source Edition."
358 if [ "$commercial" = "c" ]; then
359 COMMERCIAL_USER="yes"
361 elif [ "$commercial" = "o" ]; then
368 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
369 # Commercial preview release
370 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
373 QT_EDITION="QT_EDITION_DESKTOP"
374 LicenseType="Technology Preview"
375 elif [ $COMMERCIAL_USER = "yes" ]; then
376 # one of commercial editions
377 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
378 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
379 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
381 # read in the license file
382 if [ -f "$LICENSE_FILE" ]; then
383 . "$LICENSE_FILE" >/dev/null 2>&1
384 if [ -z "$LicenseKeyExt" ]; then
386 echo "You are using an old license file."
388 echo "Please install the license file supplied by Nokia,"
389 echo "or install the Qt Open Source Edition if you intend to"
390 echo "develop free software."
393 if [ -z "$Licensee" ]; then
395 echo "Invalid license key. Please check the license key."
399 if [ -z "$LicenseKeyExt" ]; then
401 echo $ECHO_N "Please enter your license key: $ECHO_C"
403 Licensee="Unknown user"
408 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
409 && LicenseValid="yes" \
411 if [ "$LicenseValid" != "yes" ]; then
413 echo "Invalid license key. Please check the license key."
416 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
417 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
418 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
419 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
421 # determine which edition we are licensed to use
422 case "$LicenseTypeCode" in
424 LicenseType="Commercial"
428 QT_EDITION="QT_EDITION_UNIVERSAL"
431 Edition="FullFramework"
432 EditionString="Full Framework"
433 QT_EDITION="QT_EDITION_DESKTOP"
436 Edition="GUIFramework"
437 EditionString="GUI Framework"
438 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
443 LicenseType="Evaluation"
444 QMakeVar add DEFINES QT_EVAL
448 QT_EDITION="QT_EDITION_EVALUATION"
453 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
455 echo "Invalid license key. Please check the license key."
459 # verify that we are licensed to use Qt on this platform
461 case "$PlatformCode" in
464 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
468 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
471 ### EMBEDDED_QPA logic missing ###
472 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
473 X9,* | XC,* | XU,* | XW,* | XM,*)
475 LICENSE_EXTENSION="-ALLOS"
477 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
478 # Qt for Embedded Linux
479 LICENSE_EXTENSION="-EMBEDDED"
481 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
483 LICENSE_EXTENSION="-EMBEDDED"
485 FM,*,no | LM,yes,* | ZM,no,no)
487 LICENSE_EXTENSION="-DESKTOP"
491 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
492 [ "$PLATFORM_QWS" = "yes" ] && Platform='Embedded Linux'
494 echo "You are not licensed for the $Platform platform."
496 echo "Please contact qt-info@nokia.com to upgrade your license to"
497 echo "include the $Platform platform, or install the Qt Open Source Edition"
498 echo "if you intend to develop free software."
503 if test -r "$relpath/.LICENSE"; then
504 # Generic, non-final license
506 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
511 *TECHNOLOGY?PREVIEW*)
518 echo >&2 "Invalid license files; cannot continue"
523 EditionString="$Edition"
524 QT_EDITION="QT_EDITION_DESKTOP"
527 case "$LicenseFeatureCode" in
530 case "$LicenseType" in
532 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
535 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
541 case "$LicenseType" in
543 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
546 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
552 echo "Invalid license key. Please check the license key."
556 case "$LicenseFeatureCode" in
564 if [ '!' -f "$outpath/LICENSE" ]; then
565 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
566 echo "this software has disappeared."
568 echo "Sorry, you are not licensed to use this software."
569 echo "Try re-installing."
573 elif [ $COMMERCIAL_USER = "no" ]; then
574 # Open Source edition - may only be used under the terms of the GPL or LGPL.
575 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
576 Licensee="Open Source"
578 EditionString="Open Source"
579 QT_EDITION="QT_EDITION_OPENSOURCE"
582 #-------------------------------------------------------------------------------
583 # initalize variables
584 #-------------------------------------------------------------------------------
586 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
587 for varname in $SYSTEM_VARIABLES; do
588 qmakevarname="${varname}"
589 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
590 if [ "${varname}" = "LDFLAGS" ]; then
591 qmakevarname="LFLAGS"
592 elif [ "${varname}" = "LD" ]; then
596 'if [ -n "\$'${varname}'" ]; then
597 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
601 # Use CC/CXX to run config.tests
602 mkdir -p "$outpath/config.tests"
603 rm -f "$outpath/config.tests/.qmake.cache"
604 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
606 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
607 QMakeVar add decorations "default windows styled"
608 QMakeVar add mouse-drivers "pc"
609 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
610 QMakeVar add gfx-drivers "linuxfb"
611 QMakeVar add mouse-drivers "linuxtp"
613 QMakeVar add kbd-drivers "tty"
615 if [ "$CFG_DEV" = "yes" ]; then
616 QMakeVar add kbd-drivers "um"
619 # QTDIR may be set and point to an old or system-wide Qt installation
622 # the minimum version of libdbus-1 that we require:
623 MIN_DBUS_1_VERSION=0.93
625 # initalize internal variables
626 CFG_CONFIGURE_EXIT_ON_ERROR=yes
628 CFG_EXCEPTIONS=unspecified
629 CFG_GUI=auto # (yes|no|auto)
655 CFG_OPENVG_LC_INCLUDES=no
656 CFG_OPENVG_SHIVA=auto
657 CFG_OPENVG_ON_OPENGL=auto
659 CFG_EGL_GLES_INCLUDES=no
662 CFG_QWS_FREETYPE=auto
665 QT_DEFAULT_BUILD_PARTS="libs examples tests"
669 CFG_AUDIO_BACKEND=auto
671 CFG_DECLARATIVE_DEBUG=yes
672 CFG_JAVASCRIPTCORE_JIT=auto
674 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
675 CFG_GFX_ON="linuxfb multiscreen"
676 CFG_GFX_PLUGIN_AVAILABLE=
679 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
680 CFG_KBD_ON="tty" #default, see QMakeVar above
681 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
682 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
684 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
685 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
686 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
687 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
689 if [ -f "$relpath/src/gui/embedded/qscreenintegrityfb_qws.cpp" ]; then
690 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} integrity"
691 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} integrity"
692 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} integrityfb"
697 CFG_KBD_PLUGIN_AVAILABLE=
700 CFG_MOUSE_PLUGIN_AVAILABLE=
705 CFG_DECORATION_AVAILABLE="styled windows default"
706 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
707 CFG_DECORATION_PLUGIN_AVAILABLE=
708 CFG_DECORATION_PLUGIN=
728 CFG_SEPARATE_DEBUG_INFO=no
729 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
730 CFG_REDUCE_EXPORTS=auto
740 CFG_REDUCE_RELOCATIONS=auto
743 CFG_ACCESSIBILITY=auto
746 CFG_DOUBLEFORMAT=auto
750 CFG_CLOCK_GETTIME=auto
751 CFG_CLOCK_MONOTONIC=auto
760 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
764 CFG_PREFIX_INSTALL=yes
773 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
774 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
778 OPT_CONFIRM_LICENSE=no
792 # initalize variables used for installation
801 QT_INSTALL_TRANSLATIONS=
807 #flags for SQL drivers
815 QT_LFLAGS_ODBC="-lodbc"
818 # flags for libdbus-1
822 # flags for Glib (X11 only)
826 # flags for GStreamer (X11 only)
830 #-------------------------------------------------------------------------------
831 # check SQL drivers, mouse drivers and decorations available in this package
832 #-------------------------------------------------------------------------------
834 # opensource version removes some drivers, so force them to be off
840 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
841 for a in "$relpath/src/plugins/sqldrivers/"*; do
843 base_a=`basename "$a"`
844 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
845 eval "CFG_SQL_${base_a}=auto"
850 CFG_DECORATION_PLUGIN_AVAILABLE=
851 if [ -d "$relpath/src/plugins/decorations" ]; then
852 for a in "$relpath/src/plugins/decorations/"*; do
854 base_a=`basename "$a"`
855 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
860 CFG_KBD_PLUGIN_AVAILABLE=
861 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
862 for a in "$relpath/src/plugins/kbddrivers/"*; do
864 base_a=`basename "$a"`
865 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
870 CFG_MOUSE_PLUGIN_AVAILABLE=
871 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
872 for a in "$relpath/src/plugins/mousedrivers/"*; do
874 base_a=`basename "$a"`
875 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
880 CFG_GFX_PLUGIN_AVAILABLE=
881 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
882 for a in "$relpath/src/plugins/gfxdrivers/"*; do
884 base_a=`basename "$a"`
885 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
888 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
891 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
892 if [ -d "$relpath/src/plugins/imageformats" ]; then
893 for a in "$relpath/src/plugins/imageformats/"*; do
895 base_a=`basename "$a"`
896 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
901 #-------------------------------------------------------------------------------
902 # parse command line arguments
903 #-------------------------------------------------------------------------------
905 # parse the arguments, setting things to "yes" or "no"
906 while [ "$#" -gt 0 ]; do
910 #Autoconf style options
912 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
916 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
920 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
921 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
924 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
928 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
932 -no-*-*|-plugin-*-*|-qt-*-*)
933 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
934 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
938 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
941 #Qt style yes options
942 -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-wayland|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-declarative-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
943 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
946 #Qt style options that pass an argument
948 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
950 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
954 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
958 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
959 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
963 #Qt style complex options in one command
964 -enable-*|-disable-*)
965 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
966 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
968 #Qt Builtin/System style options
969 -no-*|-system-*|-qt-*)
970 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
971 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
973 #Options that cannot be generalized
980 # this option may or may not be followed by an argument
981 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
990 # this option may or may not be followed by an argument
991 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1000 # this option may or may not be followed by an argument
1001 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1010 # this option may or may not be followed by an argument
1011 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1019 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1020 # this option may or may not be followed by an argument
1021 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1030 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1034 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1048 if [ "$1" = "-D" ]; then
1052 VAL=`echo $1 | sed 's,-D,,'`
1057 # this option may or may not be followed by an argument
1058 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1067 if [ "$1" = "-I" ]; then
1071 VAL=`echo $1 | sed 's,-I,,'`
1076 if [ "$1" = "-L" ]; then
1080 VAL=`echo $1 | sed 's,-L,,'`
1085 if [ "$1" = "-R" ]; then
1089 VAL=`echo $1 | sed 's,-R,,'`
1094 VAL=`echo $1 | sed 's,-l,,'`
1098 if [ "$1" = "-F" ]; then
1102 VAL=`echo $1 | sed 's,-F,,'`
1107 if [ "$1" = "-fw" ]; then
1111 VAL=`echo $1 | sed 's,-fw,,'`
1119 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1126 if [ "$UNKNOWN_ARG" = "yes" ]; then
1127 echo "$1: unknown argument"
1138 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1139 CFG_ACCESSIBILITY="$VAL"
1148 CFG_USE_GNUMAKE="$VAL"
1151 CFG_MYSQL_CONFIG="$VAL"
1154 QT_INSTALL_PREFIX="$VAL"
1157 QT_HOST_PREFIX="$VAL"
1160 QT_FORCE_PKGCONFIG=yes
1163 QT_INSTALL_DOCS="$VAL"
1166 QT_INSTALL_HEADERS="$VAL"
1169 QT_INSTALL_PLUGINS="$VAL"
1172 QT_INSTALL_IMPORTS="$VAL"
1175 QT_INSTALL_DATA="$VAL"
1178 QT_INSTALL_LIBS="$VAL"
1187 QT_INSTALL_TRANSLATIONS="$VAL"
1189 sysconfdir|settingsdir)
1190 QT_INSTALL_SETTINGS="$VAL"
1193 QT_INSTALL_EXAMPLES="$VAL"
1196 QT_INSTALL_TESTS="$VAL"
1205 QT_INSTALL_BINS="$VAL"
1225 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1232 if [ "$VAL" = "little" ]; then
1233 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1234 elif [ "$VAL" = "big" ]; then
1235 CFG_ENDIAN="Q_BIG_ENDIAN"
1241 if [ "$VAL" = "little" ]; then
1242 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1243 elif [ "$VAL" = "big" ]; then
1244 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1250 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1257 CFG_QWS_DEPTHS="$VAL"
1260 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1261 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1262 [ "$VAL" = "es2" ]; then
1264 if [ "$VAL" = "es2" ]; then
1272 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1274 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1281 qvfb) # left for commandline compatibility, not documented
1282 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1283 if [ "$VAL" = "yes" ]; then
1284 QMakeVar add gfx-drivers qvfb
1285 QMakeVar add kbd-drivers qvfb
1286 QMakeVar add mouse-drivers qvfb
1287 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1288 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1289 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1296 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1299 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1308 if [ "$BUILD_ON_MAC" = "yes" ]; then
1315 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1316 CFG_MAC_DWARF2="$VAL"
1322 # if this is a Mac then "windows" probably means
1323 # we are cross-compiling for MinGW
1324 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1325 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1334 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1335 CFG_MAC_HARFBUZZ="$VAL"
1342 if [ "$BUILD_ON_MAC" = "yes" ]; then
1343 CFG_FRAMEWORK="$VAL"
1349 if [ "$VAL" = "yes" ]; then
1351 QMakeVar add QMAKE_CFLAGS -pg
1352 QMakeVar add QMAKE_CXXFLAGS -pg
1353 QMakeVar add QMAKE_LFLAGS -pg
1354 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1360 if [ "$VAL" = "yes" ]; then
1361 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1364 exceptions|g++-exceptions)
1365 if [ "$VAL" = "no" ]; then
1367 elif [ "$VAL" = "yes" ]; then
1375 # keep compatibility with old platform names
1381 PLATFORM=hpux-acc-o64
1384 PLATFORM=hpux-acc-64
1387 PLATFORM=hpux-acc-64
1399 PLATFORM=reliant-cds-64
1402 PLATFORM=solaris-cc-64
1405 PLATFORM=unixware-cc
1408 PLATFORM=unixware-g++
1411 PLATFORM=unixware-cc
1414 PLATFORM=unixware-g++
1420 i386) NATIVE_64_ARCH="x86_64" ;;
1421 powerpc) NATIVE_64_ARCH="ppc64" ;;
1422 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1424 if [ ! -z "$NATIVE_64_ARCH" ]; then
1425 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1432 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1435 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1436 CFG_DEBUG_RELEASE="$VAL"
1442 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1443 CFG_RELEASE_QMAKE="$VAL"
1449 if [ "$VAL" = "yes" ]; then
1451 elif [ "$VAL" = "no" ]; then
1458 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1459 CFG_PREFIX_INSTALL="$VAL"
1467 developer-build|commercial|opensource)
1468 # These switches have been dealt with already
1471 if [ "$VAL" = "yes" ]; then
1473 elif [ "$VAL" = "no" ]; then
1480 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1481 CFG_INCREMENTAL="$VAL"
1487 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1488 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1494 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1495 if [ "$VAL" = "no" ]; then
1496 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1497 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1498 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1504 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1511 if [ "$VAL" = "no" ]; then
1518 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1526 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1533 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1540 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1547 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1554 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1561 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1568 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1575 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1582 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1583 CFG_PRECOMPILE="$VAL"
1588 separate-debug-info)
1589 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1590 CFG_SEPARATE_DEBUG_INFO="$VAL"
1591 elif [ "$VAL" = "nocopy" ] ; then
1592 CFG_SEPARATE_DEBUG_INFO="yes"
1593 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1599 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1600 CFG_REDUCE_EXPORTS="$VAL"
1606 if [ "$VAL" = "no" ]; then
1613 if [ "$VAL" = "no" ]; then
1620 if [ "$VAL" = "no" ]; then
1627 if [ "$VAL" = "no" ]; then
1634 if [ "$VAL" = "no" ]; then
1641 if [ "$VAL" = "no" ]; then
1648 if [ "$VAL" = "no" ]; then
1655 if [ "$VAL" = "no" ]; then
1662 if [ "$VAL" = "no" ]; then
1672 if [ "$VAL" = "no" ]; then
1679 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1680 CFG_REDUCE_RELOCATIONS="$VAL"
1686 [ "$VAL" = "qt" ] && VAL=yes
1687 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1688 CFG_QWS_FREETYPE="$VAL"
1694 [ "$VAL" = "qt" ] && VAL=yes
1695 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1700 # No longer supported:
1701 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1704 if [ "$VAL" = "system" ]; then
1711 [ "$VAL" = "yes" ] && VAL=qt
1712 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1719 [ "$VAL" = "yes" ] && VAL=qt
1720 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1727 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1734 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1741 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1748 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1755 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1762 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1769 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1770 CFG_FONTCONFIG="$VAL"
1776 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1783 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1790 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1797 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1804 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1811 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1818 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1825 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1832 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1833 CFG_GSTREAMER="$VAL"
1839 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1840 CFG_QGTKSTYLE="$VAL"
1846 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1849 if [ "$VAL" = "no" ]; then
1857 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1859 elif [ "$VAL" = "runtime" ]; then
1866 if [ "$VAL" = "yes" ]; then
1873 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1880 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1881 CFG_LARGEFILE="$VAL"
1887 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1894 if [ "$VAL" = "yes" ]; then
1895 CFG_OPENSSL="linked"
1901 if [ "$VAL" = "yes" ]; then
1902 CFG_DECLARATIVE_DEBUG="yes"
1904 if [ "$VAL" = "no" ]; then
1905 CFG_DECLARATIVE_DEBUG="no"
1912 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1913 CFG_JAVASCRIPTCORE_JIT="$VAL"
1919 if [ "$VAL" = "yes" ]; then
1920 OPT_CONFIRM_LICENSE="$VAL"
1926 if [ "$VAL" = "yes" ]; then
1932 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
1933 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1934 # if autoconf style options were used, $VAL can be "yes" or "no"
1935 [ "$VAL" = "yes" ] && VAL=qt
1936 # now $VAL should be "no", "qt", or "plugin"... double-check
1937 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1940 # now $VAL is "no", "qt", or "plugin"
1942 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1943 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1945 # Grab the available values
1948 avail="$CFG_SQL_AVAILABLE"
1951 avail="$CFG_GFX_AVAILABLE"
1952 if [ "$OPT" = "plugin" ]; then
1953 avail="$CFG_GFX_PLUGIN_AVAILABLE"
1957 avail="$CFG_DECORATION_AVAILABLE"
1958 if [ "$OPT" = "plugin" ]; then
1959 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
1963 avail="$CFG_KBD_AVAILABLE"
1964 if [ "$OPT" = "plugin" ]; then
1965 avail="$CFG_KBD_PLUGIN_AVAILABLE"
1969 avail="$CFG_MOUSE_AVAILABLE"
1970 if [ "$OPT" = "plugin" ]; then
1971 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
1975 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1976 if [ "$OPT" != "plugin" ]; then
1977 # png is always built in
1983 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1987 # Check that that user's value is available.
1990 if [ "$VAL" = "$d" ]; then
1995 [ "$found" = yes ] || ERROR=yes
1997 if [ "$VAR" = "sql" ]; then
1998 # set the CFG_SQL_driver
1999 eval "CFG_SQL_$VAL=\$OPT"
2001 elif [ "$VAR" = "imageformat" ]; then
2002 [ "$OPT" = "qt" ] && OPT=yes
2003 VAL="`echo $VAL |tr a-z A-Z`"
2004 eval "CFG_$VAL=$OPT"
2008 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2009 if [ "$OPT" = "plugin" ]; then
2010 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2011 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2012 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2013 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2014 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2015 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2016 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2017 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2020 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2021 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2022 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2023 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2024 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2028 QMakeVar add "${VAR}s" "${VAL}"
2029 elif [ "$OPT" = "no" ]; then
2030 PLUG_VAR="${VAR}-plugin"
2031 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2032 IN_VAR="${VAR}-driver"
2036 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2037 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2038 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2039 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2040 QMakeVar del "${IN_VAR}s" "$VAL"
2041 QMakeVar del "${PLUG_VAR}s" "$VAL"
2043 if [ "$ERROR" = "yes" ]; then
2044 echo "$CURRENT_OPT: unknown argument"
2049 if [ "$VAL" = "yes" ]; then
2050 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2051 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2055 elif [ "$VAL" = "no" ]; then
2056 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2057 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2066 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2073 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2080 D_FLAGS="$D_FLAGS \"$VAL\""
2083 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2086 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2089 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2092 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2095 if [ "$BUILD_ON_MAC" = "yes" ]; then
2096 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2097 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2103 if [ "$BUILD_ON_MAC" = "yes" ]; then
2104 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2110 W_FLAGS="$W_FLAGS \"${VAL}\""
2116 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2117 CFG_PHONON_BACKEND="$VAL"
2129 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2130 CFG_AUDIO_BACKEND="$VAL"
2136 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2143 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2144 CFG_FORCE_ASSERTS="$VAL"
2150 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
2160 if [ "$UNKNOWN_OPT" = "yes" ]; then
2161 echo "${CURRENT_OPT}: invalid command-line switch"
2167 # update QT_CONFIG to show our current predefined configuration
2168 case "$CFG_QCONFIG" in
2169 minimal|small|medium|large|full)
2170 # these are a sequence of increasing functionality
2171 for c in minimal small medium large full; do
2172 QT_CONFIG="$QT_CONFIG $c-config"
2173 [ "$CFG_QCONFIG" = $c ] && break
2177 # not known to be sufficient for anything
2178 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2179 echo >&2 "Error: configuration file not found:"
2180 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2182 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2187 #-------------------------------------------------------------------------------
2188 # build tree initialization
2189 #-------------------------------------------------------------------------------
2191 # where to find which..
2192 unixtests="$relpath/config.tests/unix"
2193 mactests="$relpath/config.tests/mac"
2194 WHICH="$unixtests/which.test"
2196 PERL=`$WHICH perl 2>/dev/null`
2198 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2200 for e in gawk nawk awk; do
2201 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2208 PERL="/usr/bin/perl"
2209 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2213 ### skip this if the user just needs help...
2214 if [ "$OPT_HELP" != "yes" ]; then
2216 # is this a shadow build?
2217 if [ "$OPT_SHADOW" = "maybe" ]; then
2219 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2220 if [ -h "$outpath" ]; then
2221 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2227 if [ "$OPT_SHADOW" = "yes" ]; then
2228 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2229 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2230 echo >&2 "Cannot proceed."
2233 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2236 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2238 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2239 echo "Qt can be built in release mode with separate debug information, so"
2240 echo "-debug-and-release is not necessary anymore"
2244 if [ "$CFG_SILENT" = "yes" ]; then
2245 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2248 # if the source tree is different from the build tree,
2249 # symlink or copy part of the sources
2250 if [ "$OPT_SHADOW" = "yes" ]; then
2251 echo "Preparing build tree..."
2253 if [ -z "$PERL" ]; then
2255 echo "You need perl in your PATH to make a shadow build."
2256 echo "Cannot proceed."
2260 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2262 # symlink the qmake directory
2263 find "$relpath/qmake" | while read a; do
2264 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2265 if [ '!' -f "$my_a" ]; then
2266 if [ -d "$a" ]; then
2267 # directories are created...
2270 a_dir=`dirname "$my_a"`
2271 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2272 # ... and files are symlinked
2273 case `basename "$a"` in
2274 *.o|*.d|GNUmakefile*|qmake)
2285 # make a syncqt script that can be used in the shadow
2286 rm -f "$outpath/bin/syncqt"
2287 if [ -x "$relpath/bin/syncqt" ]; then
2288 mkdir -p "$outpath/bin"
2289 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2290 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2291 chmod 755 "$outpath/bin/syncqt"
2294 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2295 rm -f "$outpath/bin/$i"
2296 if [ -x "$relpath/bin/$i" ]; then
2297 mkdir -p "$outpath/bin"
2298 echo "#!/bin/sh" >"$outpath/bin/$i"
2299 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2300 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2301 chmod 755 "$outpath/bin/$i"
2305 # symlink the mkspecs directory
2306 mkdir -p "$outpath/mkspecs"
2307 rm -rf "$outpath"/mkspecs/*
2308 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2309 rm -f "$outpath/mkspecs/default"
2313 rm -rf "$outpath/mkspecs/$1"
2314 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2315 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2318 # Special case for mkspecs/features directory.
2319 # To be able to place .prf files into a shadow build directory,
2320 # we're creating links for files only. The directory structure is reproduced.
2321 ShadowMkspecs features
2323 # The modules dir is special, too.
2324 ShadowMkspecs modules
2326 # symlink the doc directory
2327 rm -rf "$outpath/doc"
2328 ln -s "$relpath/doc" "$outpath/doc"
2331 # symlink fonts to be able to run application from build directory
2332 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2333 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2334 mkdir -p "${outpath}/lib"
2335 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2339 if [ "$OPT_FAST" = "auto" ]; then
2340 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2347 # find a make command
2348 if [ -z "$MAKE" ]; then
2350 for mk in gmake make; do
2351 if "$WHICH" $mk >/dev/null 2>&1; then
2356 if [ -z "$MAKE" ]; then
2357 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2358 echo >&2 "Cannot proceed."
2361 # export MAKE, we need it later in the config.tests
2367 #-------------------------------------------------------------------------------
2368 # auto-detect all that hasn't been specified in the arguments
2369 #-------------------------------------------------------------------------------
2371 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2372 if [ "$CFG_EMBEDDED" != "no" ]; then
2373 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2375 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2376 if [ -z "$XPLATFORM" ]; then
2377 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2378 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2382 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2383 if [ -z "$XPLATFORM" ]; then
2384 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2385 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2389 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2390 if [ -z "$XPLATFORM" ]; then
2391 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2392 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2396 if [ -z "$PLATFORM" ]; then
2397 case "$UNAME_MACHINE" in
2399 PLATFORM=qws/linux-x86-g++
2402 PLATFORM=qws/linux-x86_64-g++
2405 PLATFORM=qws/linux-generic-g++
2409 if [ -z "$XPLATFORM" ]; then
2410 if [ "$CFG_EMBEDDED" = "auto" ]; then
2411 if [ -n "$CFG_ARCH" ]; then
2412 CFG_EMBEDDED=$CFG_ARCH
2414 case "$UNAME_MACHINE" in
2422 CFG_EMBEDDED=generic
2427 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2431 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2432 if [ -z "$XPLATFORM" ]; then
2433 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2434 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2438 if [ -z "$XPLATFORM" ]; then
2443 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2450 if [ -z "$PLATFORM" ]; then
2452 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2454 if [ "$PLATFORM_QPA" = "yes" ]; then
2455 OSX_VERSION=`uname -r | cut -d. -f1`
2456 if [ "$OSX_VERSION" -ge 11 ]; then
2457 # We're on Lion or above. Check if we have a supported Clang version
2458 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2461 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2476 #PLATFORM=aix-g++-64
2478 #PLATFORM=aix-xlc-64
2480 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2490 # PLATFORM=dynix-g++
2496 PLATFORM=freebsd-g++
2498 - Also available for FreeBSD: freebsd-icc
2502 PLATFORM=openbsd-g++
2513 #PLATFORM=irix-cc-64
2515 - Also available for IRIX: irix-g++ irix-cc-64
2519 case "$UNAME_MACHINE" in
2521 #PLATFORM=hpuxi-acc-32
2522 PLATFORM=hpuxi-acc-64
2524 - Also available for HP-UXi: hpuxi-acc-32
2530 #PLATFORM=hpux-acc-64
2532 #PLATFORM=hpux-acc-o64
2534 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2543 - Also available for Tru64: tru64-g++
2547 case "$UNAME_MACHINE" in
2549 PLATFORM=linux-g++-64
2556 - Also available for Linux: linux-kcc linux-icc linux-cxx
2560 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2561 PLATFORM="solaris-g++"
2563 #PLATFORM=solaris-g++
2565 #PLATFORM=solaris-cc64
2568 - Also available for Solaris: solaris-g++ solaris-cc-64
2571 ReliantUNIX-*:*|SINIX-*:*)
2572 PLATFORM=reliant-cds
2573 #PLATFORM=reliant-cds-64
2575 - Also available for Reliant UNIX: reliant-cds-64
2585 #PLATFORM=unixware-g++
2586 PLATFORM=unixware-cc
2588 - Also available for OpenUNIX: unixware-g++
2592 #PLATFORM=unixware-g++
2593 PLATFORM=unixware-cc
2595 - Also available for UnixWare: unixware-g++
2602 - Also available for SCO OpenServer: sco-g++
2606 PLATFORM=unixware-g++
2609 PLATFORM=unsupported/qnx-g++
2612 if [ "$OPT_HELP" != "yes" ]; then
2614 for p in $PLATFORMS; do
2615 echo " $relconf $* -platform $p"
2618 echo " The build script does not currently recognize all" >&2
2619 echo " platforms supported by Qt." >&2
2620 echo " Rerun this script with a -platform option listed to" >&2
2621 echo " set the system/compiler combination you use." >&2
2628 if [ "$PLATFORM_QWS" = "yes" ]; then
2630 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2632 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2635 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2637 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2638 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2640 if [ -d "$PLATFORM" ]; then
2641 QMAKESPEC="$PLATFORM"
2643 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2645 if [ -d "$XPLATFORM" ]; then
2646 XQMAKESPEC="$XPLATFORM"
2648 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2650 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2651 QT_CROSS_COMPILE=yes
2652 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2655 if [ "$BUILD_ON_MAC" = "yes" ]; then
2656 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2658 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2659 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2660 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2661 echo " built with 'macx-g++'" >&2
2667 # check specified platforms are supported
2668 if [ '!' -d "$QMAKESPEC" ]; then
2670 echo " The specified system/compiler is not supported:"
2674 echo " Please see the README file for a complete list."
2678 if [ '!' -d "$XQMAKESPEC" ]; then
2680 echo " The specified system/compiler is not supported:"
2684 echo " Please see the README file for a complete list."
2688 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2690 echo " The specified system/compiler port is not complete:"
2692 echo " $XQMAKESPEC/qplatformdefs.h"
2694 echo " Please contact qt-info@nokia.com."
2699 # now look at the configs and figure out what platform we are config'd for
2700 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2701 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2703 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2705 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2706 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2707 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2708 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2709 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2713 #-------------------------------------------------------------------------------
2714 # determine the system architecture
2715 #-------------------------------------------------------------------------------
2716 if [ "$OPT_VERBOSE" = "yes" ]; then
2717 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2720 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2721 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2723 echo "You have specified a target architecture with -embedded and -arch."
2724 echo "The two architectures you have specified are different, so we can"
2725 echo "not proceed. Either set both to be the same, or only use -embedded."
2731 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2732 case `basename "$XPLATFORM"` in
2735 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2737 echo "Please contact qt-info@nokia.com to upgrade your license to"
2738 echo "include this platform, or install the Qt Open Source Edition"
2739 echo "if you intend to develop free software."
2745 if [ -z "${CFG_HOST_ARCH}" ]; then
2746 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2748 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2749 case "$CFG_HOST_ARCH" in
2754 if [ "$OPT_VERBOSE" = "yes" ]; then
2755 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2759 CFG_HOST_ARCH=`uname -p`
2760 if [ "$OPT_VERBOSE" = "yes" ]; then
2761 echo " SGI ($CFG_HOST_ARCH)"
2765 case "$UNAME_MACHINE" in
2767 if [ "$OPT_VERBOSE" = "yes" ]; then
2768 echo " Sun SPARC (sparc)"
2775 if [ "$OPT_VERBOSE" = "yes" ]; then
2776 echo " 64-bit AMD 80x86 (x86_64)"
2778 CFG_HOST_ARCH=x86_64
2781 if [ "$OPT_VERBOSE" = "yes" ]; then
2782 echo " 32-bit Intel 80x86 (i386)"
2790 if [ "$OPT_VERBOSE" = "yes" ]; then
2791 echo " 64-bit IBM PowerPC (powerpc)"
2793 CFG_HOST_ARCH=powerpc
2796 if [ "$OPT_VERBOSE" = "yes" ]; then
2797 echo " HP PA-RISC (parisc)"
2799 CFG_HOST_ARCH=parisc
2802 if [ "$OPT_VERBOSE" = "yes" ]; then
2803 echo " 32-bit Intel 80x86 (i386)"
2807 *:*:x86_64|*:*:amd64)
2808 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2809 if [ "$OPT_VERBOSE" = "yes" ]; then
2810 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2814 if [ "$OPT_VERBOSE" = "yes" ]; then
2815 echo " 64-bit AMD 80x86 (x86_64)"
2817 CFG_HOST_ARCH=x86_64
2821 if [ "$OPT_VERBOSE" = "yes" ]; then
2822 echo " 32-bit PowerPC (powerpc)"
2824 CFG_HOST_ARCH=powerpc
2827 if [ "$OPT_VERBOSE" = "yes" ]; then
2828 echo " 64-bit PowerPC (powerpc)"
2830 CFG_HOST_ARCH=powerpc
2833 if [ "$OPT_VERBOSE" = "yes" ]; then
2834 echo " IBM S/390 (s390)"
2839 if [ "$OPT_VERBOSE" = "yes" ]; then
2845 if [ "$OPT_VERBOSE" = "yes" ]; then
2846 echo " Linux on SPARC"
2851 case "$UNAME_MACHINE" in
2853 if [ "$OPT_VERBOSE" = "yes" ]; then
2854 echo " QNX on Intel 80x86 (i386)"
2861 if [ "$OPT_VERBOSE" = "yes" ]; then
2862 echo " Trying '$UNAME_MACHINE'..."
2864 CFG_HOST_ARCH="$UNAME_MACHINE"
2869 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2870 if [ -n "$CFG_ARCH" ]; then
2871 CFG_EMBEDDED=$CFG_ARCH
2874 case "$CFG_EMBEDDED" in
2897 CFG_ARCH="$CFG_EMBEDDED"
2900 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
2901 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
2902 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2903 CFG_ARCH=$CFG_HOST_ARCH
2910 # previously, armv6 was a different arch
2916 if [ "$OPT_VERBOSE" = "yes" ]; then
2917 echo "System architecture: '$CFG_ARCH'"
2918 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2919 echo "Host architecture: '$CFG_HOST_ARCH'"
2923 #-------------------------------------------------------------------------------
2924 # tests that don't need qmake (must be run before displaying help)
2925 #-------------------------------------------------------------------------------
2927 # detect build style
2928 if [ "$CFG_DEBUG" = "auto" ]; then
2929 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2930 CFG_DEBUG_RELEASE=yes
2932 elif [ "$CFG_DEV" = "yes" ]; then
2933 CFG_DEBUG_RELEASE=no
2936 CFG_DEBUG_RELEASE=no
2940 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2941 QT_CONFIG="$QT_CONFIG build_all"
2944 if [ -z "$PKG_CONFIG" ]; then
2945 # See if PKG_CONFIG is set in the mkspec:
2946 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
2948 if [ -z "$PKG_CONFIG" ]; then
2949 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2952 # Work out if we can use pkg-config
2953 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2954 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2956 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2957 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2958 echo >&2 "environment!"
2960 if [ -z "$PKG_CONFIG_PATH" ]; then
2962 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2963 echo >&2 "the host compiler's .pc files will be used. This is probably"
2964 echo >&2 "not what you want."
2966 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2968 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2969 echo >&2 "been set. This means your toolchain's .pc files must contain"
2970 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2971 echo >&2 "tests are failing, please check these files."
2976 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2977 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2978 echo >&2 "dependencies"
2984 if [ ! -n "$PKG_CONFIG" ]; then
2985 QT_CONFIG="$QT_CONFIG no-pkg-config"
2988 # pass on $CFG_SDK to the configure tests.
2989 if [ '!' -z "$CFG_SDK" ]; then
2990 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2993 # find the default framework value
2994 if [ "$BUILD_ON_MAC" = "yes" ]; then
2995 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2996 CFG_FRAMEWORK="$CFG_SHARED"
2997 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2999 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3007 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3009 TEST_COMPILER=$QMAKE_CONF_COMPILER
3010 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3011 if [ -z "$TEST_COMPILER" ]; then
3012 echo "ERROR: Cannot set the compiler for the configuration tests"
3018 if [ -n "$CFG_SYSROOT" ]; then
3019 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3020 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3021 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3023 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3027 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3029 # auto-detect precompiled header support
3030 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3031 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3038 #auto-detect DWARF2 on the mac
3039 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3040 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3047 # don't autodetect support for separate debug info on objcopy when
3048 # cross-compiling as lots of toolchains seems to have problems with this
3049 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3050 CFG_SEPARATE_DEBUG_INFO="no"
3053 # auto-detect support for separate debug info in objcopy
3054 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3055 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3056 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3057 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3058 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3059 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3060 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3061 CFG_SEPARATE_DEBUG_INFO=no
3065 # binutils on HP-UX is buggy; default to no.
3066 CFG_SEPARATE_DEBUG_INFO=no
3069 CFG_SEPARATE_DEBUG_INFO=yes
3075 # auto-detect -fvisibility support
3076 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3077 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3078 CFG_REDUCE_EXPORTS=no
3080 CFG_REDUCE_EXPORTS=yes
3084 # detect the availability of the -Bsymbolic-functions linker optimization
3085 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3086 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3087 CFG_REDUCE_RELOCATIONS=no
3089 CFG_REDUCE_RELOCATIONS=yes
3093 # auto-detect GNU make support
3094 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3098 # If -opengl wasn't specified, don't try to auto-detect
3099 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3103 # find the default framework value
3104 if [ "$BUILD_ON_MAC" = "yes" ]; then
3105 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3106 CFG_FRAMEWORK="$CFG_SHARED"
3107 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3109 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3117 # x11 tests are done after qmake is built
3120 #setup the build parts
3121 if [ -z "$CFG_BUILD_PARTS" ]; then
3122 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3124 # don't build tools by default when cross-compiling
3125 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3126 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3129 for nobuild in $CFG_NOBUILD_PARTS; do
3130 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3132 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3134 # echo "WARNING: libs is a required part of the build."
3136 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3139 #-------------------------------------------------------------------------------
3140 # post process QT_INSTALL_* variables
3141 #-------------------------------------------------------------------------------
3143 if [ -z "$QT_INSTALL_PREFIX" ]; then
3144 if [ "$CFG_DEV" = "yes" ]; then
3145 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3147 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3150 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3152 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3153 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3154 if [ "$BUILD_ON_MAC" = "yes" ]; then
3155 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3158 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3161 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3163 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3164 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3165 if [ "$BUILD_ON_MAC" = "yes" ]; then
3166 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3171 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3174 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3176 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3177 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3178 if [ "$BUILD_ON_MAC" = "yes" ]; then
3179 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3180 QT_INSTALL_LIBS="/Libraries/Frameworks"
3184 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3186 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3188 if [ -z "$QT_INSTALL_BINS" ]; then #default
3189 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3190 if [ "$BUILD_ON_MAC" = "yes" ]; then
3191 QT_INSTALL_BINS="/Developer/Applications/Qt"
3194 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3196 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3198 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3199 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3200 if [ "$BUILD_ON_MAC" = "yes" ]; then
3201 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3204 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3206 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3208 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3209 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3210 if [ "$BUILD_ON_MAC" = "yes" ]; then
3211 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3214 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3216 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3218 if [ -z "$QT_INSTALL_DATA" ]; then #default
3219 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3221 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3223 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3224 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3226 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3228 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3229 if [ "$BUILD_ON_MAC" = "yes" ]; then
3230 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3232 QT_INSTALL_SETTINGS=/etc/xdg
3235 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3237 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3238 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3239 if [ "$BUILD_ON_MAC" = "yes" ]; then
3240 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3243 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3245 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3248 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3249 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3250 if [ "$BUILD_ON_MAC" = "yes" ]; then
3251 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3254 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3256 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3258 #-------------------------------------------------------------------------------
3259 # help - interactive parts of the script _after_ this section please
3260 #-------------------------------------------------------------------------------
3262 # next, emit a usage message if something failed.
3263 if [ "$OPT_HELP" = "yes" ]; then
3264 [ "x$ERROR" = "xyes" ] && echo
3265 if [ "$CFG_NIS" = "no" ]; then
3272 if [ "$CFG_CUPS" = "no" ]; then
3279 if [ "$CFG_ICONV" = "no" ]; then
3286 if [ "$CFG_LARGEFILE" = "no" ]; then
3293 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3300 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3308 if [ "$CFG_XCB" = "no" ]; then
3316 if [ "$CFG_WAYLAND" = "no" ]; then
3323 if [ "$CFG_XINPUT2" = "no" ]; then
3332 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3333 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3334 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3335 [-release] [-debug] [-debug-and-release]
3336 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3337 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3338 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3339 [-plugin-sql-<driver>] [-system-sqlite]
3340 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3341 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
3342 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3343 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3344 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3345 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3346 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3347 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3348 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3349 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
3350 [-no-audio-backend] [-audio-backend]
3351 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
3352 [-no-optimized-qmake] [-optimized-qmake]
3353 [-no-openssl] [-openssl] [-openssl-linked]
3354 [-no-gtkstyle] [-gtkstyle]
3355 [-qt-pcre] [-system-pcre]
3356 [additional platform specific options (see below)]
3359 Installation options:
3361 -qpa ................ This will enable the QPA build.
3362 QPA is a window system agnostic implementation of Qt.
3364 These are optional, but you may specify install directories.
3366 -prefix <dir> ...... This will install everything relative to <dir>
3367 (default $QT_INSTALL_PREFIX)
3369 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3372 -hostprefix [dir] .. Tools and libraries needed when developing
3373 applications are installed in [dir]. If [dir] is
3374 not given, the current build directory will be used.
3379 * -prefix-install .... Force a sandboxed "local" installation of
3380 Qt. This will install into
3381 $QT_INSTALL_PREFIX, if this option is
3382 disabled then some platforms will attempt a
3383 "system" install by placing default values to
3384 be placed in a system location other than
3387 You may use these to separate different parts of the install:
3389 -bindir <dir> ......... Executables will be installed to <dir>
3390 (default PREFIX/bin)
3391 -libdir <dir> ......... Libraries will be installed to <dir>
3392 (default PREFIX/lib)
3393 -docdir <dir> ......... Documentation will be installed to <dir>
3394 (default PREFIX/doc)
3395 -headerdir <dir> ...... Headers will be installed to <dir>
3396 (default PREFIX/include)
3397 -plugindir <dir> ...... Plugins will be installed to <dir>
3398 (default PREFIX/plugins)
3399 -importdir <dir> ...... Imports for QML will be installed to <dir>
3400 (default PREFIX/imports)
3401 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3403 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3404 (default PREFIX/translations)
3405 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3406 (default PREFIX/etc/settings)
3407 -examplesdir <dir> .... Examples will be installed to <dir>
3408 (default PREFIX/examples)
3409 -testsdir <dir> ....... Tests will be installed to <dir>
3410 (default PREFIX/tests)
3414 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3415 that needs to be evaluated. If the evaluation succeeds, the feature is
3416 included. Here is a short explanation of each option:
3418 * -release ........... Compile and link Qt with debugging turned off.
3419 -debug ............. Compile and link Qt with debugging turned on.
3420 -debug-and-release . Compile and link two versions of Qt, with and without
3421 debugging turned on (Mac only).
3423 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3425 -opensource ........ Compile and link the Open-Source Edition of Qt.
3426 -commercial ........ Compile and link the Commercial Edition of Qt.
3429 * -shared ............ Create and use shared Qt libraries.
3430 -static ............ Create and use static Qt libraries.
3432 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3434 -fast .............. Configure Qt quickly by generating Makefiles only for
3435 library and subdirectory targets. All other Makefiles
3436 are created as wrappers, which will in turn run qmake.
3438 -no-largefile ...... Disables large file support.
3439 + -largefile ......... Enables Qt to access files larger than 4 GB.
3442 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3449 if [ "$CFG_DBUS" = "no" ]; then
3458 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3459 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3461 -no-accessibility .. Do not compile Accessibility support.
3462 * -accessibility ..... Compile Accessibility support.
3464 $SHN -no-stl ............ Do not compile STL support.
3465 $SHY -stl ............... Compile STL support.
3467 -no-sql-<driver> ... Disable SQL <driver> entirely.
3468 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3470 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3473 Possible values for <driver>:
3474 [ $CFG_SQL_AVAILABLE ]
3476 -system-sqlite ..... Use sqlite from the operating system.
3478 -no-phonon-backend.. Do not build the platform phonon plugin.
3479 + -phonon-backend..... Build the platform phonon plugin.
3481 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3482 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3484 -no-declarative-debug ..... Do not build the declarative debugging support.
3485 + -declarative-debug ....... Build the declarative debugging support.
3487 -platform target ... The operating system and compiler you are building
3490 See the README file for a list of supported
3491 operating systems and compilers.
3494 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3496 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3497 raster - Software rasterizer
3498 opengl - Rendering via OpenGL, Experimental!
3499 openvg - Rendering via OpenVG, Experimental!
3506 -no-mmx ............ Do not compile with use of MMX instructions.
3507 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3508 -no-sse ............ Do not compile with use of SSE instructions.
3509 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3510 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3511 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3512 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3513 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3514 -no-avx ............ Do not compile with use of AVX instructions.
3515 -no-neon ........... Do not compile with use of NEON instructions.
3517 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3518 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3520 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3522 -D <string> ........ Add an explicit define to the preprocessor.
3523 -I <string> ........ Add an explicit include path.
3524 -L <string> ........ Add an explicit library path.
3526 -help, -h .......... Display this information.
3528 Third Party Libraries:
3530 -qt-zlib ........... Use the zlib bundled with Qt.
3531 + -system-zlib ....... Use zlib from the operating system.
3532 See http://www.gzip.org/zlib
3534 -no-gif ............ Do not compile GIF reading support.
3536 -no-libpng ......... Do not compile PNG support.
3537 -qt-libpng ......... Use the libpng bundled with Qt.
3538 + -system-libpng ..... Use libpng from the operating system.
3539 See http://www.libpng.org/pub/png
3541 -no-libjpeg ........ Do not compile JPEG support.
3542 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3543 + -system-libjpeg .... Use libjpeg from the operating system.
3544 See http://www.ijg.org
3546 -no-openssl ........ Do not compile support for OpenSSL.
3547 + -openssl ........... Enable run-time OpenSSL support.
3548 -openssl-linked .... Enabled linked OpenSSL support.
3550 -qt-pcre ........... Use the PCRE library bundled with Qt.
3551 + -system-pcre ....... Use the PCRE library from the operating system.
3555 -make <part> ....... Add part to the list of parts to be built at make time.
3556 ($QT_DEFAULT_BUILD_PARTS)
3557 -nomake <part> ..... Exclude part from the list of parts to be built.
3559 -R <string> ........ Add an explicit runtime library path to the Qt
3561 -l <string> ........ Add an explicit library.
3563 -no-rpath .......... Do not use the library install path as a runtime
3565 + -rpath ............. Link Qt libraries and executables using the library
3566 install path as a runtime library path. Equivalent
3567 to -R install_libpath
3569 -continue .......... Continue as far as possible if an error occurs.
3571 -verbose, -v ....... Print verbose information about each step of the
3574 -silent ............ Reduce the build output so that warnings and errors
3575 can be seen more easily.
3577 * -no-optimized-qmake ... Do not build qmake optimized.
3578 -optimized-qmake ...... Build qmake optimized.
3580 -no-gui ............ Don't build the Qt GUI library
3582 $NSN -no-nis ............ Do not compile NIS support.
3583 $NSY -nis ............... Compile NIS support.
3585 $CUN -no-cups ........... Do not compile CUPS support.
3586 $CUY -cups .............. Compile CUPS support.
3587 Requires cups/cups.h and libcups.so.2.
3589 $CIN -no-iconv .......... Do not compile support for iconv(3).
3590 $CIY -iconv ............. Compile support for iconv(3).
3592 $PHN -no-pch ............ Do not use precompiled header support.
3593 $PHY -pch ............... Use precompiled header support.
3595 $DBN -no-dbus ........... Do not compile the QtDBus module.
3596 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3597 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3599 -reduce-relocations ..... Reduce relocations in the libraries through extra
3600 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3601 experimental; needs GNU ld >= 2.18).
3603 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3607 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3608 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3615 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3623 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3627 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3628 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3630 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3631 $XCBY -xcb ............... Compile Xcb support.
3633 $XWN -no-wayland......... Do not compile Wayland support.
3634 $XWY -wayland .......... Compile Wayland support.
3640 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3644 $X2N -no-xinput2......... Do not compile XInput2 support.
3645 $X2Y -xinput2............ Compile XInput2 support.
3651 if [ "$PLATFORM_X11" = "yes" ]; then
3652 if [ "$CFG_SM" = "no" ]; then
3659 if [ "$CFG_XSHAPE" = "no" ]; then
3666 if [ "$CFG_XVIDEO" = "no" ]; then
3673 if [ "$CFG_XINERAMA" = "no" ]; then
3680 if [ "$CFG_FONTCONFIG" = "no" ]; then
3687 if [ "$CFG_XCURSOR" = "no" ]; then
3694 if [ "$CFG_XFIXES" = "no" ]; then
3701 if [ "$CFG_XRANDR" = "no" ]; then
3708 if [ "$CFG_XRENDER" = "no" ]; then
3715 if [ "$CFG_MITSHM" = "no" ]; then
3722 if [ "$CFG_XINPUT" = "no" ]; then
3729 if [ "$CFG_XKB" = "no" ]; then
3736 if [ "$CFG_IM" = "no" ]; then
3747 -no-gtkstyle ....... Do not build the GTK theme integration.
3748 + -gtkstyle .......... Build the GTK theme integration.
3750 * -no-nas-sound ...... Do not compile in NAS sound support.
3751 -system-nas-sound .. Use NAS libaudio from the operating system.
3752 See http://radscan.com/nas.html
3754 -egl ............... Use EGL instead of GLX to manage contexts.
3755 When building for desktop OpenGL, this option will
3756 make Qt use EGL to manage contexts rather than the
3757 GLX, which is the default. Note: For OpenGL ES, EGL
3760 -no-opengl ......... Do not support OpenGL.
3761 + -opengl <api> ...... Enable OpenGL support.
3762 With no parameter, this will auto-detect the "best"
3763 OpenGL API to use. If desktop OpenGL is available, it
3764 will be used. Use desktop or es2 for <api>
3765 to force the use of the Desktop OpenGL or
3766 OpenGL ES 2 APIs instead.
3768 -no-openvg ........ Do not support OpenVG.
3769 + -openvg ........... Enable OpenVG support.
3770 Requires EGL support, typically supplied by an OpenGL
3771 or other graphics implementation.
3773 $SMN -no-sm ............. Do not support X Session Management.
3774 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3776 $SHN -no-xshape ......... Do not compile XShape support.
3777 $SHY -xshape ............ Compile XShape support.
3778 Requires X11/extensions/shape.h.
3780 $XVN -no-xvideo ......... Do not compile XVideo support.
3781 $XVY -xvideo ............ Compile XVideo support.
3782 Requires X11/extensions/Xv.h & Xvlib.h.
3784 $SHN -no-xsync .......... Do not compile XSync support.
3785 $SHY -xsync ............. Compile XSync support.
3786 Requires X11/extensions/sync.h.
3788 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3789 $XAY -xinerama .......... Compile Xinerama support.
3790 Requires X11/extensions/Xinerama.h and libXinerama.
3791 By default, Xinerama support will be compiled if
3792 available and the shared libraries are dynamically
3795 $XCN -no-xcursor ........ Do not compile Xcursor support.
3796 $XCY -xcursor ........... Compile Xcursor support.
3797 Requires X11/Xcursor/Xcursor.h and libXcursor.
3798 By default, Xcursor support will be compiled if
3799 available and the shared libraries are dynamically
3802 $XFN -no-xfixes ......... Do not compile Xfixes support.
3803 $XFY -xfixes ............ Compile Xfixes support.
3804 Requires X11/extensions/Xfixes.h and libXfixes.
3805 By default, Xfixes support will be compiled if
3806 available and the shared libraries are dynamically
3809 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3810 $XZY -xrandr ............ Compile Xrandr support.
3811 Requires X11/extensions/Xrandr.h and libXrandr.
3813 $XRN -no-xrender ........ Do not compile Xrender support.
3814 $XRY -xrender ........... Compile Xrender support.
3815 Requires X11/extensions/Xrender.h and libXrender.
3817 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3818 $XMY -mitshm ............ Compile MIT-SHM support.
3819 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3821 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3822 $FCGY -fontconfig ........ Compile FontConfig support.
3823 Requires fontconfig/fontconfig.h, libfontconfig,
3824 freetype.h and libfreetype.
3826 $XIN -no-xinput ......... Do not compile Xinput support.
3827 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3828 which requires IRIX with wacom.h and libXi or
3829 XFree86 with X11/extensions/XInput.h and libXi.
3831 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3832 $XKY -xkb ............... Compile XKB support.
3837 if [ "$BUILD_ON_MAC" = "yes" ]; then
3842 -Fstring ........... Add an explicit framework path.
3843 -fw string ......... Add an explicit framework.
3845 * -framework ......... Build Qt as a series of frameworks and
3846 link tools against those frameworks.
3847 -no-framework ...... Do not build Qt as a series of frameworks.
3849 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3850 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3852 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
3853 Only one arch value can be specified.
3855 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3856 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3858 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3859 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3860 QT_ENABLE_HARFBUZZ environment variable.
3865 if [ "$PLATFORM_QWS" = "yes" ]; then
3867 Qt for Embedded Linux:
3869 -embedded <arch> .... This will enable the embedded build, you must have a
3870 proper license for this switch to work.
3871 Example values for <arch>: arm mips x86 generic
3875 if [ "$PLATFORM_QPA" = "yes" ]; then
3881 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3884 -xplatform target ... The target platform when cross-compiling.
3886 -no-feature-<feature> Do not compile in <feature>.
3887 -feature-<feature> .. Compile in <feature>. The available features
3888 are described in src/corelib/global/qfeatures.txt
3890 -armfpa ............. Target platform uses the ARM-FPA floating point format.
3891 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3893 The floating point format is usually autodetected by configure. Use this
3894 to override the detected value.
3896 -little-endian ...... Target platform is little endian (LSB first).
3897 -big-endian ......... Target platform is big endian (MSB first).
3899 -host-little-endian . Host platform is little endian (LSB first).
3900 -host-big-endian .... Host platform is big endian (MSB first).
3902 You only need to specify the endianness when
3903 cross-compiling, otherwise the host
3904 endianness will be used.
3906 -no-freetype ........ Do not compile in Freetype2 support.
3907 -qt-freetype ........ Use the libfreetype bundled with Qt.
3908 * -system-freetype .... Use libfreetype from the operating system.
3909 See http://www.freetype.org/
3911 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3912 default ($CFG_QCONFIG).
3914 -no-opengl .......... Do not support OpenGL.
3915 -opengl <api> ....... Enable OpenGL ES support
3916 With no parameter, this will attempt to auto-detect
3917 OpenGL ES 2, or regular desktop OpenGL.
3918 Use es2 for <api> to override auto-detection.
3922 if [ "$PLATFORM_QWS" = "yes" ]; then
3925 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3926 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3928 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3929 by default all available decorations are on.
3930 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3931 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3932 linked to at run time.
3933 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3934 -no-decoration-<style> ....Disable decoration <style> entirely.
3935 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3937 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3938 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3939 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3940 linked to at run time.
3941 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3942 -no-gfx-<driver> ... Disable graphics <driver> entirely.
3943 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3945 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
3946 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3948 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
3950 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
3952 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
3953 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3955 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
3956 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3957 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
3959 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
3960 -no-mouse-<driver> ... Disable mouse <driver> entirely.
3961 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3963 -iwmmxt ............ Compile using the iWMMXt instruction set
3964 (available on some XScale CPUs).
3968 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3969 if [ "$CFG_GLIB" = "no" ]; then
3977 $GBN -no-glib ........... Do not compile Glib support.
3978 $GBY -glib .............. Compile Glib support.
3983 [ "x$ERROR" = "xyes" ] && exit 1
3988 # -----------------------------------------------------------------------------
3989 # LICENSING, INTERACTIVE PART
3990 # -----------------------------------------------------------------------------
3992 if [ "$PLATFORM_QWS" = "yes" ]; then
3993 Platform="Qt for Embedded Linux"
3994 elif [ "$PLATFORM_QPA" = "yes" ]; then
3995 Platform="Qt Lighthouse"
3996 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3997 Platform="Qt for Windows"
3998 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4000 Platform="Qt for Linux/X11"
4004 echo "This is the $Platform ${EditionString} Edition."
4007 if [ "$Edition" = "OpenSource" ]; then
4009 echo "You are licensed to use this software under the terms of"
4010 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4011 if [ -f "$relpath/LICENSE.GPL3" ]; then
4012 echo "You are also licensed to use this software under the terms of"
4013 echo "the GNU General Public License (GPL) versions 3."
4019 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4020 echo "You have already accepted the terms of the $LicenseType license."
4023 if [ -f "$relpath/LICENSE.GPL3" ]; then
4024 echo "Type '3' to view the GNU General Public License version 3."
4026 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4027 echo "Type 'yes' to accept this license offer."
4028 echo "Type 'no' to decline this license offer."
4030 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4034 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4036 elif [ "$acceptance" = "no" ]; then
4037 echo "You are not licensed to use this software."
4040 elif [ "$acceptance" = "3" ]; then
4041 more "$relpath/LICENSE.GPL3"
4042 elif [ "$acceptance" = "L" ]; then
4043 more "$relpath/LICENSE.LGPL"
4046 elif [ "$Edition" = "Preview" ]; then
4047 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4050 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4051 echo "You have already accepted the terms of the $LicenseType license."
4054 echo "You are licensed to use this software under the terms of"
4055 echo "the $TheLicense"
4057 echo "Type '?' to read the Preview License."
4058 echo "Type 'yes' to accept this license offer."
4059 echo "Type 'no' to decline this license offer."
4061 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4065 if [ "$acceptance" = "yes" ]; then
4067 elif [ "$acceptance" = "no" ] ;then
4068 echo "You are not licensed to use this software."
4071 elif [ "$acceptance" = "?" ]; then
4072 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4075 elif [ "$Edition" != "OpenSource" ]; then
4076 if [ -n "$ExpiryDate" ]; then
4077 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4078 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4079 Today=`date +%Y%m%d`
4080 if [ "$Today" -gt "$ExpiryDate" ]; then
4081 case "$LicenseType" in
4082 Commercial|Academic|Educational)
4083 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4085 echo "NOTICE NOTICE NOTICE NOTICE"
4087 echo " Your support and upgrade period has expired."
4089 echo " You are no longer licensed to use this version of Qt."
4090 echo " Please contact qt-info@nokia.com to renew your support"
4091 echo " and upgrades for this license."
4093 echo "NOTICE NOTICE NOTICE NOTICE"
4098 echo "WARNING WARNING WARNING WARNING"
4100 echo " Your support and upgrade period has expired."
4102 echo " You may continue to use your last licensed release"
4103 echo " of Qt under the terms of your existing license"
4104 echo " agreement. But you are not entitled to technical"
4105 echo " support, nor are you entitled to use any more recent"
4106 echo " Qt releases."
4108 echo " Please contact qt-info@nokia.com to renew your"
4109 echo " support and upgrades for this license."
4111 echo "WARNING WARNING WARNING WARNING"
4118 echo "NOTICE NOTICE NOTICE NOTICE"
4120 echo " Your Evaluation license has expired."
4122 echo " You are no longer licensed to use this software. Please"
4123 echo " contact qt-info@nokia.com to purchase license, or install"
4124 echo " the Qt Open Source Edition if you intend to develop free"
4127 echo "NOTICE NOTICE NOTICE NOTICE"
4134 TheLicense=`head -n 1 "$outpath/LICENSE"`
4136 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4137 echo "You have already accepted the terms of the $TheLicense."
4140 echo "You are licensed to use this software under the terms of"
4141 echo "the $TheLicense."
4143 echo "Type '?' to view the $TheLicense."
4144 echo "Type 'yes' to accept this license offer."
4145 echo "Type 'no' to decline this license offer."
4147 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4151 if [ "$acceptance" = "yes" ]; then
4153 elif [ "$acceptance" = "no" ]; then
4154 echo "You are not licensed to use this software."
4157 else [ "$acceptance" = "?" ]
4158 more "$outpath/LICENSE"
4163 # this should be moved somewhere else
4166 AIX_VERSION=`uname -v`
4167 if [ "$AIX_VERSION" -lt "5" ]; then
4168 QMakeVar add QMAKE_LIBS_X11 -lbind
4175 #-------------------------------------------------------------------------------
4176 # generate qconfig.cpp
4177 #-------------------------------------------------------------------------------
4178 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4180 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4181 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4182 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4183 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4184 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4185 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4186 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4187 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4188 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4189 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4190 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4191 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4192 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4193 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4195 TODAY=`date +%Y-%m-%d`
4196 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4198 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4199 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4201 /* Installation date */
4202 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4206 if [ ! -z "$QT_HOST_PREFIX" ]; then
4207 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4208 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4209 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4210 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4211 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4212 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4213 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4214 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4215 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4216 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4217 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4218 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4220 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4222 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4223 /* Installation Info */
4224 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4225 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4226 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4227 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4228 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4229 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4230 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4231 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4232 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4233 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4234 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4235 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4236 #else // QT_BOOTSTRAPPED
4240 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4241 /* Installation Info */
4242 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4243 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4244 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4245 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4246 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4247 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4248 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4249 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4250 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4251 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4252 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4253 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4256 if [ ! -z "$QT_HOST_PREFIX" ]; then
4257 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4258 #endif // QT_BOOTSTRAPPED
4263 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4264 /* strlen( "qt_lcnsxxxx" ) == 12 */
4265 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4266 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4267 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4268 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4269 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4270 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4271 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4272 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4273 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4274 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4275 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4276 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4277 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4278 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4281 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4282 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4283 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4285 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4286 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4287 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4290 # -----------------------------------------------------------------------------
4291 if [ "$LicenseType" = "Evaluation" ]; then
4292 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4293 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4294 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4297 if [ -n "$EVALKEY" ]; then
4298 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4299 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4300 /* Evaluation license key */
4301 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4303 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4307 # -----------------------------------------------------------------------------
4309 # -----------------------------------------------------------------------------
4312 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4314 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4315 if [ "$OPT_SHADOW" = "yes" ]; then
4316 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
4317 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4318 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4323 # $2: optional transformation
4324 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4325 # is where the resulting variable is written to
4326 # Assumes that the optional transformation produces the same variable name for each hit
4327 setBootstrapVariable()
4329 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4335 valStart = index($0, "=") + 1
4338 if (substr($0, valStart - 2, 1) == "+") {
4342 variable = substr($0, 0, valStart - 2 - append)
4343 value = substr($0, valStart)
4344 gsub("[ \t]+", "", variable)
4345 gsub("^[ \t]+", "", value)
4346 gsub("[ \t]+$", "", value)
4348 if (append == 1 && length(combinedValue) > 0) {
4349 combinedValue = combinedValue " " value
4351 combinedValue = value
4355 if (length(combinedValue) > 0) {
4356 printf "%s = %s\n", variable, combinedValue
4362 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4363 echo "Creating qmake. Please wait..."
4366 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4367 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4368 if [ -f "$QCONFIG_H" ]; then
4369 OLD_QCONFIG_H=$QCONFIG_H
4370 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4373 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4374 # when building qmake, we use #defines for the install paths,
4375 # however they are real functions in the library
4376 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4377 mkdir -p "$outpath/src/corelib/global"
4378 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4379 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4382 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4384 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4385 rm -rf mkspecs/default
4386 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4388 for mkfile in GNUmakefile Makefile; do
4391 in_mkfile="${mkfile}.in"
4392 if [ "$mkfile" = "Makefile" ]; then
4393 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4394 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4396 in_mkfile="${mkfile}.unix"
4398 in_mkfile="$relpath/qmake/$in_mkfile"
4399 mkfile="$outpath/qmake/$mkfile"
4400 if [ -f "$mkfile" ]; then
4401 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4404 [ -f "$in_mkfile" ] || continue
4406 echo "########################################################################" > "$mkfile"
4407 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4408 echo "########################################################################" >> "$mkfile"
4411 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4412 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4413 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4415 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4416 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4419 if [ "$CFG_SILENT" = "yes" ]; then
4420 setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4421 setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4423 setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4424 setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4426 setBootstrapVariable QMAKE_CFLAGS
4427 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4428 setBootstrapVariable QMAKE_LFLAGS
4430 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4431 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4432 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4434 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4435 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4436 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4437 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4438 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4439 elif [ "$CFG_DEBUG" = "yes" ]; then
4440 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4441 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4442 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4443 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4446 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4447 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4448 for rpath in $RPATH_FLAGS; do
4449 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4452 if [ "$BUILD_ON_MAC" = "yes" ]; then
4453 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4454 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4455 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4456 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4457 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4458 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4459 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4460 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4461 if [ '!' -z "$CFG_SDK" ]; then
4462 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4463 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4464 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4465 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4466 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4469 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4470 if [ '!' -z "$D_FLAGS" ]; then
4471 for DEF in $D_FLAGS; do
4472 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4475 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4476 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4477 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4478 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4480 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4481 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4482 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4483 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4484 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4485 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4486 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4487 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4488 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4489 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4491 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4492 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4493 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4494 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4499 QMAKE_BUILD_ERROR=no
4500 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4501 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4502 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4503 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4506 #-------------------------------------------------------------------------------
4507 # tests that need qmake
4508 #-------------------------------------------------------------------------------
4510 # detect availability of float math.h functions
4511 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4512 CFG_USE_FLOATMATH=yes
4514 CFG_USE_FLOATMATH=no
4517 # detect mmx support
4518 if [ "${CFG_MMX}" = "auto" ]; then
4519 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4526 # detect 3dnow support
4527 if [ "${CFG_3DNOW}" = "auto" ]; then
4528 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4535 # detect sse support
4536 if [ "${CFG_SSE}" = "auto" ]; then
4537 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4544 # detect sse2 support
4545 if [ "${CFG_SSE2}" = "auto" ]; then
4546 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4553 # detect sse3 support
4554 if [ "${CFG_SSE3}" = "auto" ]; then
4555 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4562 # detect ssse3 support
4563 if [ "${CFG_SSSE3}" = "auto" ]; then
4564 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4571 # detect sse4.1 support
4572 if [ "${CFG_SSE4_1}" = "auto" ]; then
4573 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_1 "sse4_1" $L_FLAGS $I_FLAGS $l_FLAGS "-msse4.1"; then
4580 # detect sse4.2 support
4581 if [ "${CFG_SSE4_2}" = "auto" ]; then
4582 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_2 "sse4_2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse4.2"; then
4589 # detect avx support
4590 if [ "${CFG_AVX}" = "auto" ]; then
4591 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4598 # check iWMMXt support
4599 if [ "$CFG_IWMMXT" = "yes" ]; then
4600 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4601 if [ $? != "0" ]; then
4602 echo "The iWMMXt functionality test failed!"
4603 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4608 # detect neon support
4609 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4610 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/neon "neon" $L_FLAGS $I_FLAGS $l_FLAGS "-mfpu=neon"; then
4617 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4620 if [ "$CFG_ZLIB" = "no" ]; then
4621 # Note: Qt no longer support builds without zlib
4622 # So we force a "no" to be "auto" here.
4623 # If you REALLY really need no zlib support, you can still disable
4624 # it by doing the following:
4625 # add "no-zlib" to mkspecs/qconfig.pri
4626 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4628 # There's no guarantee that Qt will build under those conditions
4633 if [ "$CFG_ZLIB" = "auto" ]; then
4634 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4641 if [ "$CFG_LARGEFILE" = "auto" ]; then
4642 #Large files should be enabled for all Linux systems
4646 # detect how jpeg should be built
4647 if [ "$CFG_JPEG" = "auto" ]; then
4648 if [ "$CFG_SHARED" = "yes" ]; then
4655 if [ "$CFG_LIBJPEG" = "auto" ]; then
4656 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libjpeg "libjpeg" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4663 # detect how gif should be built
4664 if [ "$CFG_GIF" = "auto" ]; then
4665 if [ "$CFG_SHARED" = "yes" ]; then
4673 if [ "$CFG_LIBPNG" = "auto" ]; then
4674 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libpng "libpng" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4681 # detect accessibility
4682 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4683 CFG_ACCESSIBILITY=yes
4686 # auto-detect SQL-modules support
4687 for _SQLDR in $CFG_SQL_AVAILABLE; do
4690 if [ "$CFG_SQL_mysql" != "no" ]; then
4691 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4692 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4693 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4694 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4695 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4696 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4697 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4699 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4700 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4701 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4702 echo " You need MySql 4 or higher."
4703 echo " If you believe this message is in error you may use the continue"
4704 echo " switch (-continue) to $0 to continue."
4709 QT_LFLAGS_MYSQL_R=""
4713 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql_r "MySQL (thread-safe)" $QT_LFLAGS_MYSQL_R $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4714 QMakeVar add CONFIG use_libmysqlclient_r
4715 if [ "$CFG_SQL_mysql" = "auto" ]; then
4716 CFG_SQL_mysql=plugin
4718 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4719 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql "MySQL (thread-unsafe)" $QT_LFLAGS_MYSQL $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4720 if [ "$CFG_SQL_mysql" = "auto" ]; then
4721 CFG_SQL_mysql=plugin
4724 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4725 echo "MySQL support cannot be enabled due to functionality tests!"
4726 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4727 echo " If you believe this message is in error you may use the continue"
4728 echo " switch (-continue) to $0 to continue."
4733 QT_LFLAGS_MYSQL_R=""
4741 if [ "$CFG_SQL_psql" != "no" ]; then
4742 # Be careful not to use native pg_config when cross building.
4743 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4744 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4745 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4747 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4748 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4749 # But, respect PSQL_LIBS if set
4750 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4751 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $L_FLAGS $QT_CFLAGS_PSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4752 if [ "$CFG_SQL_psql" = "auto" ]; then
4756 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4757 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4758 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4759 echo " If you believe this message is in error you may use the continue"
4760 echo " switch (-continue) to $0 to continue."
4771 if [ "$CFG_SQL_odbc" != "no" ]; then
4772 if ( [ "$BUILD_ON_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4773 if [ "$CFG_SQL_odbc" = "auto" ]; then
4777 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iodbc "iODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4778 QT_LFLAGS_ODBC="-liodbc"
4779 if [ "$CFG_SQL_odbc" = "auto" ]; then
4783 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4784 echo "ODBC support cannot be enabled due to functionality tests!"
4785 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4786 echo " If you believe this message is in error you may use the continue"
4787 echo " switch (-continue) to $0 to continue."
4797 if [ "$CFG_SQL_oci" != "no" ]; then
4798 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/oci "OCI" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4799 if [ "$CFG_SQL_oci" = "auto" ]; then
4803 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4804 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4805 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4806 echo " If you believe this message is in error you may use the continue"
4807 echo " switch (-continue) to $0 to continue."
4816 if [ "$CFG_SQL_tds" != "no" ]; then
4817 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4818 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4819 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tds "TDS" $QT_LFLAGS_TDS $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4820 if [ "$CFG_SQL_tds" = "auto" ]; then
4824 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4825 echo "TDS support cannot be enabled due to functionality tests!"
4826 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4827 echo " If you believe this message is in error you may use the continue"
4828 echo " switch (-continue) to $0 to continue."
4837 if [ "$CFG_SQL_db2" != "no" ]; then
4838 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/db2 "DB2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4839 if [ "$CFG_SQL_db2" = "auto" ]; then
4843 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4844 echo "ODBC support cannot be enabled due to functionality tests!"
4845 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4846 echo " If you believe this message is in error you may use the continue"
4847 echo " switch (-continue) to $0 to continue."
4856 if [ "$CFG_SQL_ibase" != "no" ]; then
4857 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ibase "InterBase" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4858 if [ "$CFG_SQL_ibase" = "auto" ]; then
4859 CFG_SQL_ibase=plugin
4862 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4863 echo "InterBase support cannot be enabled due to functionality tests!"
4864 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4865 echo " If you believe this message is in error you may use the continue"
4866 echo " switch (-continue) to $0 to continue."
4875 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4876 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite2 "SQLite2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4877 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4878 CFG_SQL_sqlite2=plugin
4881 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4882 echo "SQLite2 support cannot be enabled due to functionality tests!"
4883 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4884 echo " If you believe this message is in error you may use the continue"
4885 echo " switch (-continue) to $0 to continue."
4894 if [ "$CFG_SQL_sqlite" != "no" ]; then
4895 SQLITE_AUTODETECT_FAILED="no"
4896 if [ "$CFG_SQLITE" = "system" ]; then
4897 if [ -n "$PKG_CONFIG" ]; then
4898 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4899 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4901 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite "SQLite" $QT_LFLAGS_SQLITE $L_FLAGS $QT_CFLAGS_SQLITE $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4902 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4903 CFG_SQL_sqlite=plugin
4905 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4907 SQLITE_AUTODETECT_FAILED="yes"
4910 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4911 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4912 CFG_SQL_sqlite=plugin
4915 SQLITE_AUTODETECT_FAILED="yes"
4919 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4920 echo "SQLite support cannot be enabled due to functionality tests!"
4921 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4922 echo " If you believe this message is in error you may use the continue"
4923 echo " switch (-continue) to $0 to continue."
4929 if [ "$OPT_VERBOSE" = "yes" ]; then
4930 echo "unknown SQL driver: $_SQLDR"
4936 # auto-detect NIS support
4937 if [ "$CFG_NIS" != "no" ]; then
4938 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/nis "NIS" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4941 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4942 echo "NIS support cannot be enabled due to functionality tests!"
4943 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4944 echo " If you believe this message is in error you may use the continue"
4945 echo " switch (-continue) to $0 to continue."
4953 # auto-detect CUPS support
4954 if [ "$CFG_CUPS" != "no" ]; then
4955 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/cups "Cups" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4958 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4959 echo "Cups support cannot be enabled due to functionality tests!"
4960 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4961 echo " If you believe this message is in error you may use the continue"
4962 echo " switch (-continue) to $0 to continue."
4970 # auto-detect iconv(3) support
4971 if [ "$CFG_ICONV" != "no" ]; then
4972 if [ "$PLATFORM_QWS" = "yes" -o "$XPLATFORM_MINGW" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then
4974 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/iconv" "POSIX iconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4976 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/sun-libiconv" "SUN libiconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4978 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/gnu-libiconv" "GNU libiconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4981 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4982 echo "Iconv support cannot be enabled due to functionality tests!"
4983 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4984 echo " If you believe this message is in error you may use the continue"
4985 echo " switch (-continue) to $0 to continue."
4993 # auto-detect libdbus-1 support
4994 if [ "$CFG_DBUS" != "no" ]; then
4995 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4996 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4997 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4999 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/dbus "D-Bus" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_DBUS $QT_LIBS_DBUS $MAC_CONFIG_TEST_COMMANDLINE; then
5000 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5001 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5002 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5004 if [ "$CFG_DBUS" = "auto" ]; then
5006 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5007 # CFG_DBUS is "yes" or "linked" here
5009 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5010 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5011 echo " If you believe this message is in error you may use the continue"
5012 echo " switch (-continue) to $0 to continue."
5018 # X11/QWS/Lighthouse
5019 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5021 # auto-detect Glib support
5022 if [ "$CFG_GLIB" != "no" ]; then
5023 if [ -n "$PKG_CONFIG" ]; then
5024 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5025 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5027 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/glib "Glib" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GLIB $QT_LIBS_GLIB $X11TESTS_FLAGS ; then
5029 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5030 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5032 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5033 echo "Glib support cannot be enabled due to functionality tests!"
5034 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5035 echo " If you believe this message is in error you may use the continue"
5036 echo " switch (-continue) to $0 to continue."
5045 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5046 if [ -n "$PKG_CONFIG" ]; then
5047 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5048 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5050 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER $X11TESTS_FLAGS; then
5052 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5053 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5055 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5056 echo "Gstreamer support cannot be enabled due to functionality tests!"
5057 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5058 echo " If you believe this message is in error you may use the continue"
5059 echo " switch (-continue) to $0 to continue."
5065 elif [ "$CFG_GLIB" = "no" ]; then
5069 # auto-detect libicu support
5070 if [ "$CFG_ICU" != "no" ]; then
5071 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5072 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5074 if [ "$CFG_ICU" = "auto" ]; then
5076 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5079 echo "The ICU library support cannot be enabled."
5080 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5081 echo " If you believe this message is in error you may use the continue"
5082 echo " switch (-continue) to $0 to continue."
5088 # Auto-detect PulseAudio support
5089 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5090 if [ -n "$PKG_CONFIG" ]; then
5091 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5092 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5094 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pulseaudio "PulseAudio" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_PULSEAUDIO $QT_LIBS_PULSEAUDIO $X11TESTS_FLAGS; then
5096 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5097 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5099 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5100 echo "PulseAudio support cannot be enabled due to functionality tests!"
5101 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5102 echo " If you believe this message is in error you may use the continue"
5103 echo " switch (-continue) to $0 to continue."
5110 fi # X11/QWS/Lighthouse
5113 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5114 x11tests="$relpath/config.tests/x11"
5117 # work around broken X11 headers when using GCC 2.95 or later
5119 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5120 if [ $NOTYPE = "yes" ]; then
5121 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5122 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5125 # Check we actually have X11 :-)
5126 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5127 if [ $? != "0" ]; then
5128 echo "Basic XLib functionality test failed!"
5129 echo " You might need to modify the include and library search paths by editing"
5130 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5136 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5137 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5138 if [ "$CFG_GUI" = "no" ]; then
5139 if [ "$CFG_OPENGL" = "auto" ]; then
5142 if [ "$CFG_OPENGL" != "no" ]; then
5143 echo "OpenGL enabled, but GUI disabled."
5144 echo " You might need to either enable the GUI or disable OpenGL"
5148 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5149 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5151 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
5153 if [ "$CFG_EGL" = "no" ]; then
5157 if [ "$CFG_OPENGL" = "yes" ]; then
5158 echo "All the OpenGL functionality tests failed!"
5159 echo " You might need to modify the include and library search paths by editing"
5160 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5161 echo " ${XQMAKESPEC}."
5168 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5169 if [ "$CFG_OPENGL" = "desktop" ]; then
5170 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5171 if [ $? != "0" ]; then
5172 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5179 elif [ "$CFG_OPENGL" = "es2" ]; then
5181 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5182 if [ $? != "0" ]; then
5183 echo "The OpenGL ES 2.0 functionality test failed!"
5184 echo " You might need to modify the include and library search paths by editing"
5185 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5186 echo " ${XQMAKESPEC}."
5189 elif [ "$CFG_OPENGL" = "desktop" ]; then
5190 # Desktop OpenGL support
5191 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5192 if [ $? != "0" ]; then
5193 echo "The OpenGL functionality test failed!"
5194 echo " You might need to modify the include and library search paths by editing"
5195 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5196 echo " ${XQMAKESPEC}."
5201 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5202 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5203 if [ $? != "0" ]; then
5204 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5211 fi # X11/MINGW OpenGL
5214 if [ "$PLATFORM_X11" = "yes" ]; then
5215 # auto-detect Xcursor support
5216 if [ "$CFG_XCURSOR" != "no" ]; then
5217 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xcursor "Xcursor" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5218 if [ "$CFG_XCURSOR" != "runtime" ]; then
5222 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5223 echo "Xcursor support cannot be enabled due to functionality tests!"
5224 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5225 echo " If you believe this message is in error you may use the continue"
5226 echo " switch (-continue) to $0 to continue."
5234 # auto-detect Xfixes support
5235 if [ "$CFG_XFIXES" != "no" ]; then
5236 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5237 if [ "$CFG_XFIXES" != "runtime" ]; then
5241 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5242 echo "Xfixes support cannot be enabled due to functionality tests!"
5243 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5244 echo " If you believe this message is in error you may use the continue"
5245 echo " switch (-continue) to $0 to continue."
5253 # auto-detect Xrandr support (resize and rotate extension)
5254 if [ "$CFG_XRANDR" != "no" ]; then
5255 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrandr "Xrandr" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5256 if [ "$CFG_XRANDR" != "runtime" ]; then
5260 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5261 echo "Xrandr support cannot be enabled due to functionality tests!"
5262 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5263 echo " If you believe this message is in error you may use the continue"
5264 echo " switch (-continue) to $0 to continue."
5272 # auto-detect Xrender support
5273 if [ "$CFG_XRENDER" != "no" ]; then
5274 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5277 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5278 echo "Xrender support cannot be enabled due to functionality tests!"
5279 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5280 echo " If you believe this message is in error you may use the continue"
5281 echo " switch (-continue) to $0 to continue."
5289 # auto-detect MIT-SHM support
5290 if [ "$CFG_MITSHM" != "no" ]; then
5291 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/mitshm "mitshm" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5294 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5295 echo "MITSHM support cannot be enabled due to functionality tests!"
5296 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5297 echo " If you believe this message is in error you may use the continue"
5298 echo " switch (-continue) to $0 to continue."
5306 # auto-detect FontConfig support
5307 if [ "$CFG_FONTCONFIG" != "no" ]; then
5308 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5309 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5310 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5312 QT_CFLAGS_FONTCONFIG=
5313 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5315 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
5317 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5318 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5319 CFG_LIBFREETYPE=system
5321 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5322 echo "FontConfig support cannot be enabled due to functionality tests!"
5323 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5324 echo " If you believe this message is in error you may use the continue"
5325 echo " switch (-continue) to $0 to continue."
5333 # auto-detect Session Management support
5334 if [ "$CFG_SM" = "auto" ]; then
5335 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/sm "Session Management" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5338 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5339 echo "Session Management support cannot be enabled due to functionality tests!"
5340 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5341 echo " If you believe this message is in error you may use the continue"
5342 echo " switch (-continue) to $0 to continue."
5350 # auto-detect SHAPE support
5351 if [ "$CFG_XSHAPE" != "no" ]; then
5352 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xshape "XShape" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5355 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5356 echo "XShape support cannot be enabled due to functionality tests!"
5357 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5358 echo " If you believe this message is in error you may use the continue"
5359 echo " switch (-continue) to $0 to continue."
5367 # auto-detect XVideo support
5368 if [ "$CFG_XVIDEO" != "no" ]; then
5369 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xvideo "XVideo" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5372 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5373 echo "XVideo support cannot be enabled due to functionality tests!"
5374 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5375 echo " If you believe this message is in error you may use the continue"
5376 echo " switch (-continue) to $0 to continue."
5384 # auto-detect XSync support
5385 if [ "$CFG_XSYNC" != "no" ]; then
5386 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xsync "XSync" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5389 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5390 echo "XSync support cannot be enabled due to functionality tests!"
5391 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5392 echo " If you believe this message is in error you may use the continue"
5393 echo " switch (-continue) to $0 to continue."
5401 # auto-detect Xinerama support
5402 if [ "$CFG_XINERAMA" != "no" ]; then
5403 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinerama "Xinerama" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5404 if [ "$CFG_XINERAMA" != "runtime" ]; then
5408 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5409 echo "Xinerama support cannot be enabled due to functionality tests!"
5410 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5411 echo " If you believe this message is in error you may use the continue"
5412 echo " switch (-continue) to $0 to continue."
5420 # auto-detect Xinput support
5421 if [ "$CFG_XINPUT" != "no" ]; then
5422 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput "XInput" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5423 if [ "$CFG_XINPUT" != "runtime" ]; then
5427 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5428 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5429 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5430 echo " If you believe this message is in error you may use the continue"
5431 echo " switch (-continue) to $0 to continue."
5439 # auto-detect XKB support
5440 if [ "$CFG_XKB" != "no" ]; then
5441 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xkb "XKB" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5444 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5445 echo "XKB support cannot be enabled due to functionality tests!"
5446 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5447 echo " If you believe this message is in error you may use the continue"
5448 echo " switch (-continue) to $0 to continue."
5456 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5457 if [ -n "$PKG_CONFIG" ]; then
5458 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5459 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5461 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5463 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5464 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5466 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5467 echo "Gtk theme support cannot be enabled due to functionality tests!"
5468 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5469 echo " If you believe this message is in error you may use the continue"
5470 echo " switch (-continue) to $0 to continue."
5476 elif [ "$CFG_GLIB" = "no" ]; then
5482 if [ "$BUILD_ON_MAC" = "yes" ]; then
5483 if [ "$CFG_PHONON" != "no" ]; then
5484 # Always enable Phonon (unless it was explicitly disabled)
5488 if [ "$CFG_COREWLAN" = "auto" ]; then
5489 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/corewlan "CoreWlan" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
5498 if [ "$PLATFORM_QPA" = "yes" ]; then
5499 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5500 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5501 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5503 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
5506 if [ "$CFG_OPENGL" = "yes" ]; then
5507 echo "All the OpenGL functionality tests failed!"
5508 echo " You might need to modify the include and library search paths by editing"
5509 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5510 echo " ${XQMAKESPEC}."
5515 elif [ "$CFG_OPENGL" = "es2" ]; then
5517 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5518 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
5519 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
5520 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5521 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5522 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5523 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5524 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5527 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2
5528 if [ $? != "0" ]; then
5529 echo "The OpenGL ES 2.0 functionality test failed!"
5530 echo " You might need to modify the include and library search paths by editing"
5531 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5532 echo " ${XQMAKESPEC}."
5535 elif [ "$CFG_OPENGL" = "desktop" ]; then
5536 # Desktop OpenGL support
5537 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5538 if [ $? != "0" ]; then
5539 echo "The OpenGL functionality test failed!"
5540 echo " You might need to modify the include and library search paths by editing"
5541 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5542 echo " ${XQMAKESPEC}."
5547 # auto-detect FontConfig support
5548 if [ "$CFG_FONTCONFIG" != "no" ]; then
5549 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5550 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5551 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5553 QT_CFLAGS_FONTCONFIG=
5554 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5556 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
5557 QT_CONFIG="$QT_CONFIG fontconfig"
5558 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5559 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5560 CFG_LIBFREETYPE=system
5565 # Save these for a check later
5566 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5567 ORIG_CFG_XCB="$CFG_XCB"
5569 if [ "$CFG_WAYLAND" != "no" ]; then
5570 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5571 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5572 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5573 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
5574 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
5576 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/wayland "Wayland" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_WAYLAND $QMAKE_LIBS_WAYLAND; then
5578 QT_CONFIG="$QT_CONFIG wayland"
5579 elif [ "$CFG_WAYLAND" = "yes" ]; then
5580 echo "The Wayland functionality test failed!"
5584 QMakeVar add DEFINES QT_NO_WAYLAND
5588 if [ "$CFG_LIBUDEV" != "no" ]; then
5589 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5591 QT_CONFIG="$QT_CONFIG libudev"
5592 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5593 echo "The libudev functionality test failed!"
5597 QMakeVar add DEFINES QT_NO_LIBUDEV
5601 if [ "$CFG_EVDEV" != "no" ]; then
5602 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5604 QT_CONFIG="$QT_CONFIG evdev"
5605 elif [ "$CFG_EVDEV" = "yes" ]; then
5606 echo "The evdev functionality test failed!"
5610 QMakeVar add DEFINES QT_NO_EVDEV
5614 # Check we actually have X11 :-)
5615 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5616 QT_CONFIG="$QT_CONFIG xlib"
5619 # auto-detect Xrender support
5620 if [ "$CFG_XRENDER" != "no" ]; then
5621 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5623 QT_CONFIG="$QT_CONFIG xrender"
5625 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5626 echo "Xrender support cannot be enabled due to functionality tests!"
5627 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5628 echo " If you believe this message is in error you may use the continue"
5629 echo " switch (-continue) to $0 to continue."
5637 if [ "$CFG_XCB" != "no" ]; then
5638 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
5640 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-render "xcb-render" $L_FLAGS $I_FLAGS $l_FLAGS; then
5641 QT_CONFIG="$QT_CONFIG xcb-render"
5644 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-poll-for-queued-event "xcb-poll-for-queued-event" $L_FLAGS $I_FLAGS $l_FLAGS; then
5646 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5649 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $l_FLAGS; then
5650 QT_CONFIG="$QT_CONFIG xcb-xlib"
5653 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5654 # auto-detect XInput2/Xinput support
5655 if [ "$CFG_XINPUT2" != "no" ]; then
5656 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5660 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5661 echo "XInput2 support cannot be enabled due to functionality tests!"
5662 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5663 echo " If you believe this message is in error you may use the continue"
5664 echo " switch (-continue) to $0 to continue."
5673 if [ "$CFG_XCB" = "yes" ]; then
5674 echo "The XCB test failed!"
5675 echo " You might need to install dependency packages."
5676 echo " See src/plugins/platforms/xcb/README."
5680 QMakeVar add DEFINES QT_NO_XCB
5684 # Detect libxkbcommon
5685 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5686 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5687 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5688 if [ "$CFG_WAYLAND" = "yes" ]; then
5689 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
5690 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
5692 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5693 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5695 if [ "$CFG_WAYLAND" = "yes" ]; then
5696 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
5698 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5701 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5702 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
5703 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
5704 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
5705 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
5706 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
5707 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
5710 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5711 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5712 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5713 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5716 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/coreservices "CoreServices" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
5717 QT_CONFIG="$QT_CONFIG coreservices"
5719 QMakeVar add DEFINES QT_NO_CORESERVICES
5722 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5723 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
5724 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
5725 echo "No QPA platform plugin enabled!"
5726 echo " If you really want to build without a QPA platform plugin you must pass"
5727 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
5728 echo " cannot run GUI applications."
5738 if [ "$PLATFORM_QWS" = "yes" ]; then
5740 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5741 if [ "$CFG_GUI" = "no" ]; then
5742 if [ "$CFG_OPENGL" = "auto" ]; then
5745 if [ "$CFG_OPENGL" != "no" ]; then
5746 echo "OpenGL enabled, but GUI disabled."
5747 echo " You might need to either enable the GUI or disable OpenGL"
5751 if [ "$CFG_OPENGL" = "yes" ]; then
5753 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
5756 elif [ "$CFG_OPENGL" = "es2" ]; then
5758 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5759 if [ $? != "0" ]; then
5760 echo "The OpenGL ES 2.0 functionality test failed!"
5761 echo " You might need to modify the include and library search paths by editing"
5762 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5763 echo " ${XQMAKESPEC}."
5767 elif [ "$CFG_OPENGL" = "desktop" ]; then
5768 # Desktop OpenGL support
5769 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5774 if [ "$PLATFORM_QWS" = "yes" ]; then
5777 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5778 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5779 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
5780 if [ $? != "0" ]; then
5781 echo "The Ahi screen driver functionality test failed!"
5782 echo " You might need to modify the include and library search paths by editing"
5783 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5784 echo " ${XQMAKESPEC}."
5789 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5790 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
5791 if [ $? != "0" ]; then
5792 echo "The SVGAlib screen driver functionality test failed!"
5793 echo " You might need to modify the include and library search paths by editing"
5794 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5795 echo " ${XQMAKESPEC}."
5800 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5801 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
5802 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5803 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
5804 elif directfb-config --version >/dev/null 2>&1; then
5805 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
5806 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
5809 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5810 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
5811 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
5812 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
5815 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/directfb "DirectFB" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_DIRECTFB $QT_LIBS_DIRECTFB
5816 if [ $? != "0" ]; then
5817 echo "The DirectFB screen driver functionality test failed!"
5818 echo " You might need to modify the include and library search paths by editing"
5819 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5820 echo " ${XQMAKESPEC}."
5828 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5829 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5830 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
5831 if [ $? != "0" ]; then
5832 echo "The tslib functionality test failed!"
5833 echo " You might need to modify the include and library search paths by editing"
5834 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5835 echo " ${XQMAKESPEC}."
5844 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
5845 if [ $? != "0" ]; then
5846 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
5853 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
5854 if [ "$CFG_EGL" != "no" ]; then
5855 # detect EGL support
5856 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl" "EGL (EGL/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then
5857 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
5862 if [ "$EGL_VARIANT" = "none" ]; then
5863 if [ "$CFG_EGL" = "yes" ]; then
5864 echo "The EGL functionality test failed!"
5865 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
5866 echo " You might need to modify the include and library search paths by editing"
5867 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
5868 echo " ${XQMAKESPEC}."
5872 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
5873 if [ "$CFG_OPENGL" = "es2" ]; then
5880 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5883 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
5884 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5885 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5886 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/freetype "FreeType" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
5887 CFG_LIBFREETYPE=system
5893 if [ "$CFG_ENDIAN" = "auto" ]; then
5894 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5895 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5897 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "QMAKE_LFLAGS+=$SYSROOT_FLAG"
5899 if [ "$F" -eq 0 ]; then
5900 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5901 elif [ "$F" -eq 1 ]; then
5902 CFG_ENDIAN="Q_BIG_ENDIAN"
5905 echo "The target system byte order could not be detected!"
5906 echo "Turn on verbose messaging (-v) to see the final report."
5907 echo "You can use the -little-endian or -big-endian switch to"
5908 echo "$0 to continue."
5914 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5915 if [ "$BUILD_ON_MAC" = "yes" ]; then
5918 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5920 if [ "$F" -eq 0 ]; then
5921 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
5922 elif [ "$F" -eq 1 ]; then
5923 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
5926 echo "The host system byte order could not be detected!"
5927 echo "Turn on verbose messaging (-v) to see the final report."
5928 echo "You can use the -host-little-endian or -host-big-endian switch to"
5929 echo "$0 to continue."
5935 if [ "$CFG_ARMFPA" != "auto" ]; then
5936 if [ "$CFG_ARMFPA" = "yes" ]; then
5937 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5938 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5940 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
5943 CFG_DOUBLEFORMAT="normal"
5948 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5949 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5950 CFG_DOUBLEFORMAT=normal
5952 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5954 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5955 CFG_DOUBLEFORMAT=normal
5956 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
5957 CFG_DOUBLEFORMAT=normal
5958 elif [ "$F" -eq 10 ]; then
5959 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
5960 elif [ "$F" -eq 11 ]; then
5961 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
5962 elif [ "$F" -eq 12 ]; then
5963 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5965 elif [ "$F" -eq 13 ]; then
5966 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
5970 echo "The system floating point format could not be detected."
5971 echo "This may cause data to be generated in a wrong format"
5972 echo "Turn on verbose messaging (-v) to see the final report."
5973 # we do not fail on this since this is a new test, and if it fails,
5974 # the old behavior should be correct in most cases
5975 CFG_DOUBLEFORMAT=normal
5981 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5985 if [ "$CFG_STL" != "no" ]; then
5986 if [ "$HAVE_STL" = "yes" ]; then
5989 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5990 echo "STL support cannot be enabled due to functionality tests!"
5991 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5992 echo " If you believe this message is in error you may use the continue"
5993 echo " switch (-continue) to $0 to continue."
6001 # detect POSIX clock_gettime()
6002 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6003 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-gettime "POSIX clock_gettime()" $L_FLAGS $I_FLAGS $l_FLAGS; then
6004 CFG_CLOCK_GETTIME=yes
6006 CFG_CLOCK_GETTIME=no
6010 # detect POSIX monotonic clocks
6011 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6012 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-monotonic "POSIX Monotonic Clock" $L_FLAGS $I_FLAGS $l_FLAGS; then
6013 CFG_CLOCK_MONOTONIC=yes
6015 CFG_CLOCK_MONOTONIC=no
6017 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6018 CFG_CLOCK_MONOTONIC=no
6022 if [ "$CFG_MREMAP" = "auto" ]; then
6023 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6030 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6031 if [ "$CFG_GETADDRINFO" != "no" ]; then
6032 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6035 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6036 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6037 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6038 echo " If you believe this message is in error you may use the continue"
6039 echo " switch (-continue) to $0 to continue."
6047 # find if the platform provides inotify
6048 if [ "$CFG_INOTIFY" != "no" ]; then
6049 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6052 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6053 echo "inotify support cannot be enabled due to functionality tests!"
6054 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6055 echo " If you believe this message is in error you may use the continue"
6056 echo " switch (-continue) to $0 to continue."
6064 # find if the platform provides if_nametoindex (ipv6 interface name support)
6065 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6066 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6ifname "IPv6 interface name" $L_FLAGS $I_FLAGS $l_FLAGS; then
6069 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6070 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6071 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6072 echo " If you believe this message is in error you may use the continue"
6073 echo " switch (-continue) to $0 to continue."
6081 # find if the platform provides getifaddrs (network interface enumeration)
6082 if [ "$CFG_GETIFADDRS" != "no" ]; then
6083 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6086 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6087 echo "getifaddrs support cannot be enabled due to functionality tests!"
6088 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6089 echo " If you believe this message is in error you may use the continue"
6090 echo " switch (-continue) to $0 to continue."
6099 if [ "$CFG_OPENSSL" != "no" ]; then
6100 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/openssl "OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
6101 if [ "$CFG_OPENSSL" = "auto" ]; then
6105 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6106 echo "OpenSSL support cannot be enabled due to functionality tests!"
6107 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6108 echo " If you believe this message is in error you may use the continue"
6109 echo " switch (-continue) to $0 to continue."
6118 if [ "$CFG_PCRE" != "qt" ]; then
6119 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
6122 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6123 echo "PCRE support cannot be enabled due to functionality tests!"
6124 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6125 echo " If you believe this message is in error you may use the continue"
6126 echo " switch (-continue) to $0 to continue."
6134 # detect OpenVG support
6135 if [ "$CFG_OPENVG" != "no" ]; then
6136 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
6137 if [ "$CFG_OPENVG" = "auto" ]; then
6140 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
6141 if [ "$CFG_OPENVG" = "auto" ]; then
6144 CFG_OPENVG_ON_OPENGL=yes
6145 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
6146 if [ "$CFG_OPENVG" = "auto" ]; then
6149 CFG_OPENVG_LC_INCLUDES=yes
6150 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
6151 if [ "$CFG_OPENVG" = "auto" ]; then
6154 CFG_OPENVG_LC_INCLUDES=yes
6155 CFG_OPENVG_ON_OPENGL=yes
6157 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6158 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6159 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6160 echo " If you believe this message is in error you may use the continue"
6161 echo " switch (-continue) to $0 to continue."
6167 if [ "$CFG_OPENVG" = "yes" ] && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/shivavg" "ShivaVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
6168 CFG_OPENVG_SHIVA=yes
6172 if [ "$CFG_ALSA" = "auto" ]; then
6173 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6180 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6181 if [ "$CFG_ARCH" = "arm" ]; then
6182 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6183 if [ $? != "0" ]; then
6184 CFG_JAVASCRIPTCORE_JIT=no
6187 case "$XPLATFORM" in
6189 CFG_JAVASCRIPTCORE_JIT=no
6195 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6196 QMakeVar set JAVASCRIPTCORE_JIT yes
6197 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6198 QMakeVar set JAVASCRIPTCORE_JIT no
6201 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6202 CFG_AUDIO_BACKEND=yes
6205 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6206 echo "Warning: largefile support cannot be disabled for win32."
6210 #-------------------------------------------------------------------------------
6211 # ask for all that hasn't been auto-detected or specified in the arguments
6212 #-------------------------------------------------------------------------------
6214 ### fix this: user input should be validated in a loop
6215 if [ "$PLATFORM_QWS" = "yes" ]; then
6216 PROMPT_FOR_DEPTHS="yes"
6218 PROMPT_FOR_DEPTHS="no"
6220 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6222 echo "Choose pixel-depths to support:"
6224 echo " 1. 1bpp, black/white"
6225 echo " 4. 4bpp, grayscale"
6226 echo " 8. 8bpp, paletted"
6227 echo " 12. 12bpp, rgb 4-4-4"
6228 echo " 15. 15bpp, rgb 5-5-5"
6229 echo " 16. 16bpp, rgb 5-6-5"
6230 echo " 18. 18bpp, rgb 6-6-6"
6231 echo " 24. 24bpp, rgb 8-8-8"
6232 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6233 echo " all. All supported depths"
6235 echo "Your choices (default 8,16,32):"
6237 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6238 CFG_QWS_DEPTHS=8,16,32
6241 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6242 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6243 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6245 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6247 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6248 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6253 # enable dwarf2 support on Mac
6254 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6255 QT_CONFIG="$QT_CONFIG dwarf2"
6258 # Set the default Mac OS X arch if there are no "-arch" arguments on the configure line
6259 if [ "$BUILD_ON_MAC" = "yes" ]; then
6260 DEFAULT_ARCH="$CFG_MAC_ARCHS"
6261 if [ -z "$DEFAULT_ARCH" ]; then
6262 case `file "${outpath}/bin/qmake"` in
6270 # unsupported/unknown
6274 if [ -n "$DEFAULT_ARCH" ]; then
6275 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
6276 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
6277 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
6278 # Make the application arch follow the Qt arch for single arch builds.
6279 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
6280 [ `echo "$DEFAULT_ARCH" | wc -w` -eq 1 ] && QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
6285 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6286 QT_CONFIG="$QT_CONFIG phonon-backend"
6289 # disable accessibility
6290 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6291 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6293 QT_CONFIG="$QT_CONFIG accessibility"
6296 # egl stuff does not belong in lighthouse, but rather in plugins
6297 if [ "$PLATFORM_QPA" = "yes" ]; then
6302 if [ "$CFG_EGL" = "no" ]; then
6303 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6305 QT_CONFIG="$QT_CONFIG egl"
6306 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6307 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6312 if [ "$CFG_OPENVG" = "no" ]; then
6313 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6315 QT_CONFIG="$QT_CONFIG openvg"
6316 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6317 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6319 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6320 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6322 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6323 QT_CONFIG="$QT_CONFIG shivavg"
6324 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6329 if [ "$CFG_OPENGL" = "no" ]; then
6330 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6332 QT_CONFIG="$QT_CONFIG opengl"
6335 if [ "$CFG_OPENGL" = "es2" ]; then
6336 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6339 if [ "$CFG_OPENGL" = "es2" ]; then
6340 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6341 QT_CONFIG="$QT_CONFIG opengles2"
6344 # safe execution environment
6345 if [ "$CFG_SXE" != "no" ]; then
6346 QT_CONFIG="$QT_CONFIG sxe"
6349 # build up the variables for output
6350 if [ "$CFG_DEBUG" = "yes" ]; then
6351 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6352 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6353 elif [ "$CFG_DEBUG" = "no" ]; then
6354 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6355 QMAKE_CONFIG="$QMAKE_CONFIG release"
6357 if [ "$CFG_SHARED" = "yes" ]; then
6358 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6359 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6360 elif [ "$CFG_SHARED" = "no" ]; then
6361 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6362 QMAKE_CONFIG="$QMAKE_CONFIG static"
6364 if [ "$PLATFORM_QWS" = "yes" ]; then
6365 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6366 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6367 QT_CONFIG="$QT_CONFIG embedded"
6368 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6370 if [ "$PLATFORM_QPA" = "yes" ]; then
6371 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6372 QT_CONFIG="$QT_CONFIG qpa"
6373 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6374 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6377 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6378 # Do not set this here for Windows. Let qmake do it so
6379 # debug and release precompiled headers are kept separate.
6380 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6382 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6383 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6384 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6385 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6386 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6387 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6389 if [ "$CFG_STL" = "no" ]; then
6390 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6392 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6394 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6395 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6397 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6398 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6399 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6400 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6401 QMakeVar add QMAKE_CFLAGS -g
6402 QMakeVar add QMAKE_CXXFLAGS -g
6403 QT_CONFIG="$QT_CONFIG separate_debug_info"
6405 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6406 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6408 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6409 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6410 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6411 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6412 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6413 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
6414 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
6415 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
6416 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
6417 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6418 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6419 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6420 QT_CONFIG="$QT_CONFIG clock-gettime"
6422 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6423 QT_CONFIG="$QT_CONFIG clock-monotonic"
6425 if [ "$CFG_MREMAP" = "yes" ]; then
6426 QT_CONFIG="$QT_CONFIG mremap"
6428 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6429 QT_CONFIG="$QT_CONFIG getaddrinfo"
6431 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6432 QT_CONFIG="$QT_CONFIG ipv6ifname"
6434 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6435 QT_CONFIG="$QT_CONFIG getifaddrs"
6437 if [ "$CFG_INOTIFY" = "yes" ]; then
6438 QT_CONFIG="$QT_CONFIG inotify"
6440 if [ "$CFG_LIBJPEG" = "no" ]; then
6442 elif [ "$CFG_LIBJPEG" = "system" ]; then
6443 QT_CONFIG="$QT_CONFIG system-jpeg"
6445 if [ "$CFG_JPEG" = "no" ]; then
6446 QT_CONFIG="$QT_CONFIG no-jpeg"
6447 elif [ "$CFG_JPEG" = "yes" ]; then
6448 QT_CONFIG="$QT_CONFIG jpeg"
6450 if [ "$CFG_LIBPNG" = "no" ]; then
6453 if [ "$CFG_LIBPNG" = "system" ]; then
6454 QT_CONFIG="$QT_CONFIG system-png"
6456 if [ "$CFG_PNG" = "no" ]; then
6457 QT_CONFIG="$QT_CONFIG no-png"
6458 elif [ "$CFG_PNG" = "yes" ]; then
6459 QT_CONFIG="$QT_CONFIG png"
6461 if [ "$CFG_GIF" = "no" ]; then
6462 QT_CONFIG="$QT_CONFIG no-gif"
6463 elif [ "$CFG_GIF" = "yes" ]; then
6464 QT_CONFIG="$QT_CONFIG gif"
6466 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6467 QT_CONFIG="$QT_CONFIG no-freetype"
6468 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6469 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6470 QT_CONFIG="$QT_CONFIG system-freetype"
6472 QT_CONFIG="$QT_CONFIG freetype"
6474 if [ "$CFG_GUI" = "auto" ]; then
6477 if [ "$CFG_GUI" = "no" ]; then
6478 QT_CONFIG="$QT_CONFIG no-gui"
6480 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
6484 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6485 #On Mac we implicitly link against libz, so we
6486 #never use the 3rdparty stuff.
6487 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6489 if [ "$CFG_ZLIB" = "yes" ]; then
6490 QT_CONFIG="$QT_CONFIG zlib"
6491 elif [ "$CFG_ZLIB" = "system" ]; then
6492 QT_CONFIG="$QT_CONFIG system-zlib"
6495 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6496 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6497 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6498 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
6499 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6500 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6501 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6502 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6503 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6504 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6505 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6506 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6507 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
6508 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
6509 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
6511 if [ "$PLATFORM_X11" = "yes" ]; then
6512 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6514 # for some reason, the following libraries are not always built shared,
6515 # so *every* program/lib (including Qt) has to link against them
6516 if [ "$CFG_XSHAPE" = "yes" ]; then
6517 QT_CONFIG="$QT_CONFIG xshape"
6519 if [ "$CFG_XVIDEO" = "yes" ]; then
6520 QT_CONFIG="$QT_CONFIG xvideo"
6522 if [ "$CFG_XSYNC" = "yes" ]; then
6523 QT_CONFIG="$QT_CONFIG xsync"
6525 if [ "$CFG_XINERAMA" = "yes" ]; then
6526 QT_CONFIG="$QT_CONFIG xinerama"
6527 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6529 if [ "$CFG_XCURSOR" = "yes" ]; then
6530 QT_CONFIG="$QT_CONFIG xcursor"
6531 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6533 if [ "$CFG_XFIXES" = "yes" ]; then
6534 QT_CONFIG="$QT_CONFIG xfixes"
6535 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6537 if [ "$CFG_XRANDR" = "yes" ]; then
6538 QT_CONFIG="$QT_CONFIG xrandr"
6539 if [ "$CFG_XRENDER" != "yes" ]; then
6540 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6541 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6543 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6546 if [ "$CFG_XRENDER" = "yes" ]; then
6547 QT_CONFIG="$QT_CONFIG xrender"
6548 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6550 if [ "$CFG_MITSHM" = "yes" ]; then
6551 QT_CONFIG="$QT_CONFIG mitshm"
6553 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6554 QT_CONFIG="$QT_CONFIG fontconfig"
6556 if [ "$CFG_XINPUT" = "yes" ]; then
6557 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6559 if [ "$CFG_XINPUT" = "yes" ]; then
6560 QT_CONFIG="$QT_CONFIG xinput tablet"
6562 if [ "$CFG_XKB" = "yes" ]; then
6563 QT_CONFIG="$QT_CONFIG xkb"
6567 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6568 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6569 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6571 if [ "$PLATFORM_MAC" = "yes" ]; then
6572 if [ "$CFG_RPATH" = "yes" ]; then
6573 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6575 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
6576 if [ -n "$RPATH_FLAGS" ]; then
6578 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
6582 elif [ "$CFG_RPATH" = "yes" ]; then
6583 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6587 if [ "$CFG_RPATH" = "yes" ]; then
6588 # set the default rpath to the library installation directory
6589 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6591 if [ -n "$RPATH_FLAGS" ]; then
6592 # add the user defined rpaths
6593 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6597 if [ '!' -z "$I_FLAGS" ]; then
6598 # add the user define include paths
6599 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6600 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6603 if [ '!' -z "$W_FLAGS" ]; then
6604 # add the user defined warning flags
6605 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
6606 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
6607 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
6610 # turn off exceptions for the compilers that support it
6611 if [ "$PLATFORM_QWS" = "yes" ]; then
6612 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
6613 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
6614 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
6616 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6618 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6622 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6623 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6626 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6627 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
6628 # Follow default behavior of configure.exe by overriding with "rtti".
6629 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
6632 if [ "$CFG_ALSA" = "yes" ]; then
6633 QT_CONFIG="$QT_CONFIG alsa"
6636 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
6637 QT_CONFIG="$QT_CONFIG pulseaudio"
6640 if [ "$CFG_COREWLAN" = "yes" ]; then
6641 QT_CONFIG="$QT_CONFIG corewlan"
6644 if [ "$CFG_ICU" = "yes" ]; then
6645 QT_CONFIG="$QT_CONFIG icu"
6648 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
6649 QT_CONFIG="$QT_CONFIG force_asserts"
6652 if [ "$CFG_PCRE" = "qt" ]; then
6653 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
6657 # Some Qt modules are too advanced in C++ for some old compilers
6658 # Detect here the platforms where they are known to work.
6660 # See Qt documentation for more information on which features are
6661 # supported and on which compilers.
6663 canBuildQtConcurrent="yes"
6664 canUseV8Snapshot="yes"
6666 case "$XPLATFORM" in
6668 # PA-RISC's assembly is too limited
6669 # gcc 3.4 on that platform can't build QtXmlPatterns
6670 # the assembly it generates cannot be compiled
6672 # Check gcc's version
6673 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6677 canBuildQtXmlPatterns="no"
6681 canBuildQtXmlPatterns="no"
6685 unsupported/vxworks-*-g++*)
6688 unsupported/vxworks-*-dcc*)
6690 canBuildQtXmlPatterns="no"
6693 # Check gcc's version
6694 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6702 canBuildQtXmlPatterns="no"
6707 # Check the compiler version
6708 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6711 canBuildQtXmlPatterns="no"
6712 canBuildQtConcurrent="no"
6716 canBuildQtConcurrent="no"
6722 canBuildQtXmlPatterns="no"
6723 canBuildQtConcurrent="no"
6729 # Get the xlC version
6730 cat > xlcver.c <<EOF
6734 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6739 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6740 xlcver=`./xlcver 2>/dev/null`
6743 if [ "$OPT_VERBOSE" = "yes" ]; then
6744 if [ -n "$xlcver" ]; then
6745 echo Found IBM xlC version: $xlcver.
6747 echo Could not determine IBM xlC version, assuming oldest supported.
6754 canBuildQtXmlPatterns="no"
6755 canBuildQtConcurrent="no"
6759 canBuildQtConcurrent="no"
6765 canBuildQtConcurrent="no"
6769 if [ "$CFG_GUI" = "no" ]; then
6770 # WebKit requires QtGui
6774 if [ "$CFG_SHARED" = "no" ]; then
6776 echo "WARNING: Using static linking will disable the WebKit module."
6781 CFG_CONCURRENT="yes"
6782 if [ "$canBuildQtConcurrent" = "no" ]; then
6783 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6786 QT_CONFIG="$QT_CONFIG concurrent"
6790 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6791 QT_CONFIG="$QT_CONFIG audio-backend"
6795 if [ "$CFG_WEBKIT" = "debug" ]; then
6796 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6800 QT_CONFIG="$QT_CONFIG v8"
6801 # Detect snapshot support
6802 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6803 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6806 *) canUseV8Snapshot="no"
6810 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6811 # QEMU crashes when building inside Scratchbox with an ARM target
6812 canUseV8Snapshot="no"
6815 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6816 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6818 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6819 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6822 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6823 QT_CONFIG="$QT_CONFIG v8snapshot"
6827 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6828 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6831 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6834 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6835 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6836 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6841 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6842 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6843 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6850 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6856 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6858 case "$COMPILER_VERSION" in
6860 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6861 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6862 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6865 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6866 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6867 QT_GCC_PATCH_VERSION=0
6877 #-------------------------------------------------------------------------------
6878 # part of configuration information goes into qconfig.h
6879 #-------------------------------------------------------------------------------
6881 case "$CFG_QCONFIG" in
6883 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6886 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6887 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6888 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6889 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6890 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6891 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6893 echo "#endif" >>"$tmpconfig"
6897 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6901 # define QT_EDITION $QT_EDITION
6904 /* Machine byte-order */
6905 #define Q_BIG_ENDIAN 4321
6906 #define Q_LITTLE_ENDIAN 1234
6909 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6910 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6911 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6912 #if defined(__BIG_ENDIAN__)
6913 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6914 #elif defined(__LITTLE_ENDIAN__)
6915 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6917 # error "Unable to determine byte order!"
6921 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6923 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6924 if [ "$CFG_ENDIAN" = "auto" ]; then
6925 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6926 #if defined(__BIG_ENDIAN__)
6927 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6928 #elif defined(__LITTLE_ENDIAN__)
6929 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6931 # error "Unable to determine byte order!"
6935 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6937 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6939 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6940 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6941 /* Non-IEEE double format */
6942 #define Q_DOUBLE_LITTLE "01234567"
6943 #define Q_DOUBLE_BIG "76543210"
6944 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6945 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6946 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6949 if [ "$CFG_ARMFPA" = "yes" ]; then
6950 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6951 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6952 #ifndef QT_BOOTSTRAPPED
6957 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6961 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6962 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6963 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6964 /* Machine Architecture */
6965 #ifndef QT_BOOTSTRAPPED
6966 # define QT_ARCH_${CFG_ARCH_STR}
6968 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6972 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6973 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6975 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6976 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6979 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6980 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6983 if [ "$BUILD_ON_MAC" = "yes" ]; then
6984 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6985 #if defined(__LP64__)
6986 # define QT_POINTER_SIZE 8
6988 # define QT_POINTER_SIZE 4
6992 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6993 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6996 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6997 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6998 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
7002 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7004 if [ "$CFG_DEV" = "yes" ]; then
7005 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7008 # Embedded compile time options
7009 if [ "$PLATFORM_QWS" = "yes" ]; then
7010 # Add QWS to config.h
7011 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7013 # Add excluded decorations to $QCONFIG_FLAGS
7014 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7015 for decor in $decors; do
7016 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7017 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7020 # Figure which embedded drivers which are turned off
7021 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7022 for ADRIVER in $CFG_GFX_ON; do
7023 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7026 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7027 # the um driver is currently not in the available list for external builds
7028 if [ "$CFG_DEV" = "no" ]; then
7029 CFG_KBD_OFF="$CFG_KBD_OFF um"
7031 for ADRIVER in $CFG_KBD_ON; do
7032 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7035 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7036 for ADRIVER in $CFG_MOUSE_ON; do
7037 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7040 for DRIVER in $CFG_GFX_OFF; do
7041 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7042 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7045 for DRIVER in $CFG_KBD_OFF; do
7046 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7047 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7050 for DRIVER in $CFG_MOUSE_OFF; do
7051 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7052 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7056 if [ "$PLATFORM_QPA" = "yes" ]; then
7057 # Add QPA to config.h
7058 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7061 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7062 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7065 # Add turned on SQL drivers
7066 for DRIVER in $CFG_SQL_AVAILABLE; do
7067 eval "VAL=\$CFG_SQL_$DRIVER"
7070 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7071 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7072 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7075 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7081 QMakeVar set sql-drivers "$SQL_DRIVERS"
7082 QMakeVar set sql-plugins "$SQL_PLUGINS"
7084 # Add other configuration options to the qconfig.h file
7085 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7086 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7087 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7088 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7089 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7090 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7091 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7093 # X11/Unix/Mac only configs
7094 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7095 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7096 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7097 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7098 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7099 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7100 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7101 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7102 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7103 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7104 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7105 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7106 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7107 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
7108 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7110 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7111 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7112 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7113 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7114 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7115 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7116 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7117 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7118 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7119 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7120 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7121 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7122 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7124 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7125 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7126 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7127 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7128 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7129 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7130 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7131 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7133 # sort QCONFIG_FLAGS for neatness if we can
7134 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7135 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7137 if [ -n "$QCONFIG_FLAGS" ]; then
7138 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7139 #ifndef QT_BOOTSTRAPPED
7142 for cfg in $QCONFIG_FLAGS; do
7143 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7144 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7145 # figure out define logic, so we can output the correct
7146 # ifdefs to override the global defines in a project
7148 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7149 # QT_NO_option can be forcefully turned on by QT_option
7150 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7151 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7152 # QT_option can be forcefully turned off by QT_NO_option
7153 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7156 if [ -z $cfgdNeg ]; then
7157 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7164 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7165 #if defined($cfgd) && defined($cfgdNeg)
7167 #elif !defined($cfgd) && !defined($cfgdNeg)
7174 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7175 #endif // QT_BOOTSTRAPPED
7180 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7181 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7182 #define QT_VISIBILITY_AVAILABLE
7187 if [ -n "$QT_LIBINFIX" ]; then
7188 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7189 #define QT_LIBINFIX "$QT_LIBINFIX"
7194 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7195 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7196 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7198 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7199 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7200 chmod -w "$outpath/src/corelib/global/qconfig.h"
7201 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7202 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7206 #-------------------------------------------------------------------------------
7207 # save configuration into qconfig.pri
7208 #-------------------------------------------------------------------------------
7209 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7210 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7211 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7212 if [ "$CFG_DEBUG" = "yes" ]; then
7213 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7214 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7215 QT_CONFIG="$QT_CONFIG release"
7217 QT_CONFIG="$QT_CONFIG debug"
7218 elif [ "$CFG_DEBUG" = "no" ]; then
7219 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7220 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7221 QT_CONFIG="$QT_CONFIG debug"
7223 QT_CONFIG="$QT_CONFIG release"
7225 if [ "$CFG_STL" = "yes" ]; then
7226 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7228 if [ "$CFG_FRAMEWORK" = "no" ]; then
7229 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7231 QT_CONFIG="$QT_CONFIG qt_framework"
7232 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7234 if [ "$CFG_DEV" = "yes" ]; then
7235 QT_CONFIG="$QT_CONFIG private_tests"
7238 cat >>"$QTCONFIG.tmp" <<EOF
7240 CONFIG += $QTCONFIG_CONFIG
7242 QT_EDITION = $Edition
7243 QT_CONFIG += $QT_CONFIG
7246 QT_VERSION = $QT_VERSION
7247 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7248 QT_MINOR_VERSION = $QT_MINOR_VERSION
7249 QT_PATCH_VERSION = $QT_PATCH_VERSION
7252 QT_LIBINFIX = $QT_LIBINFIX
7253 QT_NAMESPACE = $QT_NAMESPACE
7256 if [ -n "$CFG_SYSROOT" ]; then
7257 echo "# sysroot" >>"$QTCONFIG.tmp"
7258 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
7259 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
7260 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7261 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7262 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7263 echo "}" >> "$QTCONFIG.tmp"
7264 echo >> "$QTCONFIG.tmp"
7266 if [ "$CFG_RPATH" = "yes" ]; then
7267 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7269 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7270 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7271 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7272 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7275 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
7276 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
7277 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
7280 # replace qconfig.pri if it differs from the newly created temp file
7281 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7282 rm -f "$QTCONFIG.tmp"
7284 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7287 #-------------------------------------------------------------------------------
7288 # save configuration into qmodule.pri
7289 #-------------------------------------------------------------------------------
7290 QTMODULE="$outpath/mkspecs/qmodule.pri"
7292 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
7294 # Ensure we can link to uninistalled libraries
7295 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
7296 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
7298 if [ -n "$QT_CFLAGS_PSQL" ]; then
7299 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
7301 if [ -n "$QT_LFLAGS_PSQL" ]; then
7302 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
7304 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7305 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
7307 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7308 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
7310 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7311 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
7313 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7314 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
7316 if [ -n "$QT_LFLAGS_ODBC" ]; then
7317 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
7319 if [ -n "$QT_LFLAGS_TDS" ]; then
7320 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
7323 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7324 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
7327 #dump in the OPENSSL_LIBS info
7328 if [ '!' -z "$OPENSSL_LIBS" ]; then
7329 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
7330 elif [ "$CFG_OPENSSL" = "linked" ]; then
7331 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
7334 #dump in the SDK info
7335 if [ '!' -z "$CFG_SDK" ]; then
7336 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
7340 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
7341 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
7343 # replace qmodule.pri if it differs from the newly created temp file
7344 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
7345 rm -f "$QTMODULE.tmp"
7347 mv -f "$QTMODULE.tmp" "$QTMODULE"
7350 #-------------------------------------------------------------------------------
7351 # save configuration into .qmake.cache
7352 #-------------------------------------------------------------------------------
7354 CACHEFILE="$outpath/.qmake.cache"
7355 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7356 cat >>"$CACHEFILE.tmp" <<EOF
7358 QT_SOURCE_TREE = \$\$quote($relpath)
7359 QT_BUILD_TREE = \$\$quote($outpath)
7360 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7362 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7363 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7364 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7365 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7366 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7367 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7369 include(\$\$PWD/mkspecs/qmodule.pri)
7370 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
7371 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7372 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7376 #dump the qmake spec
7377 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7378 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7380 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7385 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
7386 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7387 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
7388 # don't need to worry about generated files
7389 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7390 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
7392 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7394 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7395 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7398 # replace .qmake.cache if it differs from the newly created temp file
7399 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7400 rm -f "$CACHEFILE.tmp"
7402 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7405 #-------------------------------------------------------------------------------
7406 # give feedback on configuration
7407 #-------------------------------------------------------------------------------
7411 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7414 This target is using the GNU C++ compiler ($PLATFORM).
7416 Recent versions of this compiler automatically include code for
7417 exceptions, which increase both the size of the Qt libraries and
7418 the amount of memory taken by your applications.
7420 You may choose to re-run `basename $0` with the -no-exceptions
7421 option to compile Qt without exceptions. This is completely binary
7422 compatible, and existing applications will continue to work.
7430 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7433 This target is using the MIPSpro C++ compiler ($PLATFORM).
7435 You may choose to re-run `basename $0` with the -no-exceptions
7436 option to compile Qt without exceptions. This will make the
7437 size of the Qt library smaller and reduce the amount of memory
7438 taken by your applications.
7450 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7451 echo "Build type: $PLATFORM"
7453 echo "Building on: $PLATFORM"
7454 echo "Building for: $XPLATFORM"
7457 if [ ! -z "$CFG_MAC_ARCHS" ]; then
7458 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7460 echo "Architecture: $CFG_ARCH"
7463 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
7464 echo "Host architecture: $CFG_HOST_ARCH"
7467 if [ -n "$PLATFORM_NOTES" ]; then
7468 echo "Platform notes:"
7469 echo "$PLATFORM_NOTES"
7474 if [ "$OPT_VERBOSE" = "yes" ]; then
7475 echo $ECHO_N "qmake vars .......... $ECHO_C"
7476 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
7477 echo "qmake switches ......... $QMAKE_SWITCHES"
7480 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
7481 echo "Build .................. $CFG_BUILD_PARTS"
7482 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
7483 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7484 echo "Debug .................. yes (combined)"
7485 if [ "$CFG_DEBUG" = "yes" ]; then
7486 echo "Default Link ........... debug"
7488 echo "Default Link ........... release"
7491 echo "Debug .................. $CFG_DEBUG"
7493 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
7494 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
7495 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
7496 echo "QtConcurrent code ...... $CFG_CONCURRENT"
7497 echo "QtGui module ........... $CFG_GUI"
7498 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7499 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
7501 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
7503 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
7504 echo "STL support ............ $CFG_STL"
7505 echo "PCH support ............ $CFG_PRECOMPILE"
7506 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
7507 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
7508 echo "AVX..................... ${CFG_AVX}"
7509 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
7510 echo "iWMMXt support ......... ${CFG_IWMMXT}"
7511 echo "NEON support ........... ${CFG_NEON}"
7513 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
7514 echo "getaddrinfo support .... $CFG_GETADDRINFO"
7515 echo "getifaddrs support ..... $CFG_GETIFADDRS"
7516 echo "Accessibility .......... $CFG_ACCESSIBILITY"
7517 echo "NIS support ............ $CFG_NIS"
7518 echo "CUPS support ........... $CFG_CUPS"
7519 echo "Iconv support .......... $CFG_ICONV"
7520 echo "Glib support ........... $CFG_GLIB"
7521 echo "GStreamer support ...... $CFG_GSTREAMER"
7522 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
7523 echo "Large File support ..... $CFG_LARGEFILE"
7524 echo "GIF support ............ $CFG_GIF"
7525 if [ "$CFG_JPEG" = "no" ]; then
7526 echo "JPEG support ........... $CFG_JPEG"
7528 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
7530 if [ "$CFG_PNG" = "no" ]; then
7531 echo "PNG support ............ $CFG_PNG"
7533 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
7535 echo "zlib support ........... $CFG_ZLIB"
7536 echo "Session management ..... $CFG_SM"
7537 if [ "$PLATFORM_QWS" = "yes" ]; then
7538 echo "Embedded support ....... $CFG_EMBEDDED"
7539 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
7540 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
7542 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
7544 # Normalize the decoration output first
7545 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
7546 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
7547 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
7548 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
7549 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
7550 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
7551 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
7552 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
7553 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
7554 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
7555 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
7556 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
7557 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
7558 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
7559 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
7560 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
7562 if [ "$CFG_OPENGL" = "desktop" ]; then
7563 echo "OpenGL support ......... yes (Desktop OpenGL)"
7564 elif [ "$CFG_OPENGL" = "es2" ]; then
7565 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
7567 echo "OpenGL support ......... no"
7569 if [ "$CFG_EGL" != "no" ]; then
7570 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
7571 echo "EGL support ............ yes <GLES/egl.h>"
7573 echo "EGL support ............ yes <EGL/egl.h>"
7576 if [ "$CFG_OPENVG" ]; then
7577 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7578 echo "OpenVG support ......... ShivaVG"
7580 echo "OpenVG support ......... $CFG_OPENVG"
7583 if [ "$PLATFORM_X11" = "yes" ]; then
7584 echo "NAS sound support ...... $CFG_NAS"
7585 echo "XShape support ......... $CFG_XSHAPE"
7586 echo "XVideo support ......... $CFG_XVIDEO"
7587 echo "XSync support .......... $CFG_XSYNC"
7588 echo "Xinerama support ....... $CFG_XINERAMA"
7589 echo "Xcursor support ........ $CFG_XCURSOR"
7590 echo "Xfixes support ......... $CFG_XFIXES"
7591 echo "Xrandr support ......... $CFG_XRANDR"
7592 echo "Xi support ............. $CFG_XINPUT"
7593 echo "MIT-SHM support ........ $CFG_MITSHM"
7594 echo "FontConfig support ..... $CFG_FONTCONFIG"
7595 echo "XKB Support ............ $CFG_XKB"
7596 echo "immodule support ....... $CFG_IM"
7597 echo "GTK theme support ...... $CFG_QGTKSTYLE"
7599 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
7600 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
7601 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
7602 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
7603 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
7604 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
7605 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
7606 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
7607 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
7610 if [ "$CFG_OPENSSL" = "yes" ]; then
7611 OPENSSL_LINKAGE="(run-time)"
7612 elif [ "$CFG_OPENSSL" = "linked" ]; then
7613 OPENSSL_LINKAGE="(linked)"
7615 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
7616 echo "Alsa support ........... $CFG_ALSA"
7617 if [ "$BUILD_ON_MAC" = "yes" ]; then
7618 echo "CoreWlan support ....... $CFG_COREWLAN"
7620 echo "libICU support ......... $CFG_ICU"
7621 echo "PCRE support ........... $CFG_PCRE"
7622 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7623 echo "Xcb support ............ limited (old version)"
7625 echo "Xcb support ............ $CFG_XCB"
7627 echo "Xrender support ........ $CFG_XRENDER"
7628 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7629 echo "XInput2 support ........ $CFG_XINPUT2"
7633 # complain about not being able to use dynamic plugins if we are using a static build
7634 if [ "$CFG_SHARED" = "no" ]; then
7636 echo "WARNING: Using static linking will disable the use of dynamically"
7637 echo "loaded plugins. Make sure to import all needed static plugins,"
7638 echo "or compile needed modules into the library."
7641 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7643 echo "NOTE: When linking against OpenSSL, you can override the default"
7644 echo "library names through OPENSSL_LIBS."
7646 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
7649 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7651 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
7652 echo "if you want a pure debug build."
7657 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7662 #-------------------------------------------------------------------------------
7663 # build makefiles based on the configuration
7664 #-------------------------------------------------------------------------------
7666 echo "Finding project files. Please wait..."
7667 if [ "$CFG_NOPROCESS" != "yes" ]; then
7668 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
7669 if [ -f "${relpath}/qtbase.pro" ]; then
7670 mkfile="${outpath}/Makefile"
7671 [ -f "$mkfile" ] && chmod +w "$mkfile"
7672 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
7676 # .projects -> projects to process
7677 # .projects.1 -> qt and moc
7678 # .projects.2 -> subdirs and libs
7679 # .projects.3 -> the rest
7680 rm -f .projects .projects.1 .projects.2 .projects.3
7682 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7683 if [ -z "$AWK" ]; then
7684 for p in `echo $QMAKE_PROJECTS`; do
7685 echo "$p" >> .projects
7688 cat >projects.awk <<EOF
7694 first = "./.projects.1.tmp"
7695 second = "./.projects.2.tmp"
7696 third = "./.projects.3.tmp"
7701 if ( ! target_file )
7703 print input_file >target_file
7708 input_file = FILENAME
7713 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7716 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
7717 target_file = second
7722 matched_target == 0 && /^(TEMPLATE.*=)/ {
7723 if ( \$3 == "subdirs" )
7724 target_file = second
7725 else if ( \$3 == "lib" )
7731 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7732 if ( \$0 ~ /plugin/ )
7735 target_file = second
7740 if ( ! target_file )
7742 print input_file >>target_file
7749 for p in `echo $QMAKE_PROJECTS`; do
7750 echo "$p" >> .projects.all
7753 # if you get errors about the length of the command line to awk, change the -l arg
7755 split -l 100 .projects.all .projects.all.
7756 for p in .projects.all.*; do
7757 "$AWK" -f projects.awk `cat $p`
7758 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
7759 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
7760 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
7761 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
7763 rm -f .projects.all* projects.awk
7765 [ -f .projects.1 ] && cat .projects.1 >>.projects
7766 [ -f .projects.2 ] && cat .projects.2 >>.projects
7767 rm -f .projects.1 .projects.2
7768 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
7769 cat .projects.3 >>.projects
7773 # don't sort Qt and MOC in with the other project files
7774 # also work around a segfaulting uniq(1)
7775 if [ -f .sorted.projects.2 ]; then
7776 sort .sorted.projects.2 > .sorted.projects.2.new
7777 mv -f .sorted.projects.2.new .sorted.projects.2
7778 cat .sorted.projects.2 >> .sorted.projects.1
7780 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
7781 rm -f .sorted.projects.2 .sorted.projects.1
7785 if [ -f .projects ]; then
7786 uniq .projects >.tmp
7787 mv -f .tmp .projects
7788 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
7790 if [ -f .projects.3 ]; then
7791 uniq .projects.3 >.tmp
7792 mv -f .tmp .projects.3
7793 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7795 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7799 for part in $CFG_BUILD_PARTS; do
7801 tools) PART_ROOTS="$PART_ROOTS tools" ;;
7802 libs) PART_ROOTS="$PART_ROOTS src" ;;
7803 translations) PART_ROOTS="$PART_ROOTS translations" ;;
7804 examples) PART_ROOTS="$PART_ROOTS examples" ;;
7809 if [ "$CFG_DEV" = "yes" ]; then
7810 PART_ROOTS="$PART_ROOTS tests"
7813 echo "Creating makefiles. Please wait..."
7814 for file in .projects .projects.3; do
7815 [ '!' -f "$file" ] && continue
7816 for a in `cat $file`; do
7818 for r in $PART_ROOTS; do
7819 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
7824 [ "$IN_ROOT" = "no" ] && continue
7827 *winmain/winmain.pro)
7828 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
7832 */qmake/qmake.pro) continue ;;
7833 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*) SPEC=$QMAKESPEC ;;
7834 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
7840 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
7841 test -d "$dir" || mkdir -p "$dir"
7842 OUTDIR="$outpath/$dir"
7843 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7844 # fast configure - the makefile exists, skip it
7845 # since the makefile exists, it was generated by qmake, which means we
7846 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7848 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7851 QMAKE_SPEC_ARGS="-spec $SPEC"
7852 echo $ECHO_N " for $a$ECHO_C"
7854 QMAKE="$outpath/bin/qmake"
7855 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7856 if [ "$file" = ".projects.3" ]; then
7859 cat >"${OUTDIR}/Makefile" <<EOF
7860 # ${OUTDIR}/Makefile: generated by configure
7862 # WARNING: This makefile will be replaced with a real makefile.
7863 # All changes made to this file will be lost.
7865 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7867 cat >>"${OUTDIR}/Makefile" <<EOF
7869 all clean install qmake first Makefile: FORCE
7870 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7878 if [ "$OPT_VERBOSE" = "yes" ]; then
7879 echo " (`basename $SPEC`)"
7880 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7885 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7886 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7890 rm -f .projects .projects.3
7892 #-------------------------------------------------------------------------------
7893 # check for platforms that we don't yet know about
7894 #-------------------------------------------------------------------------------
7895 if [ "$CFG_ARCH" = "generic" ]; then
7898 NOTICE: Atomic operations are not yet supported for this
7901 Qt will use the 'generic' architecture instead, which uses a
7902 single pthread_mutex_t to protect all atomic operations. This
7903 implementation is the slow (but safe) fallback implementation
7904 for architectures Qt does not yet support.
7908 #-------------------------------------------------------------------------------
7909 # check if the user passed the -no-zlib option, which is no longer supported
7910 #-------------------------------------------------------------------------------
7911 if [ -n "$ZLIB_FORCED" ]; then
7912 which_zlib="supplied"
7913 if [ "$CFG_ZLIB" = "system" ]; then
7919 NOTICE: The -no-zlib option was supplied but is no longer
7922 Qt now requires zlib support in all builds, so the -no-zlib
7923 option was ignored. Qt will be built using the $which_zlib
7928 #-------------------------------------------------------------------------------
7929 # finally save the executed command to another script
7930 #-------------------------------------------------------------------------------
7931 if [ `basename $0` != "config.status" ]; then
7932 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7934 # add the system variables
7935 for varname in $SYSTEM_VARIABLES; do
7937 'if [ -n "\$'${varname}'" ]; then
7938 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7943 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7945 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7946 echo "#!/bin/sh" > "$outpath/config.status"
7947 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7948 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7949 echo "else" >> "$outpath/config.status"
7950 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7951 echo "fi" >> "$outpath/config.status"
7952 chmod +x "$outpath/config.status"
7955 if [ -n "$RPATH_MESSAGE" ]; then
7957 echo "$RPATH_MESSAGE"
7960 MAKE=`basename "$MAKE"`
7962 echo Qt is now configured for building. Just run \'$MAKE\'.
7963 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7964 echo Once everything is built, Qt is installed.
7965 echo You should not run \'$MAKE install\'.
7967 echo Once everything is built, you must run \'$MAKE install\'.
7968 echo Qt will be installed into $QT_INSTALL_PREFIX
7971 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.