2011-04-27 10:05:43 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#############################################################################
|
|
|
|
##
|
2016-01-15 12:36:27 +00:00
|
|
|
## Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
## Copyright (C) 2016 Intel Corporation.
|
|
|
|
## Contact: https://www.qt.io/licensing/
|
2011-04-27 10:05:43 +00:00
|
|
|
##
|
|
|
|
## This file is the build configuration utility of the Qt Toolkit.
|
|
|
|
##
|
2016-01-15 12:36:27 +00:00
|
|
|
## $QT_BEGIN_LICENSE:GPL-EXCEPT$
|
2012-09-19 12:28:29 +00:00
|
|
|
## Commercial License Usage
|
|
|
|
## Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
## accordance with the commercial license agreement provided with the
|
|
|
|
## Software or, alternatively, in accordance with the terms contained in
|
2015-01-28 08:44:43 +00:00
|
|
|
## a written agreement between you and The Qt Company. For licensing terms
|
2016-01-15 12:36:27 +00:00
|
|
|
## and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
## information use the contact form at https://www.qt.io/contact-us.
|
2012-09-19 12:28:29 +00:00
|
|
|
##
|
2016-01-15 12:36:27 +00:00
|
|
|
## GNU General Public License Usage
|
|
|
|
## Alternatively, this file may be used under the terms of the GNU
|
|
|
|
## General Public License version 3 as published by the Free Software
|
|
|
|
## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
## included in the packaging of this file. Please review the following
|
|
|
|
## information to ensure the GNU General Public License requirements will
|
|
|
|
## be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2011-04-27 10:05:43 +00:00
|
|
|
##
|
|
|
|
## $QT_END_LICENSE$
|
|
|
|
##
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# script initialization
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# the name of this script
|
|
|
|
relconf=`basename $0`
|
|
|
|
# the directory of this script is the "source tree"
|
|
|
|
relpath=`dirname $0`
|
|
|
|
relpath=`(cd "$relpath"; /bin/pwd)`
|
|
|
|
# the current directory is the "build tree" or "object tree"
|
|
|
|
outpath=`/bin/pwd`
|
|
|
|
|
2013-11-12 17:36:15 +00:00
|
|
|
# where to find which..
|
|
|
|
unixtests="$relpath/config.tests/unix"
|
|
|
|
mactests="$relpath/config.tests/mac"
|
|
|
|
WHICH="$unixtests/which.test"
|
|
|
|
|
|
|
|
PERL=`$WHICH perl 2>/dev/null`
|
|
|
|
|
|
|
|
# find out which awk we want to use, prefer gawk, then nawk, then regular awk
|
|
|
|
AWK=
|
|
|
|
for e in gawk nawk awk; do
|
|
|
|
if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
|
|
|
|
AWK=$e
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# find a make command
|
|
|
|
if [ -z "$MAKE" ]; then
|
|
|
|
MAKE=
|
|
|
|
for mk in gmake make; do
|
|
|
|
if "$WHICH" $mk >/dev/null 2>&1; then
|
|
|
|
MAKE=`"$WHICH" $mk`
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ -z "$MAKE" ]; then
|
|
|
|
echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
|
|
|
|
echo >&2 "Cannot proceed."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
# export MAKE, we need it later in the config.tests
|
|
|
|
export MAKE
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2013-06-18 13:11:11 +00:00
|
|
|
# do this early so we don't store it in config.status
|
|
|
|
CFG_TOPLEVEL=
|
|
|
|
if [ x"$1" = x"-top-level" ]; then
|
|
|
|
CFG_TOPLEVEL=yes
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# later cache the command line in config.status
|
2014-11-18 19:21:09 +00:00
|
|
|
OPT_CMDLINE=
|
|
|
|
for i in "$@"; do
|
|
|
|
if [ "x$i" != "x-v" ]; then
|
|
|
|
[ -z "${i##* *}" ] && i="'$i'"
|
|
|
|
OPT_CMDLINE="$OPT_CMDLINE $i"
|
|
|
|
fi
|
|
|
|
done
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# initialize global variables
|
2016-04-14 20:48:15 +00:00
|
|
|
CONFIG_SEPARATORS=`printf ' \t'`
|
2011-04-27 10:05:43 +00:00
|
|
|
QMAKE_CONFIG=
|
|
|
|
QTCONFIG_CONFIG=
|
|
|
|
QT_CONFIG=
|
|
|
|
QMAKE_VARS_FILE=.qmake.vars
|
2012-03-20 21:02:21 +00:00
|
|
|
DEVICE_VARS_FILE=.device.vars
|
2015-10-12 07:55:30 +00:00
|
|
|
HOST_VARS_FILE=.host.vars
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
:> "$QMAKE_VARS_FILE"
|
2012-03-20 21:02:21 +00:00
|
|
|
:> "$DEVICE_VARS_FILE"
|
2015-10-12 07:55:30 +00:00
|
|
|
:> "$HOST_VARS_FILE"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# utility functions
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
shellEscape()
|
|
|
|
{
|
|
|
|
echo "$@" | sed 's/ /\ /g'
|
|
|
|
}
|
|
|
|
|
2014-11-28 13:28:49 +00:00
|
|
|
makeabs()
|
|
|
|
{
|
2016-01-07 15:56:39 +00:00
|
|
|
local FILE="$1"
|
|
|
|
local RES="$FILE"
|
2014-11-28 13:28:49 +00:00
|
|
|
if [ -z "${FILE##/*}" ]; then
|
|
|
|
true
|
|
|
|
elif [ "$OSTYPE" = "msys" -a -z "${FILE##[a-zA-Z]:[/\\]*}" ]; then
|
|
|
|
true
|
|
|
|
else
|
|
|
|
RES=$PWD/$FILE
|
|
|
|
fi
|
|
|
|
RES=$RES/
|
|
|
|
while true; do
|
|
|
|
nres=`echo "$RES" | sed 's,/[^/][^/]*/\.\./,/,g; s,/\./,/,g'`
|
|
|
|
test x"$nres" = x"$RES" && break
|
|
|
|
RES=$nres
|
|
|
|
done
|
|
|
|
echo "$RES" | sed 's,//,/,g; s,/$,,'
|
|
|
|
}
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# Adds a new qmake variable to the cache
|
|
|
|
# Usage: QMakeVar mode varname contents
|
|
|
|
# where mode is one of: set, add, del
|
|
|
|
QMakeVar()
|
|
|
|
{
|
|
|
|
case "$1" in
|
|
|
|
set)
|
|
|
|
eq="="
|
|
|
|
;;
|
|
|
|
add)
|
|
|
|
eq="+="
|
|
|
|
;;
|
|
|
|
del)
|
|
|
|
eq="-="
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo >&2 "BUG: wrong command to QMakeVar: $1"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
|
|
|
|
}
|
|
|
|
|
configure: properly quote glesv2 flags
pkg-config returns glesv2 build flags, which are parsed into a few
variables. However, extra spaces get included in these variables and
quoted, which makes includes paths not work.
This problem can only be hit, if you do not have GL ES 2 headers
installed system-wide, but you do have installed into $prefix, and
pkg-config configured to return the configuration for $prefix. Even
though pkg-config returns correct paths, extra space gets included.
Fix it by parsing the strings returned by pkg-config just like a shell
would parse a command line. pkg-config escapes e.g. spaces, so those
escape sequences need to be interpreted, while doing word-splitting. The
result is a quoted list, as expected in the qmake files.
Done-with: Pekka Paalanen <ppaalanen@gmail.com>
Change-Id: I0593ef7e0606ac5ea80da046e45f86806206951a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-29 07:16:15 +00:00
|
|
|
shellArgumentListToQMakeListHelper()
|
|
|
|
{
|
|
|
|
local retval
|
|
|
|
for arg in "$@"; do retval="$retval \"$arg\""; done
|
|
|
|
echo "$retval"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Convert a string usable on a shell command line into word-by-word quoted
|
|
|
|
# qmake list.
|
|
|
|
shellArgumentListToQMakeList()
|
|
|
|
{
|
|
|
|
# eval is needed for the shell to interpret the backslash escape sequences
|
|
|
|
eval shellArgumentListToQMakeListHelper "$@"
|
|
|
|
}
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# Helper function for getQMakeConf. It parses include statements in
|
|
|
|
# qmake.conf and prints out the expanded file
|
2013-03-05 12:17:39 +00:00
|
|
|
expandQMakeConf()
|
2011-04-27 10:05:43 +00:00
|
|
|
{
|
|
|
|
while read line; do case "$line" in
|
|
|
|
include*)
|
2013-12-05 18:44:09 +00:00
|
|
|
inc_file=`echo "$line" | sed -n -e '/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p'`
|
2011-04-27 10:05:43 +00:00
|
|
|
current_dir=`dirname "$1"`
|
|
|
|
conf_file="$current_dir/$inc_file"
|
|
|
|
if [ ! -f "$conf_file" ]; then
|
|
|
|
echo "WARNING: Unable to find file $conf_file" >&2
|
|
|
|
continue
|
|
|
|
fi
|
2015-10-12 07:55:30 +00:00
|
|
|
expandQMakeConf "$conf_file" "$2"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2012-05-31 06:13:10 +00:00
|
|
|
*load\(device_config\)*)
|
2015-10-12 07:55:30 +00:00
|
|
|
conf_file="$2"
|
2012-05-31 06:13:10 +00:00
|
|
|
if [ ! -f "$conf_file" ]; then
|
|
|
|
echo "WARNING: Unable to find file $conf_file" >&2
|
|
|
|
continue
|
|
|
|
fi
|
2015-10-12 07:55:30 +00:00
|
|
|
expandQMakeConf "$conf_file" "$2"
|
2012-05-31 06:13:10 +00:00
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
*)
|
|
|
|
echo "$line"
|
|
|
|
;;
|
|
|
|
esac; done < "$1"
|
|
|
|
}
|
|
|
|
|
2013-03-05 12:17:39 +00:00
|
|
|
extractQMakeVariables()
|
2012-01-31 11:49:53 +00:00
|
|
|
{
|
configure: fix expanding system commands in qmake parser with GNU awk < 4
qmake variables using $$system() were incorrectly parsed by the custom
qmake parser in the configure script, when using GNU awk 3.1.8 or
earlier. They are parsed correctly with GNU awk 4 or mawk.
This was occurring with such an assignement (from an extra mkspecs file):
QMAKE_CC = $$system($$CMD QMAKE_CC 2>/dev/null)
The custom qmake parser in the configure script first attempts to
expand $$UPPERCASE variables, before running $$system(), using this:
match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)
But when using non-ASCII locales with GNU awk 3.1.8 or earlier,
$$system was expanded (to an empty string) because these earlier awk
versions match lowercase letters for the [A-Z] regexp, which is
traditionally used to match uppercase letters.
This behavior has been changed in GNU awk 4.0.0, which only matches
uppercase letters for [A-Z] by default. A workaround for earlier GNU
awk versions is to run awk with the C locale.
See GNU awk NEWS "Changes from 3.1.8 to 4.0.0":
25. Gawk now treats ranges of the form [d-h] as if they were in the C
locale, no matter what kind of regexp is being used, and even if
--posix. The latest POSIX standard allows this, and the documentation
has been updated. Maybe this will stop all the questions about
[a-z] matching uppercase letters.
THIS CHANGES BEHAVIOR!!!!
See also gawk.info "A.7 Regexp Ranges and Locales: A Long Sad Story"
Change-Id: Ibb3eb28738c3e77d496c634e1f5c9f630957e730
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-19 13:12:36 +00:00
|
|
|
LC_ALL=C $AWK '
|
2012-01-31 11:49:53 +00:00
|
|
|
BEGIN {
|
|
|
|
values["LITERAL_WHITESPACE"] = " "
|
|
|
|
values["LITERAL_DOLLAR"] = "$"
|
|
|
|
}
|
2013-03-06 22:06:46 +00:00
|
|
|
/^!?host_build:/ {
|
|
|
|
scopeStart = index($0, ":") + 1
|
|
|
|
condition = substr($0, 0, scopeStart - 2)
|
|
|
|
if (condition != "'"$1"'") { next }
|
|
|
|
$0 = substr($0, scopeStart)
|
|
|
|
}
|
2012-02-25 12:48:49 +00:00
|
|
|
/^[_A-Z0-9.]+[ \t]*\+?=/ {
|
2012-01-31 11:49:53 +00:00
|
|
|
valStart = index($0, "=") + 1
|
|
|
|
|
|
|
|
append = 0
|
|
|
|
if (substr($0, valStart - 2, 1) == "+") {
|
|
|
|
append = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
variable = substr($0, 0, valStart - 2 - append)
|
|
|
|
value = substr($0, valStart)
|
|
|
|
gsub("[ \t]+", "", variable)
|
|
|
|
gsub("^[ \t]+", "", value)
|
|
|
|
gsub("[ \t]+$", "", value)
|
|
|
|
|
|
|
|
ovalue = ""
|
|
|
|
while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
|
|
|
|
ovalue = ovalue substr(value, 1, RSTART - 1)
|
|
|
|
var = substr(value, RSTART + 2, RLENGTH - 2)
|
|
|
|
value = substr(value, RSTART + RLENGTH)
|
2012-04-30 12:29:26 +00:00
|
|
|
if (var ~ /^\{/) {
|
2012-01-31 11:49:53 +00:00
|
|
|
var = substr(var, 2, length(var) - 2)
|
|
|
|
}
|
|
|
|
ovalue = ovalue values[var]
|
|
|
|
}
|
2012-10-26 13:04:02 +00:00
|
|
|
value = ovalue value
|
|
|
|
|
|
|
|
ovalue = ""
|
2013-03-02 17:28:57 +00:00
|
|
|
while (match(value, /\$\$system\(("[^"]*"|[^)]*)\)/)) {
|
2012-10-26 13:04:02 +00:00
|
|
|
ovalue = ovalue substr(value, 1, RSTART - 1)
|
|
|
|
cmd = substr(value, RSTART + 9, RLENGTH - 10)
|
2013-03-02 17:28:57 +00:00
|
|
|
gsub(/^"|"$/, "", cmd)
|
2012-10-26 13:04:02 +00:00
|
|
|
value = substr(value, RSTART + RLENGTH)
|
|
|
|
while ((cmd | getline line) > 0) {
|
|
|
|
ovalue = ovalue line
|
|
|
|
}
|
|
|
|
close(cmd)
|
|
|
|
}
|
|
|
|
value = ovalue value
|
2012-01-31 11:49:53 +00:00
|
|
|
|
|
|
|
combinedValue = values[variable]
|
|
|
|
if (append == 1 && length(combinedValue) > 0) {
|
2012-10-26 13:04:02 +00:00
|
|
|
combinedValue = combinedValue " " value
|
2012-01-31 11:49:53 +00:00
|
|
|
} else {
|
2012-10-26 13:04:02 +00:00
|
|
|
combinedValue = value
|
2012-01-31 11:49:53 +00:00
|
|
|
}
|
|
|
|
values[variable] = combinedValue
|
|
|
|
}
|
|
|
|
END {
|
|
|
|
for (var in values) {
|
|
|
|
print var "=" values[var]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
'
|
|
|
|
}
|
|
|
|
|
2013-03-05 12:17:39 +00:00
|
|
|
getSingleQMakeVariable()
|
2012-01-31 11:49:53 +00:00
|
|
|
{
|
|
|
|
echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
|
|
|
|
}
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-02-27 14:01:25 +00:00
|
|
|
macSDKify()
|
|
|
|
{
|
|
|
|
# Normally we take care of sysrootifying in sdk.prf, but configure extracts some
|
|
|
|
# values before qmake is even built, so we have to duplicate the logic here.
|
|
|
|
|
|
|
|
sdk=$(getSingleQMakeVariable "QMAKE_MAC_SDK" "$1")
|
|
|
|
if [ -z "$sdk" ]; then echo "QMAKE_MAC_SDK must be set when building on Mac" >&2; exit 1; fi
|
2013-04-08 14:34:33 +00:00
|
|
|
sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)
|
2013-02-27 14:01:25 +00:00
|
|
|
if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi
|
|
|
|
|
|
|
|
case "$sdk" in
|
|
|
|
macosx*)
|
|
|
|
version_min_flag="-mmacosx-version-min=$(getSingleQMakeVariable QMAKE_MACOSX_DEPLOYMENT_TARGET "$1")"
|
|
|
|
;;
|
|
|
|
iphoneos*)
|
|
|
|
version_min_flag="-miphoneos-version-min=$(getSingleQMakeVariable QMAKE_IOS_DEPLOYMENT_TARGET "$1")"
|
|
|
|
;;
|
|
|
|
iphonesimulator*)
|
|
|
|
version_min_flag="-mios-simulator-version-min=$(getSingleQMakeVariable QMAKE_IOS_DEPLOYMENT_TARGET "$1")"
|
|
|
|
;;
|
2016-02-16 14:29:59 +00:00
|
|
|
appletvos*)
|
|
|
|
version_min_flag="-mappletvos-version-min=$(getSingleQMakeVariable QMAKE_TVOS_DEPLOYMENT_TARGET "$1")"
|
|
|
|
;;
|
|
|
|
appletvsimulator*)
|
|
|
|
version_min_flag="-mtvos-simulator-version-min=$(getSingleQMakeVariable QMAKE_TVOS_DEPLOYMENT_TARGET "$1")"
|
|
|
|
;;
|
2013-02-27 14:01:25 +00:00
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "$1" | while read line; do
|
|
|
|
case "$line" in
|
|
|
|
QMAKE_CC=*|QMAKE_CXX=*|QMAKE_FIX_RPATH=*|QMAKE_AR=*|QMAKE_RANLIB=*|QMAKE_LINK=*|QMAKE_LINK_SHLIB=*)
|
|
|
|
# Prefix tool with toolchain path
|
|
|
|
var=$(echo "$line" | cut -d '=' -f 1)
|
|
|
|
val=$(echo "$line" | cut -d '=' -f 2-)
|
2013-04-08 14:34:33 +00:00
|
|
|
sdk_val=$(/usr/bin/xcrun -sdk $sdk -find $(echo $val | cut -d ' ' -f 1))
|
2013-02-27 14:01:25 +00:00
|
|
|
val=$(echo $sdk_val $(echo $val | cut -s -d ' ' -f 2-))
|
|
|
|
echo "$var=$val"
|
|
|
|
;;
|
Distinguish between Objective-C and Objective-C++ sources
Instead of lumping both Objective-C (.m) and Objective-C++ (.mm) sources
into the same pile, passing them on to the same compiler as for C++ (CXX),
with the C++ flags (CXXFLAGS), we follow Apple's lead and treat them as
variants of the C and C++ languages separately, so that Objective-C
sources are built with CC and with CFLAGS, and Objective-C++ sources
with CXX, and CXXFLAGS.
This lets us remove a lot of duplicated flags and definitions from the
QMAKE_OBJECTIVE_CFLAGS variable, which in 99% of the cases just matched
the C++ equivalent. The remaining Objective-C/C++ flags are added to
CFLAGS/CXXFLAGS, as the compiler will just ignore them when running in
C/C++ mode. This matches Xcode, which also doesn't have a separate build
setting for Objective-C/C++ flags.
The Makefile qmake generator has been rewritten to support Objective-C/C++
fully, by not assuming that we're just iterating over the C and C++
extensions when dealing with compilation rules, precompiled headers, etc.
There's some duplicated logic in this code, as inherent by qmake's already
duplicated code paths, but this can be cleaned up when C++11 support is
mandatory and we can use lambda functions.
Task-number: QTBUG-36575
Change-Id: I4f06576d5f49e939333a2e03d965da54119e5e31
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-02 11:54:33 +00:00
|
|
|
QMAKE_CFLAGS=*|QMAKE_CXXFLAGS=*)
|
2013-02-27 14:01:25 +00:00
|
|
|
echo "$line -isysroot $sysroot $version_min_flag"
|
|
|
|
;;
|
|
|
|
QMAKE_LFLAGS=*)
|
|
|
|
echo "$line -Wl,-syslibroot,$sysroot $version_min_flag"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "$line"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# relies on $QMAKESPEC being set correctly. parses include statements in
|
|
|
|
# qmake.conf and prints out the expanded file
|
|
|
|
getQMakeConf()
|
|
|
|
{
|
2012-01-31 11:49:53 +00:00
|
|
|
if [ -z "$specvals" ]; then
|
2015-10-12 07:55:30 +00:00
|
|
|
specvals=`expandQMakeConf "$QMAKESPEC/qmake.conf" "$HOST_VARS_FILE" | extractQMakeVariables "host_build"`
|
2013-02-27 14:01:25 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then specvals=$(macSDKify "$specvals"); fi
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2013-03-05 12:17:39 +00:00
|
|
|
getSingleQMakeVariable "$1" "$specvals"
|
2012-01-31 11:49:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
getXQMakeConf()
|
|
|
|
{
|
|
|
|
if [ -z "$xspecvals" ]; then
|
2015-10-12 07:55:30 +00:00
|
|
|
xspecvals=`expandQMakeConf "$XQMAKESPEC/qmake.conf" "$DEVICE_VARS_FILE" | extractQMakeVariables "!host_build"`
|
2013-11-12 21:01:44 +00:00
|
|
|
if [ "$XPLATFORM_MAC" = "yes" ]; then xspecvals=$(macSDKify "$xspecvals"); fi
|
2012-01-31 11:49:53 +00:00
|
|
|
fi
|
2013-03-05 12:17:39 +00:00
|
|
|
getSingleQMakeVariable "$1" "$xspecvals"
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
|
2016-04-14 20:48:15 +00:00
|
|
|
testXConfig()
|
|
|
|
{
|
|
|
|
# Put a space on each end of the CONFIG value so that searching for the
|
|
|
|
# target with whitespace on either side will work even when it's the
|
|
|
|
# first/last/only item in the CONFIG value.
|
|
|
|
case \ `getXQMakeConf CONFIG`\ in
|
|
|
|
*[${CONFIG_SEPARATORS}]$1[${CONFIG_SEPARATORS}]*)
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
return 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
compilerSupportsFlag()
|
|
|
|
{
|
|
|
|
cat >conftest.cpp <<EOF
|
|
|
|
int main() { return 0; }
|
|
|
|
EOF
|
2015-03-18 10:23:14 +00:00
|
|
|
if [ "$OPT_VERBOSE" = "yes" ]; then
|
2015-04-22 10:39:23 +00:00
|
|
|
"$@" -o conftest-out conftest.cpp
|
2015-03-18 10:23:14 +00:00
|
|
|
else
|
2015-04-22 10:39:23 +00:00
|
|
|
"$@" -o conftest-out conftest.cpp >/dev/null 2>&1
|
2015-03-18 10:23:14 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
ret=$?
|
2015-04-22 10:39:23 +00:00
|
|
|
rm -f conftest.cpp conftest-out
|
2011-04-27 10:05:43 +00:00
|
|
|
return $ret
|
|
|
|
}
|
|
|
|
|
|
|
|
linkerSupportsFlag()
|
|
|
|
{
|
2012-10-18 14:40:33 +00:00
|
|
|
compiler=$1
|
|
|
|
shift
|
2011-04-27 10:05:43 +00:00
|
|
|
lflags=-Wl
|
|
|
|
for flag
|
|
|
|
do
|
|
|
|
safe_flag=`shellEscape "$flag"`
|
|
|
|
lflags=$lflags,$safe_flag
|
|
|
|
done
|
2015-04-22 10:37:15 +00:00
|
|
|
if [ $CFG_USE_GOLD_LINKER = yes ]; then
|
|
|
|
lflags="-fuse-ld=gold $lflags"
|
|
|
|
fi
|
2015-03-16 12:18:59 +00:00
|
|
|
compilerSupportsFlag $compiler $lflags
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
|
2012-08-24 11:28:36 +00:00
|
|
|
# $1: newline-separated list of default paths
|
|
|
|
# stdin: input path
|
|
|
|
# stdout: input path or nothing
|
|
|
|
filterDefaultPaths()
|
|
|
|
{
|
|
|
|
local path
|
|
|
|
path=`cat`
|
2014-11-28 13:28:49 +00:00
|
|
|
path=`makeabs "$path"`
|
2012-08-24 11:28:36 +00:00
|
|
|
echo "$1" | grep "^$path\$" > /dev/null || echo "$path"
|
|
|
|
}
|
|
|
|
|
|
|
|
filterIncludePath()
|
|
|
|
{
|
|
|
|
filterDefaultPaths "$DEFAULT_INCDIRS"
|
|
|
|
}
|
|
|
|
|
|
|
|
filterLibraryPath()
|
|
|
|
{
|
|
|
|
filterDefaultPaths "$DEFAULT_LIBDIRS"
|
|
|
|
}
|
|
|
|
|
|
|
|
filterPathOptionsHelper()
|
|
|
|
{
|
|
|
|
local flag defpaths sep p path
|
|
|
|
flag=$1; shift
|
|
|
|
defpaths=$1; shift
|
|
|
|
sep=
|
|
|
|
for p in "$@"; do
|
|
|
|
path=${p#$flag}
|
|
|
|
if [ "x$path" != "x$p" ]; then
|
|
|
|
path=`echo "$path" | filterDefaultPaths "$defpaths"`
|
|
|
|
test -z "$path" && continue
|
|
|
|
fi
|
|
|
|
# Re-quote for shell & qmake
|
|
|
|
p=`echo "$p" | sed 's,[^ ]* .*,"&",g'`
|
|
|
|
printf "%s%s" "$sep" "$p"
|
|
|
|
sep=" "
|
|
|
|
done
|
|
|
|
echo
|
|
|
|
}
|
|
|
|
|
|
|
|
# $1: flag
|
|
|
|
# $2: newline-separated list of default paths
|
|
|
|
# stdin: list of command line options
|
|
|
|
# sdout: stdin without the options naming default paths
|
|
|
|
filterPathOptions()
|
|
|
|
{
|
|
|
|
# The eval does escape interpretation for us
|
|
|
|
eval filterPathOptionsHelper $1 "\"$2\"" "`cat`"
|
|
|
|
}
|
|
|
|
|
|
|
|
filterIncludeOptions()
|
|
|
|
{
|
|
|
|
filterPathOptions -I "$DEFAULT_INCDIRS"
|
|
|
|
}
|
|
|
|
|
|
|
|
filterLibraryOptions()
|
|
|
|
{
|
|
|
|
filterPathOptions -L "$DEFAULT_LIBDIRS"
|
|
|
|
}
|
|
|
|
|
2012-03-20 21:02:21 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# device options
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
DeviceVar()
|
|
|
|
{
|
|
|
|
case "$1" in
|
|
|
|
set)
|
|
|
|
eq="="
|
|
|
|
;;
|
|
|
|
*)
|
2015-11-18 10:06:33 +00:00
|
|
|
echo >&2 "BUG: wrong command to DeviceVar: $1"
|
2012-03-20 21:02:21 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
|
|
|
|
}
|
|
|
|
|
2012-05-15 15:44:13 +00:00
|
|
|
resolveDeviceMkspec()
|
|
|
|
{
|
2012-06-08 22:26:54 +00:00
|
|
|
result=$(find "$relpath/mkspecs/devices/" -type d -name "*$1*" | sed "s,^$relpath/mkspecs/,,")
|
2012-05-15 15:44:13 +00:00
|
|
|
match_count=$(echo "$result" | wc -w)
|
|
|
|
if [ "$match_count" -gt 1 ]; then
|
2012-06-08 22:26:54 +00:00
|
|
|
echo >&2 "Error: Multiple matches for device '$1'. Candidates are:"
|
2013-12-05 18:44:09 +00:00
|
|
|
tabbed_result=$(echo "$result" | sed 's,^, ,')
|
2012-05-15 15:44:13 +00:00
|
|
|
echo >&2 "$tabbed_result"
|
|
|
|
echo "undefined"
|
|
|
|
elif [ "$match_count" -eq 0 ]; then
|
2012-06-08 22:26:54 +00:00
|
|
|
echo >&2 "Error: No device matching '$1'"
|
2012-05-15 15:44:13 +00:00
|
|
|
echo "undefined"
|
2012-05-19 17:24:48 +00:00
|
|
|
else
|
|
|
|
echo "$result"
|
2012-05-15 15:44:13 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2015-10-12 07:55:30 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Host options
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
HostVar()
|
|
|
|
{
|
|
|
|
case "$1" in
|
|
|
|
set)
|
|
|
|
eq="="
|
|
|
|
;;
|
|
|
|
*)
|
2015-11-18 10:07:34 +00:00
|
|
|
echo >&2 "BUG: wrong command to HostVar: $1"
|
2015-10-12 07:55:30 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "$2" "$eq" "$3" >> "$HOST_VARS_FILE"
|
|
|
|
}
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# operating system detection
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# need that throughout the script
|
|
|
|
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
|
|
|
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
|
|
|
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
|
|
|
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
|
|
|
|
|
|
|
# detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
|
|
|
|
if echo '\c' | grep '\c' >/dev/null; then
|
|
|
|
ECHO_N=-n
|
|
|
|
else
|
|
|
|
ECHO_C='\c'
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# window system detection
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
BUILD_ON_MAC=no
|
|
|
|
if [ -d /System/Library/Frameworks/Carbon.framework ]; then
|
|
|
|
BUILD_ON_MAC=yes
|
|
|
|
fi
|
2013-02-19 21:54:36 +00:00
|
|
|
HOST_DIRLIST_SEP=":"
|
2013-04-07 15:58:42 +00:00
|
|
|
DEV_NULL=/dev/null
|
2013-02-02 12:31:53 +00:00
|
|
|
if [ "$OSTYPE" = "msys" ]; then
|
2013-02-19 21:54:36 +00:00
|
|
|
HOST_DIRLIST_SEP=";"
|
2013-04-07 15:58:42 +00:00
|
|
|
DEV_NULL=/tmp/empty-file
|
|
|
|
echo "" > $DEV_NULL
|
2013-05-11 21:36:51 +00:00
|
|
|
relpath=`(cd "$relpath"; pwd -W)`
|
|
|
|
outpath=`pwd -W`
|
2013-02-02 12:31:53 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-04-08 14:41:27 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Verify Xcode installation on Mac OS
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
|
|
|
if ! /usr/bin/xcode-select --print-path >/dev/null 2>&1; then
|
|
|
|
echo >&2
|
|
|
|
echo " No Xcode is selected. Use xcode-select -switch to choose an Xcode" >&2
|
|
|
|
echo " version. See the xcode-select man page for more information." >&2
|
|
|
|
echo >&2
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! /usr/bin/xcrun -find xcrun >/dev/null 2>&1; then
|
|
|
|
echo >&2
|
|
|
|
echo " Xcode not set up properly. You may need to confirm the license" >&2
|
|
|
|
echo " agreement by running /usr/bin/xcodebuild without arguments." >&2
|
|
|
|
echo >&2
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Qt version detection
|
|
|
|
#-----------------------------------------------------------------------------
|
2015-09-18 01:17:40 +00:00
|
|
|
QT_VERSION=
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_MAJOR_VERSION=
|
|
|
|
QT_MINOR_VERSION=0
|
|
|
|
QT_PATCH_VERSION=0
|
2015-09-18 01:17:40 +00:00
|
|
|
eval `sed -n -e 's/^MODULE_VERSION = \(\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*\)$/QT_VERSION=\1\
|
|
|
|
QT_MAJOR_VERSION=\2\
|
|
|
|
QT_MINOR_VERSION=\3\
|
|
|
|
QT_PATCH_VERSION=\4/p' < "$relpath"/.qmake.conf`
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ -z "$QT_MAJOR_VERSION" ]; then
|
2015-09-18 01:17:40 +00:00
|
|
|
echo "Cannot process version from .qmake.conf"
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "Cannot proceed."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# initalize variables
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2015-04-02 13:59:51 +00:00
|
|
|
SYSTEM_VARIABLES="AR RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
|
2011-04-27 10:05:43 +00:00
|
|
|
for varname in $SYSTEM_VARIABLES; do
|
|
|
|
qmakevarname="${varname}"
|
2015-04-02 13:59:51 +00:00
|
|
|
qmakecmdargs=""
|
2011-04-27 10:05:43 +00:00
|
|
|
# use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
|
|
|
|
if [ "${varname}" = "LDFLAGS" ]; then
|
|
|
|
qmakevarname="LFLAGS"
|
|
|
|
elif [ "${varname}" = "LD" ]; then
|
|
|
|
qmakevarname="LINK"
|
2015-04-02 13:59:51 +00:00
|
|
|
elif [ "${varname}" = "AR" ]; then
|
|
|
|
# QMAKE_AR needs to be set to "/path/to/ar cqs" but the
|
|
|
|
# environment variable will be set to the command only so we
|
|
|
|
# need to append " cqs" for autoconf compatibility
|
|
|
|
qmakecmdargs=" cqs"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
cmd=`echo \
|
|
|
|
'if [ -n "\$'${varname}'" ]; then
|
2015-04-02 13:59:51 +00:00
|
|
|
QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}${qmakecmdargs}'"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi'`
|
|
|
|
eval "$cmd"
|
|
|
|
done
|
2015-04-02 13:59:51 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# Use CC/CXX to run config.tests
|
|
|
|
mkdir -p "$outpath/config.tests"
|
|
|
|
rm -f "$outpath/config.tests/.qmake.cache"
|
|
|
|
cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
|
|
|
|
|
2012-10-18 13:22:15 +00:00
|
|
|
QMakeVar add styles "mac fusion windows"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# QTDIR may be set and point to an old or system-wide Qt installation
|
|
|
|
unset QTDIR
|
|
|
|
|
|
|
|
# the minimum version of libdbus-1 that we require:
|
2013-02-25 18:27:19 +00:00
|
|
|
MIN_DBUS_1_VERSION=1.2
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# initalize internal variables
|
|
|
|
CFG_CONFIGURE_EXIT_ON_ERROR=yes
|
|
|
|
CFG_PROFILE=no
|
2012-09-14 14:04:59 +00:00
|
|
|
CFG_STRIP=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_GUI=auto # (yes|no|auto)
|
2012-03-07 00:11:44 +00:00
|
|
|
CFG_WIDGETS=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_DEBUG=auto
|
|
|
|
CFG_MYSQL_CONFIG=
|
2015-02-19 21:41:02 +00:00
|
|
|
CFG_PSQL_CONFIG=
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_DEBUG_RELEASE=no
|
2012-08-07 20:22:38 +00:00
|
|
|
CFG_FORCEDEBUGINFO=no
|
2015-10-26 11:38:50 +00:00
|
|
|
CFG_RELEASE_TOOLS=no
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_SHARED=yes
|
|
|
|
CFG_SM=auto
|
2016-02-19 14:18:47 +00:00
|
|
|
CFG_SYSTEM_ZLIB=auto
|
2013-12-20 15:14:31 +00:00
|
|
|
CFG_MTDEV=auto
|
2014-01-01 16:36:24 +00:00
|
|
|
CFG_JOURNALD=no
|
2015-07-04 14:13:31 +00:00
|
|
|
CFG_SYSLOG=no
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_SQLITE=qt
|
2016-04-06 08:15:14 +00:00
|
|
|
CFG_GIF=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_PNG=yes
|
|
|
|
CFG_LIBPNG=auto
|
2016-04-06 08:15:14 +00:00
|
|
|
CFG_JPEG=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_LIBJPEG=auto
|
|
|
|
CFG_XRENDER=auto
|
|
|
|
CFG_OPENGL=auto
|
2012-03-07 14:07:07 +00:00
|
|
|
CFG_EGL=auto
|
2014-02-06 11:10:11 +00:00
|
|
|
CFG_EGL_X=auto
|
2015-10-15 13:40:26 +00:00
|
|
|
CFG_DOUBLECONVERSION=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_FONTCONFIG=auto
|
2013-09-08 03:20:43 +00:00
|
|
|
CFG_FREETYPE=auto
|
2015-11-05 01:33:11 +00:00
|
|
|
CFG_HARFBUZZ=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_SQL_AVAILABLE=
|
2013-06-17 09:21:40 +00:00
|
|
|
QT_ALL_BUILD_PARTS=" libs tools examples tests "
|
2012-07-09 22:58:19 +00:00
|
|
|
QT_DEFAULT_BUILD_PARTS="libs tools examples"
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_BUILD_PARTS=""
|
|
|
|
CFG_NOBUILD_PARTS=""
|
2013-02-18 16:37:21 +00:00
|
|
|
CFG_SKIP_MODULES=""
|
2013-07-17 12:34:10 +00:00
|
|
|
CFG_COMPILE_EXAMPLES=yes
|
2012-03-30 11:43:10 +00:00
|
|
|
CFG_QML_DEBUG=yes
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
CFG_PKGCONFIG=auto
|
2012-09-20 12:11:25 +00:00
|
|
|
CFG_STACK_PROTECTOR_STRONG=auto
|
2012-09-18 18:15:18 +00:00
|
|
|
CFG_SLOG2=auto
|
2013-11-21 11:58:22 +00:00
|
|
|
CFG_PPS=auto
|
2013-11-26 21:30:27 +00:00
|
|
|
CFG_QNX_IMF=auto
|
2014-01-29 12:43:03 +00:00
|
|
|
CFG_LGMON=auto
|
2016-05-13 09:05:09 +00:00
|
|
|
CFG_SYSTEM_PROXIES=yes
|
2014-09-30 08:34:00 +00:00
|
|
|
CFG_ANDROID_STYLE_ASSETS=yes
|
2015-02-13 15:41:58 +00:00
|
|
|
CFG_GSTREAMER=auto
|
|
|
|
CFG_GSTREAMER_VERSION=""
|
2016-03-15 08:46:32 +00:00
|
|
|
CFG_STD_ATOMIC64=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-02-14 09:01:17 +00:00
|
|
|
# Target architecture
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_ARCH=
|
2011-12-31 22:40:49 +00:00
|
|
|
CFG_CPUFEATURES=
|
2012-02-14 09:01:17 +00:00
|
|
|
# Host architecture, same as CFG_ARCH when not cross-compiling
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_HOST_ARCH=
|
2011-12-31 22:40:49 +00:00
|
|
|
CFG_HOST_CPUFEATURES=
|
2012-02-14 09:01:17 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_USE_GNUMAKE=no
|
2011-10-14 13:55:35 +00:00
|
|
|
CFG_XINPUT2=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_XKB=auto
|
2014-07-01 01:37:55 +00:00
|
|
|
CFG_XKBCOMMON=yes
|
2014-12-09 10:45:29 +00:00
|
|
|
CFG_XKBCOMMON_EVDEV=auto
|
2014-03-04 15:26:07 +00:00
|
|
|
CFG_XKB_CONFIG_ROOT=auto
|
2011-06-10 14:05:03 +00:00
|
|
|
CFG_XCB=auto
|
2013-11-28 11:07:09 +00:00
|
|
|
CFG_XCB_XLIB=auto
|
2012-10-01 08:17:21 +00:00
|
|
|
CFG_XCB_GLX=no
|
2012-03-07 14:07:07 +00:00
|
|
|
CFG_EGLFS=auto
|
2015-03-13 23:38:02 +00:00
|
|
|
CFG_EGLFS_BRCM=no
|
2015-10-13 14:07:19 +00:00
|
|
|
CFG_EGLFS_EGLDEVICE=no
|
2015-03-13 23:38:02 +00:00
|
|
|
CFG_EGLFS_MALI=no
|
|
|
|
CFG_EGLFS_VIV=no
|
2015-10-29 13:11:29 +00:00
|
|
|
CFG_EGLFS_VIV_WL=no
|
2016-03-16 17:14:40 +00:00
|
|
|
CFG_DIRECTFB=no
|
2015-10-13 14:09:51 +00:00
|
|
|
CFG_GBM=auto
|
2012-07-02 21:30:41 +00:00
|
|
|
CFG_LINUXFB=auto
|
2015-10-29 14:59:48 +00:00
|
|
|
CFG_INTEGRITYFB=no
|
2012-07-16 13:13:18 +00:00
|
|
|
CFG_KMS=auto
|
2015-08-07 12:28:14 +00:00
|
|
|
CFG_MIRCLIENT=auto
|
2012-02-05 11:32:40 +00:00
|
|
|
CFG_LIBUDEV=auto
|
2014-12-09 10:45:29 +00:00
|
|
|
CFG_LIBINPUT=auto
|
2012-02-05 11:32:40 +00:00
|
|
|
CFG_EVDEV=auto
|
2014-10-13 13:47:26 +00:00
|
|
|
CFG_TSLIB=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_CUPS=auto
|
|
|
|
CFG_ICONV=auto
|
2015-02-20 14:45:28 +00:00
|
|
|
CFG_DBUS=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_GLIB=auto
|
2015-07-30 18:32:43 +00:00
|
|
|
CFG_GTK=auto
|
2016-03-18 21:18:10 +00:00
|
|
|
CFG_LARGEFILE=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_OPENSSL=auto
|
2016-05-27 08:14:29 +00:00
|
|
|
CFG_LIBPROXY=no
|
2014-08-22 15:20:49 +00:00
|
|
|
CFG_SECURETRANSPORT=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_PRECOMPILE=auto
|
2015-10-29 13:59:59 +00:00
|
|
|
CFG_LTCG=no
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_SEPARATE_DEBUG_INFO=no
|
|
|
|
CFG_REDUCE_EXPORTS=auto
|
|
|
|
CFG_SSE2=auto
|
|
|
|
CFG_SSE3=auto
|
|
|
|
CFG_SSSE3=auto
|
|
|
|
CFG_SSE4_1=auto
|
|
|
|
CFG_SSE4_2=auto
|
|
|
|
CFG_AVX=auto
|
2011-12-30 00:44:16 +00:00
|
|
|
CFG_AVX2=auto
|
2015-07-17 21:46:05 +00:00
|
|
|
CFG_AVX512=auto
|
2011-12-07 08:20:16 +00:00
|
|
|
CFG_REDUCE_RELOCATIONS=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_ACCESSIBILITY=auto
|
2013-01-18 15:36:42 +00:00
|
|
|
CFG_ACCESSIBILITY_ATSPI_BRIDGE=no # will be enabled depending on dbus and accessibility being enabled
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_NEON=auto
|
2012-07-20 13:03:56 +00:00
|
|
|
CFG_MIPS_DSP=auto
|
|
|
|
CFG_MIPS_DSPR2=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_CLOCK_GETTIME=auto
|
|
|
|
CFG_CLOCK_MONOTONIC=auto
|
2013-11-11 15:04:46 +00:00
|
|
|
CFG_POSIX_FALLOCATE=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_MREMAP=auto
|
|
|
|
CFG_GETADDRINFO=auto
|
|
|
|
CFG_IPV6IFNAME=auto
|
|
|
|
CFG_GETIFADDRS=auto
|
|
|
|
CFG_INOTIFY=auto
|
2012-10-25 19:38:13 +00:00
|
|
|
CFG_EVENTFD=auto
|
2015-07-11 05:09:15 +00:00
|
|
|
CFG_CLOEXEC=no
|
2015-10-15 13:04:17 +00:00
|
|
|
CFG_POLL=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_RPATH=yes
|
|
|
|
CFG_FRAMEWORK=auto
|
2014-07-01 09:46:50 +00:00
|
|
|
CFG_USE_GOLD_LINKER=auto
|
2015-04-22 11:09:36 +00:00
|
|
|
CFG_ENABLE_NEW_DTAGS=auto
|
2012-05-30 23:44:53 +00:00
|
|
|
DEFINES=
|
2013-12-16 13:28:07 +00:00
|
|
|
INCLUDES=
|
2011-04-27 10:05:43 +00:00
|
|
|
D_FLAGS=
|
|
|
|
I_FLAGS=
|
|
|
|
L_FLAGS=
|
|
|
|
RPATH_FLAGS=
|
2011-10-24 11:00:49 +00:00
|
|
|
W_FLAGS=
|
2011-04-27 10:05:43 +00:00
|
|
|
QCONFIG_FLAGS=
|
2011-11-07 09:16:21 +00:00
|
|
|
XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
|
2016-02-16 14:29:59 +00:00
|
|
|
XPLATFORM_MAC=no # Whether target platform is OS X, iOS or tvOS
|
2014-09-30 14:39:12 +00:00
|
|
|
XPLATFORM_IOS=no # Whether target platform is iOS
|
2016-02-16 14:29:59 +00:00
|
|
|
XPLATFORM_TVOS=no # Whether target platform is tvOS
|
2013-03-04 09:16:42 +00:00
|
|
|
XPLATFORM_ANDROID=no
|
2011-04-27 10:05:43 +00:00
|
|
|
XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
|
2012-06-07 08:34:33 +00:00
|
|
|
XPLATFORM_QNX=no
|
2014-12-16 08:15:26 +00:00
|
|
|
XPLATFORM_HAIKU=no
|
2015-10-27 00:54:21 +00:00
|
|
|
XPLATFORM_INTEGRITY=no
|
2011-04-27 10:05:43 +00:00
|
|
|
PLATFORM=$QMAKESPEC
|
|
|
|
QT_CROSS_COMPILE=no
|
|
|
|
OPT_CONFIRM_LICENSE=no
|
|
|
|
OPT_SHADOW=maybe
|
|
|
|
OPT_VERBOSE=no
|
|
|
|
OPT_HELP=
|
|
|
|
CFG_SILENT=no
|
|
|
|
CFG_ALSA=auto
|
|
|
|
CFG_PULSEAUDIO=auto
|
|
|
|
CFG_COREWLAN=auto
|
|
|
|
CFG_ICU=auto
|
2011-11-11 10:21:52 +00:00
|
|
|
CFG_FORCE_ASSERTS=no
|
2014-09-30 07:50:22 +00:00
|
|
|
CFG_SANITIZERS=none
|
|
|
|
CFG_SANITIZE_ADDRESS=no
|
|
|
|
CFG_SANITIZE_THREAD=no
|
|
|
|
CFG_SANITIZE_MEMORY=no
|
|
|
|
CFG_SANITIZE_UNDEFINED=no
|
2012-01-23 22:31:13 +00:00
|
|
|
CFG_PCRE=auto
|
2015-07-09 00:21:30 +00:00
|
|
|
CFG_STDCXX=auto
|
2012-12-10 20:34:48 +00:00
|
|
|
CFG_DIRECTWRITE=no
|
Add color font support on Windows
Detect if DirectWrite 2 is available, and support color fonts if possible.
One limitation worth mentioning is that if the color font contains regular,
monochrome glyphs as well, then these will be drawn in black, and not in the
pen color. Fixing this would require some elaborate rewrites in the font
rendering system, since we would have to have two font caches per
color font (one for mono and one for colors), or do some sort of trick where
we make argb(r, g, b, 0) mean subpixel alpha instead, and detect glyphs that
are not correctly premultiplied when blitting to the screen.
Another limitation is that the approach does not work with distance field
rendering. In principle we could support this on Windows, since the
format is vector based, but it would also require substantial work and
it is not possible to support for Apple/Google fonts anyway, so it would
just lead to code which is not cross-platform.
[ChangeLog][Windows] Added support for color fonts (color emojis) when
DirectWrite 2 is available.
Change-Id: I6a608dd5d2aa3a7e762a06830902bddac7c550a5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-16 14:52:28 +00:00
|
|
|
CFG_DIRECTWRITE2=auto
|
2012-12-22 02:31:54 +00:00
|
|
|
CFG_WERROR=auto
|
2012-12-22 21:12:02 +00:00
|
|
|
CFG_HEADERSCLEAN=auto
|
2013-10-01 10:34:20 +00:00
|
|
|
CFG_QREAL=double
|
2013-10-15 14:19:26 +00:00
|
|
|
OPT_MAC_SDK=
|
2013-11-12 20:29:38 +00:00
|
|
|
COMMERCIAL_USER=ask
|
|
|
|
CFG_DEV=no
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# initalize variables used for installation
|
|
|
|
QT_INSTALL_PREFIX=
|
|
|
|
QT_INSTALL_DOCS=
|
|
|
|
QT_INSTALL_HEADERS=
|
|
|
|
QT_INSTALL_LIBS=
|
|
|
|
QT_INSTALL_BINS=
|
2012-10-25 21:32:09 +00:00
|
|
|
QT_INSTALL_LIBEXECS=
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_INSTALL_PLUGINS=
|
|
|
|
QT_INSTALL_IMPORTS=
|
2012-10-15 20:23:13 +00:00
|
|
|
QT_INSTALL_QML=
|
2012-09-24 12:30:45 +00:00
|
|
|
QT_INSTALL_ARCHDATA=
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_INSTALL_DATA=
|
|
|
|
QT_INSTALL_TRANSLATIONS=
|
|
|
|
QT_INSTALL_SETTINGS=
|
|
|
|
QT_INSTALL_EXAMPLES=
|
2011-11-17 05:39:19 +00:00
|
|
|
QT_INSTALL_TESTS=
|
2012-02-28 19:57:38 +00:00
|
|
|
CFG_SYSROOT=
|
2012-07-12 11:03:16 +00:00
|
|
|
CFG_GCC_SYSROOT="yes"
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_HOST_PREFIX=
|
2012-02-28 19:57:38 +00:00
|
|
|
QT_HOST_BINS=
|
2013-05-08 13:30:56 +00:00
|
|
|
QT_HOST_LIBS=
|
2012-02-28 19:57:38 +00:00
|
|
|
QT_HOST_DATA=
|
2013-08-09 11:34:04 +00:00
|
|
|
QT_EXT_PREFIX=
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#flags for SQL drivers
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_PSQL=
|
|
|
|
QMAKE_LIBS_PSQL=
|
|
|
|
QMAKE_CFLAGS_MYSQL=
|
|
|
|
QMAKE_LIBS_MYSQL=
|
|
|
|
QMAKE_LIBS_MYSQL_R=
|
|
|
|
QMAKE_CFLAGS_SQLITE=
|
|
|
|
QMAKE_LIBS_SQLITE=
|
|
|
|
QMAKE_LIBS_ODBC="-lodbc"
|
|
|
|
QMAKE_LIBS_TDS=
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# flags for libdbus-1
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_DBUS=
|
|
|
|
QMAKE_LIBS_DBUS=
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# flags for Glib (X11 only)
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_GLIB=
|
|
|
|
QMAKE_LIBS_GLIB=
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-04-18 22:57:00 +00:00
|
|
|
# default qpa platform
|
|
|
|
QT_QPA_DEFAULT_PLATFORM=
|
|
|
|
|
2013-11-12 17:34:28 +00:00
|
|
|
# Android vars
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT
|
|
|
|
CFG_DEFAULT_ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT
|
2016-05-27 13:34:11 +00:00
|
|
|
CFG_DEFAULT_ANDROID_PLATFORM=android-16
|
2013-11-12 17:34:28 +00:00
|
|
|
CFG_DEFAULT_ANDROID_TARGET_ARCH=armeabi-v7a
|
2014-10-30 12:03:00 +00:00
|
|
|
CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION=4.9
|
2013-11-12 17:34:28 +00:00
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=$ANDROID_NDK_HOST
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2012-03-09 09:17:16 +00:00
|
|
|
# check SQL drivers available in this package
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
CFG_SQL_AVAILABLE=
|
|
|
|
if [ -d "$relpath/src/plugins/sqldrivers" ]; then
|
|
|
|
for a in "$relpath/src/plugins/sqldrivers/"*; do
|
|
|
|
if [ -d "$a" ]; then
|
|
|
|
base_a=`basename "$a"`
|
|
|
|
CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
|
|
|
|
eval "CFG_SQL_${base_a}=auto"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# parse command line arguments
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# parse the arguments, setting things to "yes" or "no"
|
|
|
|
while [ "$#" -gt 0 ]; do
|
|
|
|
CURRENT_OPT="$1"
|
|
|
|
UNKNOWN_ARG=no
|
|
|
|
case "$1" in
|
|
|
|
#Autoconf style options
|
|
|
|
--enable-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^--enable-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
VAL=yes
|
|
|
|
;;
|
|
|
|
--disable-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^--disable-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
VAL=no
|
|
|
|
;;
|
|
|
|
--*=*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^--\(.*\)=.*,\1,'`
|
|
|
|
VAL=`echo $1 | sed 's,^--.*=\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
--no-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^--no-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
VAL=no
|
|
|
|
;;
|
|
|
|
--*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^--\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
VAL=yes
|
|
|
|
;;
|
|
|
|
#Qt plugin options
|
|
|
|
-no-*-*|-plugin-*-*|-qt-*-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'`
|
|
|
|
VAL=`echo $1 | sed 's,^-\([^-]*\).*,\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
#Qt style no options
|
|
|
|
-no-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-no-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
VAL=no
|
|
|
|
;;
|
|
|
|
#Qt style options that pass an argument
|
2013-06-14 13:55:06 +00:00
|
|
|
-prefix| \
|
|
|
|
-docdir| \
|
|
|
|
-headerdir| \
|
|
|
|
-plugindir| \
|
|
|
|
-importdir| \
|
|
|
|
-qmldir| \
|
|
|
|
-archdatadir| \
|
|
|
|
-datadir| \
|
|
|
|
-libdir| \
|
|
|
|
-bindir| \
|
|
|
|
-libexecdir| \
|
|
|
|
-translationdir| \
|
|
|
|
-sysconfdir| \
|
|
|
|
-examplesdir| \
|
|
|
|
-testsdir| \
|
|
|
|
-hostdatadir| \
|
|
|
|
-hostbindir| \
|
|
|
|
-hostlibdir| \
|
2013-08-09 11:34:04 +00:00
|
|
|
-extprefix| \
|
2013-06-14 13:55:06 +00:00
|
|
|
-sysroot| \
|
2015-10-12 07:55:30 +00:00
|
|
|
-external-hostbindir| \
|
2013-06-14 13:55:06 +00:00
|
|
|
-make| \
|
|
|
|
-nomake| \
|
|
|
|
-skip| \
|
|
|
|
-platform| \
|
|
|
|
-xplatform| \
|
|
|
|
-device| \
|
|
|
|
-device-option| \
|
2015-10-12 07:55:30 +00:00
|
|
|
-host-option| \
|
2013-06-14 13:55:06 +00:00
|
|
|
-sdk| \
|
2015-07-09 00:21:30 +00:00
|
|
|
-c++std | \
|
2013-06-14 13:55:06 +00:00
|
|
|
-mysql_config| \
|
2015-02-19 21:41:02 +00:00
|
|
|
-psql_config| \
|
2013-06-14 13:55:06 +00:00
|
|
|
-qpa| \
|
2013-10-01 10:34:20 +00:00
|
|
|
-qreal| \
|
2014-09-30 07:50:22 +00:00
|
|
|
-sanitize| \
|
2014-03-04 15:26:07 +00:00
|
|
|
-xkb-config-root| \
|
2013-06-14 13:55:06 +00:00
|
|
|
-android-sdk| \
|
|
|
|
-android-ndk| \
|
|
|
|
-android-ndk-platform| \
|
|
|
|
-android-ndk-host| \
|
|
|
|
-android-arch| \
|
|
|
|
-android-toolchain-version)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
shift
|
|
|
|
VAL="$1"
|
|
|
|
;;
|
|
|
|
#Qt style complex options in one command
|
|
|
|
-enable-*|-disable-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-\([^-]*\)-.*,\1,'`
|
|
|
|
VAL=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2012-10-23 13:31:20 +00:00
|
|
|
-system-proxies)
|
|
|
|
VAR=system-proxies
|
|
|
|
VAL=yes
|
|
|
|
;;
|
|
|
|
-no-system-proxies)
|
|
|
|
VAR=system-proxies
|
|
|
|
VAL=no
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
#Qt Builtin/System style options
|
|
|
|
-no-*|-system-*|-qt-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'`
|
|
|
|
VAL=`echo $1 | sed 's,^-\([^-]*\)-.*,\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
#Options that cannot be generalized
|
|
|
|
-k|-continue)
|
|
|
|
VAR=fatal_error
|
|
|
|
VAL=no
|
|
|
|
;;
|
|
|
|
-opengl)
|
|
|
|
VAR=opengl
|
|
|
|
# this option may or may not be followed by an argument
|
|
|
|
if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
|
|
|
|
VAL=yes
|
|
|
|
else
|
|
|
|
shift;
|
|
|
|
VAL=$1
|
|
|
|
fi
|
|
|
|
;;
|
2015-02-13 15:41:58 +00:00
|
|
|
-gstreamer)
|
|
|
|
VAR=gstreamer
|
|
|
|
# this option may or may not be followed by an argument
|
|
|
|
if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
|
|
|
|
VAL=yes
|
|
|
|
else
|
|
|
|
shift;
|
|
|
|
VAL=$1
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
-hostprefix)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-\(.*\),\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
# this option may or may not be followed by an argument
|
|
|
|
if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
|
|
|
|
VAL=$outpath
|
|
|
|
else
|
|
|
|
shift;
|
|
|
|
VAL=$1
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
-qtnamespace)
|
|
|
|
VAR="qtnamespace"
|
|
|
|
shift
|
|
|
|
VAL="$1"
|
|
|
|
;;
|
|
|
|
-qtlibinfix)
|
|
|
|
VAR="qtlibinfix"
|
|
|
|
shift
|
|
|
|
VAL="$1"
|
|
|
|
;;
|
|
|
|
-D?*|-D)
|
|
|
|
VAR="add_define"
|
|
|
|
if [ "$1" = "-D" ]; then
|
|
|
|
shift
|
|
|
|
VAL="$1"
|
|
|
|
else
|
|
|
|
VAL=`echo $1 | sed 's,-D,,'`
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
-I?*|-I)
|
|
|
|
VAR="add_ipath"
|
|
|
|
if [ "$1" = "-I" ]; then
|
|
|
|
shift
|
|
|
|
VAL="$1"
|
|
|
|
else
|
|
|
|
VAL=`echo $1 | sed 's,-I,,'`
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
-L?*|-L)
|
|
|
|
VAR="add_lpath"
|
|
|
|
if [ "$1" = "-L" ]; then
|
|
|
|
shift
|
|
|
|
VAL="$1"
|
|
|
|
else
|
|
|
|
VAL=`echo $1 | sed 's,-L,,'`
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
-R?*|-R)
|
|
|
|
VAR="add_rpath"
|
|
|
|
if [ "$1" = "-R" ]; then
|
|
|
|
shift
|
|
|
|
VAL="$1"
|
|
|
|
else
|
|
|
|
VAL=`echo $1 | sed 's,-R,,'`
|
|
|
|
fi
|
|
|
|
;;
|
2013-02-12 11:25:47 +00:00
|
|
|
-l) # -lfoo is handled differently
|
2011-04-27 10:05:43 +00:00
|
|
|
VAR="add_link"
|
2013-02-12 11:25:47 +00:00
|
|
|
shift
|
|
|
|
VAL="$1"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
-F?*|-F)
|
|
|
|
VAR="add_fpath"
|
|
|
|
if [ "$1" = "-F" ]; then
|
|
|
|
shift
|
|
|
|
VAL="$1"
|
|
|
|
else
|
|
|
|
VAL=`echo $1 | sed 's,-F,,'`
|
|
|
|
fi
|
|
|
|
;;
|
2013-02-12 11:25:47 +00:00
|
|
|
-fw) # -fwfoo is handled differently
|
2011-04-27 10:05:43 +00:00
|
|
|
VAR="add_framework"
|
2013-02-12 11:25:47 +00:00
|
|
|
shift
|
|
|
|
VAL="$1"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2011-10-24 11:00:49 +00:00
|
|
|
-W*)
|
|
|
|
VAR="add_warn"
|
|
|
|
VAL="$1"
|
|
|
|
;;
|
2012-04-02 17:14:19 +00:00
|
|
|
#General options, including Qt style yes options
|
2011-04-27 10:05:43 +00:00
|
|
|
-*)
|
2013-12-05 18:44:09 +00:00
|
|
|
VAR=`echo $1 | sed 's,^-\(.*\),\1,'`
|
2012-04-02 17:14:19 +00:00
|
|
|
VAL="yes"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
UNKNOWN_ARG=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if [ "$UNKNOWN_ARG" = "yes" ]; then
|
|
|
|
echo "$1: unknown argument"
|
|
|
|
ERROR=yes
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
shift
|
|
|
|
|
|
|
|
UNKNOWN_OPT=no
|
|
|
|
case "$VAR" in
|
|
|
|
accessibility)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_ACCESSIBILITY="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
gnumake)
|
|
|
|
CFG_USE_GNUMAKE="$VAL"
|
|
|
|
;;
|
|
|
|
mysql_config)
|
|
|
|
CFG_MYSQL_CONFIG="$VAL"
|
|
|
|
;;
|
2015-02-19 21:41:02 +00:00
|
|
|
psql_config)
|
|
|
|
CFG_PSQL_CONFIG="$VAL"
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
prefix)
|
|
|
|
QT_INSTALL_PREFIX="$VAL"
|
|
|
|
;;
|
|
|
|
hostprefix)
|
|
|
|
QT_HOST_PREFIX="$VAL"
|
|
|
|
;;
|
2012-02-28 19:57:38 +00:00
|
|
|
hostdatadir)
|
|
|
|
QT_HOST_DATA="$VAL"
|
|
|
|
;;
|
|
|
|
hostbindir)
|
|
|
|
QT_HOST_BINS="$VAL"
|
|
|
|
;;
|
2013-05-08 13:30:56 +00:00
|
|
|
hostlibdir)
|
|
|
|
QT_HOST_LIBS="$VAL"
|
|
|
|
;;
|
2013-08-09 11:34:04 +00:00
|
|
|
extprefix)
|
|
|
|
QT_EXT_PREFIX="$VAL"
|
|
|
|
;;
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
pkg-config)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_PKGCONFIG="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
force-pkg-config)
|
2014-11-20 07:02:14 +00:00
|
|
|
CFG_PKGCONFIG="yes"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
docdir)
|
|
|
|
QT_INSTALL_DOCS="$VAL"
|
|
|
|
;;
|
|
|
|
headerdir)
|
|
|
|
QT_INSTALL_HEADERS="$VAL"
|
|
|
|
;;
|
|
|
|
plugindir)
|
|
|
|
QT_INSTALL_PLUGINS="$VAL"
|
|
|
|
;;
|
|
|
|
importdir)
|
|
|
|
QT_INSTALL_IMPORTS="$VAL"
|
|
|
|
;;
|
2012-10-15 20:23:13 +00:00
|
|
|
qmldir)
|
|
|
|
QT_INSTALL_QML="$VAL"
|
|
|
|
;;
|
2012-09-24 12:30:45 +00:00
|
|
|
archdatadir)
|
|
|
|
QT_INSTALL_ARCHDATA="$VAL"
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
datadir)
|
|
|
|
QT_INSTALL_DATA="$VAL"
|
|
|
|
;;
|
|
|
|
libdir)
|
|
|
|
QT_INSTALL_LIBS="$VAL"
|
|
|
|
;;
|
|
|
|
qtnamespace)
|
|
|
|
QT_NAMESPACE="$VAL"
|
|
|
|
;;
|
|
|
|
qtlibinfix)
|
|
|
|
QT_LIBINFIX="$VAL"
|
|
|
|
;;
|
|
|
|
translationdir)
|
|
|
|
QT_INSTALL_TRANSLATIONS="$VAL"
|
|
|
|
;;
|
|
|
|
sysconfdir|settingsdir)
|
|
|
|
QT_INSTALL_SETTINGS="$VAL"
|
|
|
|
;;
|
|
|
|
examplesdir)
|
|
|
|
QT_INSTALL_EXAMPLES="$VAL"
|
|
|
|
;;
|
2011-11-17 05:39:19 +00:00
|
|
|
testsdir)
|
|
|
|
QT_INSTALL_TESTS="$VAL"
|
|
|
|
;;
|
2013-10-01 10:34:20 +00:00
|
|
|
qreal)
|
|
|
|
CFG_QREAL="$VAL"
|
2014-06-13 22:12:28 +00:00
|
|
|
if [ "$CFG_QREAL" = "float" ]; then
|
|
|
|
CFG_QREAL_STRING="\"float\""
|
|
|
|
elif [ "$CFG_QREAL" != "double" ]; then
|
|
|
|
if [ -z "$PERL" ]; then
|
|
|
|
echo "configure needs perl in \$PATH if the -qreal option is used with" >&2
|
|
|
|
echo "a value different from \"float\"" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CFG_QREAL_STRING=`perl -e '$_ = $ARGV[0];
|
|
|
|
s/ +/ /g; s/^ +//; s/ +$//;
|
|
|
|
while (/(.)/g) {
|
|
|
|
$c = $1;
|
|
|
|
if ($c =~ /[a-zA-Z0-9]/) { $result .= $c; }
|
|
|
|
else { $result .= "_" . unpack("H*", $c); }
|
|
|
|
}
|
|
|
|
print "\"$result\"";' "$CFG_QREAL"`
|
|
|
|
fi
|
2013-10-01 10:34:20 +00:00
|
|
|
;;
|
2014-09-30 07:50:22 +00:00
|
|
|
sanitize)
|
|
|
|
if [ "$VAL" = "address" ]; then
|
|
|
|
CFG_SANITIZE_ADDRESS=yes
|
|
|
|
elif [ "$VAL" = "thread" ]; then
|
|
|
|
CFG_SANITIZE_THREAD=yes
|
|
|
|
elif [ "$VAL" = "memory" ]; then
|
|
|
|
CFG_SANITIZE_MEMORY=yes
|
|
|
|
elif [ "$VAL" = "undefined" ]; then
|
|
|
|
CFG_SANITIZE_UNDEFINED=yes
|
|
|
|
else
|
|
|
|
echo "Unknown sanitizer: '$VAL'"
|
|
|
|
ERROR=true
|
|
|
|
fi
|
|
|
|
if [ "$CFG_SANITIZERS" = "none" ]; then
|
|
|
|
CFG_SANITIZERS=$VAL
|
|
|
|
else
|
|
|
|
CFG_SANITIZERS="$CFG_SANITIZERS $VAL"
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
sysroot)
|
|
|
|
CFG_SYSROOT="$VAL"
|
|
|
|
;;
|
2012-07-12 11:03:16 +00:00
|
|
|
gcc-sysroot)
|
|
|
|
CFG_GCC_SYSROOT="$VAL"
|
|
|
|
;;
|
2015-10-12 07:55:30 +00:00
|
|
|
external-hostbindir)
|
|
|
|
CFG_HOST_QT_TOOLS_PATH="$VAL"
|
|
|
|
HostVar set HOST_QT_TOOLS "$VAL"
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
bindir)
|
|
|
|
QT_INSTALL_BINS="$VAL"
|
|
|
|
;;
|
2012-10-25 21:32:09 +00:00
|
|
|
libexecdir)
|
|
|
|
QT_INSTALL_LIBEXECS="$VAL"
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
opengl)
|
|
|
|
if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
|
|
|
|
[ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
|
2011-08-16 10:53:04 +00:00
|
|
|
[ "$VAL" = "es2" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_OPENGL="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
nomake)
|
2013-06-17 09:21:40 +00:00
|
|
|
if [ -n "${QT_ALL_BUILD_PARTS%%* $VAL *}" ]; then
|
|
|
|
echo "Unknown part $VAL passed to -nomake." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
|
|
|
|
;;
|
|
|
|
make)
|
2013-06-17 09:49:53 +00:00
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
else
|
|
|
|
if [ -n "${QT_ALL_BUILD_PARTS%%* $VAL *}" ]; then
|
|
|
|
echo "Unknown part $VAL passed to -make." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
|
2013-06-17 09:21:40 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2013-02-18 16:37:21 +00:00
|
|
|
skip)
|
|
|
|
VAL=qt${VAL#qt}
|
|
|
|
if ! [ -d $relpath/../$VAL ]; then
|
|
|
|
echo "Attempting to skip non-existent module $VAL." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CFG_SKIP_MODULES="$CFG_SKIP_MODULES $VAL"
|
|
|
|
;;
|
2013-05-07 15:10:22 +00:00
|
|
|
compile-examples)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_COMPILE_EXAMPLES="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
sdk)
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2013-03-06 12:52:46 +00:00
|
|
|
DeviceVar set !host_build:QMAKE_MAC_SDK "$VAL"
|
2013-10-15 14:19:26 +00:00
|
|
|
OPT_MAC_SDK="$VAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-18 15:08:30 +00:00
|
|
|
harfbuzz)
|
2013-08-26 15:44:36 +00:00
|
|
|
[ "$VAL" = "yes" ] && VAL=qt
|
|
|
|
if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
|
|
|
|
CFG_HARFBUZZ="$VAL"
|
2011-04-18 15:08:30 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
framework)
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_FRAMEWORK="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
profile)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
CFG_PROFILE=yes
|
|
|
|
QMakeVar add QMAKE_CFLAGS -pg
|
|
|
|
QMakeVar add QMAKE_CXXFLAGS -pg
|
|
|
|
QMakeVar add QMAKE_LFLAGS -pg
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-09-14 14:04:59 +00:00
|
|
|
strip)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_STRIP=$VAL
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-06-23 08:48:33 +00:00
|
|
|
testcocoon)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
|
|
|
|
fi
|
|
|
|
;;
|
2013-08-02 22:05:05 +00:00
|
|
|
gcov)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG gcov"
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
platform)
|
|
|
|
PLATFORM="$VAL"
|
|
|
|
;;
|
|
|
|
xplatform)
|
|
|
|
XPLATFORM="$VAL"
|
2012-08-18 14:12:49 +00:00
|
|
|
case `basename "$XPLATFORM"` in win32-g++*)
|
|
|
|
XPLATFORM_MINGW=yes
|
|
|
|
CFG_RPATH=no
|
|
|
|
CFG_REDUCE_EXPORTS=no
|
2014-04-10 10:34:42 +00:00
|
|
|
CFG_ICU=no
|
2012-08-18 14:12:49 +00:00
|
|
|
;;
|
|
|
|
esac
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2012-03-20 21:02:21 +00:00
|
|
|
device)
|
2012-05-15 15:44:13 +00:00
|
|
|
XPLATFORM=`resolveDeviceMkspec $VAL`
|
|
|
|
[ "$XPLATFORM" = "undefined" ] && exit 101
|
2012-03-20 21:02:21 +00:00
|
|
|
;;
|
|
|
|
device-option)
|
2013-09-20 21:14:39 +00:00
|
|
|
DEV_VAR=`echo $VAL | cut -d '=' -f 1`
|
|
|
|
DEV_VAL=`echo $VAL | cut -d '=' -f 2-`
|
2013-03-08 10:53:10 +00:00
|
|
|
DeviceVar set $DEV_VAR "$DEV_VAL"
|
2012-03-20 21:02:21 +00:00
|
|
|
;;
|
2015-10-12 07:55:30 +00:00
|
|
|
host-option)
|
|
|
|
HOST_VAR=`echo $VAL | cut -d '=' -f 1`
|
|
|
|
HOST_VAL=`echo $VAL | cut -d '=' -f 2-`
|
|
|
|
HostVar set $HOST_VAR "$HOST_VAL"
|
|
|
|
;;
|
2012-04-18 22:57:00 +00:00
|
|
|
qpa)
|
|
|
|
QT_QPA_DEFAULT_PLATFORM="$VAL"
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
debug-and-release)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_DEBUG_RELEASE="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
release)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
CFG_DEBUG=no
|
|
|
|
elif [ "$VAL" = "no" ]; then
|
|
|
|
CFG_DEBUG=yes
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
debug)
|
|
|
|
CFG_DEBUG="$VAL"
|
|
|
|
;;
|
2012-08-07 20:22:38 +00:00
|
|
|
force-debug-info)
|
|
|
|
CFG_FORCEDEBUGINFO="$VAL"
|
|
|
|
;;
|
2015-10-26 11:38:50 +00:00
|
|
|
optimized-qmake|optimized-tools)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_RELEASE_TOOLS="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2013-11-12 20:29:38 +00:00
|
|
|
developer-build)
|
|
|
|
CFG_DEV="yes"
|
|
|
|
;;
|
|
|
|
commercial)
|
|
|
|
COMMERCIAL_USER="yes"
|
|
|
|
;;
|
|
|
|
opensource)
|
|
|
|
COMMERCIAL_USER="no"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
static)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
CFG_SHARED=no
|
|
|
|
elif [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SHARED=yes
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
fatal_error)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
feature-*)
|
2014-11-08 11:42:00 +00:00
|
|
|
FEATURE=`echo $VAR | sed 's,^[^-]*-\([^-]*\),\1,' | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
|
|
|
|
if grep "^Feature: *${FEATURE} *\$" "$relpath"/src/corelib/global/qfeatures.txt >/dev/null 2>&1; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
|
|
|
|
elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
2014-11-08 11:42:00 +00:00
|
|
|
else
|
|
|
|
echo "ERROR: Unknown feature $FEATURE"
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
shared)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SHARED="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
gif)
|
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
CFG_GIF="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
sm)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SM="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
|
|
|
|
;;
|
2011-10-14 13:55:35 +00:00
|
|
|
xinput2)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_XINPUT2="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
egl)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_EGL="$VAL"
|
2014-02-06 11:10:11 +00:00
|
|
|
CFG_EGL_X="$VAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
pch)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_PRECOMPILE="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2015-10-29 13:59:59 +00:00
|
|
|
ltcg)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_LTCG="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=no
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
separate-debug-info)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SEPARATE_DEBUG_INFO="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
reduce-exports)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_REDUCE_EXPORTS="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
sse2)
|
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SSE2="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
sse3)
|
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SSE3="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
ssse3)
|
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SSSE3="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
sse4.1)
|
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SSE4_1="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
sse4.2)
|
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SSE4_2="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
avx)
|
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
CFG_AVX="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-12-30 00:44:16 +00:00
|
|
|
avx2)
|
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
CFG_AVX2="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2015-07-17 21:46:05 +00:00
|
|
|
avx512)
|
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
CFG_AVX512=""
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-03-02 16:43:52 +00:00
|
|
|
mips_dsp)
|
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
CFG_MIPS_DSP="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
mips_dspr2)
|
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
CFG_MIPS_DSPR2="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
reduce-relocations)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_REDUCE_RELOCATIONS="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2014-07-01 09:46:50 +00:00
|
|
|
use-gold-linker)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_USE_GOLD_LINKER="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
zlib)
|
2016-02-19 14:18:47 +00:00
|
|
|
if [ "$VAL" = "system" ]; then
|
|
|
|
CFG_SYSTEM_ZLIB="yes"
|
|
|
|
elif [ "$VAL" = "qt" ]; then
|
|
|
|
CFG_SYSTEM_ZLIB="no"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2013-12-20 15:14:31 +00:00
|
|
|
mtdev)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_MTDEV="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2014-01-01 16:36:24 +00:00
|
|
|
journald)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_JOURNALD="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2015-07-04 14:13:31 +00:00
|
|
|
syslog)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SYSLOG="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
sqlite)
|
|
|
|
if [ "$VAL" = "system" ]; then
|
|
|
|
CFG_SQLITE=system
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
libpng)
|
|
|
|
[ "$VAL" = "yes" ] && VAL=qt
|
|
|
|
if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
|
|
|
|
CFG_LIBPNG="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
libjpeg)
|
|
|
|
[ "$VAL" = "yes" ] && VAL=qt
|
|
|
|
if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
|
|
|
|
CFG_LIBJPEG="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
xrender)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_XRENDER="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2015-10-15 13:40:26 +00:00
|
|
|
doubleconversion)
|
|
|
|
if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
|
|
|
|
CFG_DOUBLECONVERSION="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
fontconfig)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_FONTCONFIG="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2013-09-08 03:55:50 +00:00
|
|
|
freetype)
|
|
|
|
[ "$VAL" = "yes" ] && VAL=qt
|
|
|
|
if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
|
|
|
|
CFG_FREETYPE="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
xkb)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_XKB="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2014-12-09 10:45:29 +00:00
|
|
|
xkbcommon-evdev)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_XKBCOMMON_EVDEV="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
xkbcommon|xkbcommon-x11)
|
2013-04-11 08:51:49 +00:00
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
|
|
|
|
CFG_XKBCOMMON="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-05-18 14:35:04 +00:00
|
|
|
xcb)
|
2012-10-29 11:59:09 +00:00
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ] || [ "$VAL" = "qt" ]; then
|
2011-05-18 14:35:04 +00:00
|
|
|
CFG_XCB="$VAL"
|
2012-10-29 11:59:09 +00:00
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
CFG_XCB="system"
|
|
|
|
fi
|
2011-05-18 14:35:04 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2013-11-28 11:07:09 +00:00
|
|
|
xcb-xlib)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_XCB_XLIB="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-03-07 14:07:07 +00:00
|
|
|
eglfs)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_EGLFS="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-02-28 09:00:32 +00:00
|
|
|
directfb)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_DIRECTFB="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2015-10-13 14:09:51 +00:00
|
|
|
gbm)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_GBM="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-07-02 21:30:41 +00:00
|
|
|
linuxfb)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_LINUXFB="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-07-16 13:13:18 +00:00
|
|
|
kms)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_KMS="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2015-08-07 12:28:14 +00:00
|
|
|
mirclient)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_MIRCLIENT="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-02-05 11:32:40 +00:00
|
|
|
libudev)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_LIBUDEV="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2014-12-09 10:45:29 +00:00
|
|
|
libinput)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_LIBINPUT="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-02-05 11:32:40 +00:00
|
|
|
evdev)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_EVDEV="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2013-03-26 14:22:51 +00:00
|
|
|
tslib)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_TSLIB="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
cups)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_CUPS="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
iconv)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_ICONV="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
glib)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_GLIB="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-09-18 18:15:18 +00:00
|
|
|
slog2)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SLOG2="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2013-10-16 15:38:32 +00:00
|
|
|
imf)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_QNX_IMF="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2013-11-21 11:58:22 +00:00
|
|
|
pps)
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
2013-11-21 11:58:22 +00:00
|
|
|
CFG_PPS="$VAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2014-01-29 12:43:03 +00:00
|
|
|
lgmon)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_LGMON="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-02-28 15:10:24 +00:00
|
|
|
pulseaudio)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_PULSEAUDIO="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
alsa)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_ALSA="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2015-02-13 15:41:58 +00:00
|
|
|
gstreamer)
|
|
|
|
if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] ||
|
|
|
|
[ "$VAL" = "0.10" ] || [ "$VAL" = "1.0" ] ||
|
|
|
|
[ "$VAL" = "no" ]; then
|
|
|
|
CFG_GSTREAMER="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2015-07-30 18:32:43 +00:00
|
|
|
gtk)
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
2015-07-30 18:32:43 +00:00
|
|
|
CFG_GTK="$VAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
gui)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
|
|
|
|
CFG_GUI="yes"
|
|
|
|
else
|
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
CFG_GUI="no"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
2012-03-07 00:11:44 +00:00
|
|
|
widgets)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
|
|
|
|
CFG_WIDGETS="yes"
|
|
|
|
elif [ "$VAL" = "no" ]; then
|
|
|
|
CFG_WIDGETS="no"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-03-09 00:22:27 +00:00
|
|
|
qpa-platform-guard)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
2016-04-19 14:39:28 +00:00
|
|
|
echo "WARNING: The [-no]-qpa-platform-guard argument is deprecated and has no effect."
|
2012-03-09 00:22:27 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-01-26 17:43:06 +00:00
|
|
|
dbus)
|
2014-12-09 23:03:04 +00:00
|
|
|
if [ "$VAL" = "no" ] || [ "$VAL" = "linked" ] || [ "$VAL" = "runtime" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_DBUS="$VAL"
|
2014-12-09 23:03:04 +00:00
|
|
|
elif [ "$VAL" = "yes" ]; then
|
2014-12-11 22:32:59 +00:00
|
|
|
# keep as auto, we'll auto-detect whether to go linked or runtime later
|
|
|
|
CFG_DBUS=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
dbus-linked)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
CFG_DBUS="linked"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2014-12-11 22:32:59 +00:00
|
|
|
dbus-runtime)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
CFG_DBUS="runtime"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
openssl)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_OPENSSL="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
openssl-linked)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
CFG_OPENSSL="linked"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2014-08-22 15:20:49 +00:00
|
|
|
securetransport)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SECURETRANSPORT="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2015-01-27 17:41:32 +00:00
|
|
|
libproxy)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_LIBPROXY="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-03-30 11:43:10 +00:00
|
|
|
qml-debug)
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$VAL" = "yes" ]; then
|
2012-03-30 11:43:10 +00:00
|
|
|
CFG_QML_DEBUG="yes"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
if [ "$VAL" = "no" ]; then
|
2012-03-30 11:43:10 +00:00
|
|
|
CFG_QML_DEBUG="no"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
confirm-license)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
OPT_CONFIRM_LICENSE="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
h|help)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
OPT_HELP="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2016-04-06 08:15:14 +00:00
|
|
|
sql-*)
|
2016-03-18 12:35:40 +00:00
|
|
|
# if Qt style options were used, $VAL can be "no", "yes", or "plugin", plugin for backwards compatibility
|
|
|
|
[ "$VAL" = "plugin" ] && VAL=yes
|
|
|
|
# now $VAL should be "yes" or "no"... double-check
|
|
|
|
if [ "$VAL" != "no" ] && [ "$VAL" != "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
# now $VAL is "no", "qt", or "plugin"
|
|
|
|
OPT="$VAL"
|
2013-12-05 18:44:09 +00:00
|
|
|
VAL=`echo $VAR | sed 's,^[^-]*-\([^-]*\).*,\1,'`
|
|
|
|
VAR=`echo $VAR | sed 's,^\([^-]*\).*,\1,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# Check that that user's value is available.
|
|
|
|
found=no
|
2016-04-06 08:15:14 +00:00
|
|
|
for d in $CFG_SQL_AVAILABLE; do
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$VAL" = "$d" ]; then
|
|
|
|
found=yes
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2013-11-21 18:35:13 +00:00
|
|
|
if [ "$found" != "yes" ]; then
|
|
|
|
echo "$CURRENT_OPT: unknown argument"
|
|
|
|
ERROR=yes
|
|
|
|
continue
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-04-06 08:15:14 +00:00
|
|
|
# set the CFG_SQL_driver
|
|
|
|
eval "CFG_SQL_$VAL=\$OPT"
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
v|verbose)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
2016-05-31 10:08:03 +00:00
|
|
|
OPT_VERBOSE=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
elif [ "$VAL" = "no" ]; then
|
2016-05-31 10:08:03 +00:00
|
|
|
OPT_VERBOSE=no
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
rpath)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_RPATH="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
add_define)
|
2012-05-30 23:44:53 +00:00
|
|
|
DEFINES="$DEFINES \"$VAL\""
|
|
|
|
D_FLAGS="$D_FLAGS -D\"$VAL\""
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
add_ipath)
|
2013-12-16 13:28:07 +00:00
|
|
|
INCLUDES="$INCLUDES \"$VAL\""
|
2011-04-27 10:05:43 +00:00
|
|
|
I_FLAGS="$I_FLAGS -I\"${VAL}\""
|
|
|
|
;;
|
|
|
|
add_lpath)
|
|
|
|
L_FLAGS="$L_FLAGS -L\"${VAL}\""
|
|
|
|
;;
|
|
|
|
add_rpath)
|
|
|
|
RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
|
|
|
|
;;
|
|
|
|
add_link)
|
2012-08-11 19:55:20 +00:00
|
|
|
L_FLAGS="$L_FLAGS -l\"${VAL}\""
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
add_fpath)
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
L_FLAGS="$L_FLAGS -F\"${VAL}\""
|
|
|
|
I_FLAGS="$I_FLAGS -F\"${VAL}\""
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
add_framework)
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2012-08-11 19:55:20 +00:00
|
|
|
L_FLAGS="$L_FLAGS -framework \"${VAL}\""
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-10-24 11:00:49 +00:00
|
|
|
add_warn)
|
|
|
|
W_FLAGS="$W_FLAGS \"${VAL}\""
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
silent)
|
|
|
|
CFG_SILENT="$VAL"
|
|
|
|
;;
|
|
|
|
icu)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_ICU="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-11-11 10:21:52 +00:00
|
|
|
force-asserts)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_FORCE_ASSERTS="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-01-23 22:31:13 +00:00
|
|
|
pcre)
|
|
|
|
if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
|
|
|
|
CFG_PCRE="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2015-07-09 00:21:30 +00:00
|
|
|
c++std)
|
|
|
|
case "$VAL" in
|
2015-07-09 23:33:33 +00:00
|
|
|
c++11|c++14|c++1z|auto)
|
2015-07-09 00:21:30 +00:00
|
|
|
CFG_STDCXX="$VAL"
|
|
|
|
;;
|
2015-07-09 23:33:33 +00:00
|
|
|
11|14|1z)
|
2015-07-09 00:21:30 +00:00
|
|
|
CFG_STDCXX="c++$VAL"
|
|
|
|
;;
|
|
|
|
1y|c++1y)
|
|
|
|
CFG_STDCXX="c++14"
|
|
|
|
;;
|
|
|
|
*)
|
2015-07-09 23:33:33 +00:00
|
|
|
echo >&2 "Invalid C++ edition: $VAL; valid options are: c++11 c++14 c++1z auto"
|
2015-07-09 00:21:30 +00:00
|
|
|
ERROR=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
2012-10-23 13:31:20 +00:00
|
|
|
system-proxies)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SYSTEM_PROXIES="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-12-10 20:34:48 +00:00
|
|
|
directwrite)
|
|
|
|
if [ "$XPLATFORM_MINGW" = "yes" ] ; then
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_DIRECTWRITE="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-12-22 02:31:54 +00:00
|
|
|
warnings-are-errors|Werror)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_WERROR="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-12-22 21:12:02 +00:00
|
|
|
headersclean)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_HEADERSCLEAN="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2014-03-04 15:26:07 +00:00
|
|
|
xkb-config-root)
|
|
|
|
CFG_XKB_CONFIG_ROOT="$VAL"
|
|
|
|
;;
|
2013-03-04 09:16:42 +00:00
|
|
|
android-sdk)
|
|
|
|
CFG_DEFAULT_ANDROID_SDK_ROOT="$VAL"
|
|
|
|
;;
|
|
|
|
android-ndk)
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_ROOT="$VAL"
|
|
|
|
;;
|
|
|
|
android-ndk-platform)
|
|
|
|
CFG_DEFAULT_ANDROID_PLATFORM="$VAL"
|
|
|
|
;;
|
|
|
|
android-ndk-host)
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST="$VAL"
|
|
|
|
;;
|
|
|
|
android-arch)
|
|
|
|
CFG_DEFAULT_ANDROID_TARGET_ARCH="$VAL"
|
|
|
|
;;
|
|
|
|
android-toolchain-version)
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION="$VAL"
|
|
|
|
;;
|
2014-09-30 08:34:00 +00:00
|
|
|
android-style-assets)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_ANDROID_STYLE_ASSETS="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2013-02-12 11:25:47 +00:00
|
|
|
l*) # -lfoo
|
2013-07-22 18:33:15 +00:00
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
L_FLAGS="$L_FLAGS -l\"${VAR#l}\""
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
2013-02-12 11:25:47 +00:00
|
|
|
;;
|
|
|
|
fw*) # -fwfoo
|
2013-07-22 18:33:15 +00:00
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
|
|
|
L_FLAGS="$L_FLAGS -framework \"${VAR#fw}\""
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
2013-02-12 11:25:47 +00:00
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
*)
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if [ "$UNKNOWN_OPT" = "yes" ]; then
|
|
|
|
echo "${CURRENT_OPT}: invalid command-line switch"
|
|
|
|
ERROR=yes
|
|
|
|
fi
|
|
|
|
done
|
2013-11-12 18:42:41 +00:00
|
|
|
[ "x$ERROR" = "xyes" ] && exit 1
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# help - interactive parts of the script _after_ this section please
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if [ "$OPT_HELP" = "yes" ]; then
|
2016-04-19 14:46:39 +00:00
|
|
|
cat $relpath/config_help.txt
|
|
|
|
exit 0
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# platform detection
|
|
|
|
#-------------------------------------------------------------------------------
|
2012-08-07 20:22:38 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
if [ -z "$PLATFORM" ]; then
|
|
|
|
PLATFORM_NOTES=
|
|
|
|
case "$UNAME_SYSTEM:$UNAME_RELEASE" in
|
|
|
|
Darwin:*)
|
2016-04-19 15:01:51 +00:00
|
|
|
PLATFORM=macx-clang
|
2013-11-13 14:15:07 +00:00
|
|
|
;;
|
|
|
|
AIX:*)
|
|
|
|
#PLATFORM=aix-g++
|
|
|
|
#PLATFORM=aix-g++-64
|
|
|
|
PLATFORM=aix-xlc
|
|
|
|
#PLATFORM=aix-xlc-64
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
GNU:*)
|
|
|
|
PLATFORM=hurd-g++
|
|
|
|
;;
|
|
|
|
dgux:*)
|
|
|
|
PLATFORM=dgux-g++
|
|
|
|
;;
|
|
|
|
# DYNIX/ptx:4*)
|
|
|
|
# PLATFORM=dynix-g++
|
|
|
|
# ;;
|
|
|
|
ULTRIX:*)
|
|
|
|
PLATFORM=ultrix-g++
|
|
|
|
;;
|
|
|
|
FreeBSD:*)
|
2016-05-26 06:36:57 +00:00
|
|
|
if [ "$(uname -r | cut -d. -f1)" -ge 10 ]; then
|
|
|
|
PLATFORM=freebsd-clang
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for FreeBSD: freebsd-g++
|
|
|
|
"
|
|
|
|
else
|
|
|
|
PLATFORM=freebsd-g++
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for FreeBSD: freebsd-clang
|
|
|
|
"
|
|
|
|
fi
|
2013-11-13 14:15:07 +00:00
|
|
|
;;
|
|
|
|
OpenBSD:*)
|
|
|
|
PLATFORM=openbsd-g++
|
|
|
|
;;
|
|
|
|
NetBSD:*)
|
|
|
|
PLATFORM=netbsd-g++
|
|
|
|
;;
|
|
|
|
BSD/OS:*|BSD/386:*)
|
|
|
|
PLATFORM=bsdi-g++
|
|
|
|
;;
|
|
|
|
IRIX*:*)
|
|
|
|
#PLATFORM=irix-g++
|
|
|
|
PLATFORM=irix-cc
|
|
|
|
#PLATFORM=irix-cc-64
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for IRIX: irix-g++ irix-cc-64
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
HP-UX:*)
|
|
|
|
case "$UNAME_MACHINE" in
|
|
|
|
ia64)
|
|
|
|
#PLATFORM=hpuxi-acc-32
|
|
|
|
PLATFORM=hpuxi-acc-64
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for HP-UXi: hpuxi-acc-32
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
#PLATFORM=hpux-g++
|
|
|
|
PLATFORM=hpux-acc
|
|
|
|
#PLATFORM=hpux-acc-64
|
|
|
|
#PLATFORM=hpux-cc
|
|
|
|
#PLATFORM=hpux-acc-o64
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
OSF1:*)
|
|
|
|
#PLATFORM=tru64-g++
|
|
|
|
PLATFORM=tru64-cxx
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for Tru64: tru64-g++
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
Linux:*)
|
|
|
|
PLATFORM=linux-g++
|
|
|
|
PLATFORM_NOTES="
|
2015-07-02 10:01:51 +00:00
|
|
|
- Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx
|
2013-11-13 14:15:07 +00:00
|
|
|
"
|
|
|
|
;;
|
|
|
|
SunOS:5*)
|
2016-06-01 06:30:45 +00:00
|
|
|
#PLATFORM=solaris-g++
|
|
|
|
PLATFORM=solaris-cc
|
|
|
|
#PLATFORM=solaris-cc64
|
2013-11-13 14:15:07 +00:00
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for Solaris: solaris-g++ solaris-cc-64
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
ReliantUNIX-*:*|SINIX-*:*)
|
|
|
|
PLATFORM=reliant-cds
|
|
|
|
#PLATFORM=reliant-cds-64
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for Reliant UNIX: reliant-cds-64
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
CYGWIN*:*)
|
|
|
|
PLATFORM=cygwin-g++
|
|
|
|
;;
|
|
|
|
LynxOS*:*)
|
|
|
|
PLATFORM=lynxos-g++
|
|
|
|
;;
|
|
|
|
OpenUNIX:*)
|
|
|
|
#PLATFORM=unixware-g++
|
|
|
|
PLATFORM=unixware-cc
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for OpenUNIX: unixware-g++
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
UnixWare:*)
|
|
|
|
#PLATFORM=unixware-g++
|
|
|
|
PLATFORM=unixware-cc
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for UnixWare: unixware-g++
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
SCO_SV:*)
|
|
|
|
#PLATFORM=sco-g++
|
|
|
|
PLATFORM=sco-cc
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for SCO OpenServer: sco-g++
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
UNIX_SV:*)
|
|
|
|
PLATFORM=unixware-g++
|
|
|
|
;;
|
|
|
|
QNX:*)
|
|
|
|
PLATFORM=unsupported/qnx-g++
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo >&2
|
|
|
|
echo " The build script does not currently recognize all" >&2
|
|
|
|
echo " platforms supported by Qt." >&2
|
|
|
|
echo " Rerun this script with a -platform option listed to" >&2
|
|
|
|
echo " set the system/compiler combination you use." >&2
|
|
|
|
echo >&2
|
|
|
|
exit 2
|
|
|
|
esac
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
[ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
|
2012-08-02 13:37:50 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
case "$XPLATFORM" in
|
2013-11-12 20:56:44 +00:00
|
|
|
*win32-g++*)
|
|
|
|
XPLATFORM_MINGW=yes
|
|
|
|
;;
|
2015-10-15 13:24:54 +00:00
|
|
|
*qnx-*)
|
2013-11-13 14:15:07 +00:00
|
|
|
XPLATFORM_QNX=yes
|
|
|
|
;;
|
2014-12-16 08:15:26 +00:00
|
|
|
*haiku-*)
|
|
|
|
XPLATFORM_HAIKU=yes
|
|
|
|
;;
|
2013-11-13 14:15:07 +00:00
|
|
|
*ios*)
|
2013-11-12 21:01:44 +00:00
|
|
|
XPLATFORM_MAC=yes
|
2013-11-13 14:15:07 +00:00
|
|
|
XPLATFORM_IOS=yes
|
|
|
|
;;
|
2016-02-16 14:29:59 +00:00
|
|
|
*tvos*)
|
|
|
|
XPLATFORM_MAC=yes
|
|
|
|
XPLATFORM_TVOS=yes
|
|
|
|
;;
|
2013-11-12 21:01:44 +00:00
|
|
|
*macx*)
|
|
|
|
XPLATFORM_MAC=yes
|
|
|
|
;;
|
2015-10-27 00:54:21 +00:00
|
|
|
*integrity*)
|
|
|
|
XPLATFORM_INTEGRITY=yes
|
|
|
|
;;
|
2013-11-13 14:15:07 +00:00
|
|
|
# XPLATFORM_ANDROID should not be set for unsupported/android-g++
|
|
|
|
*unsupported*)
|
|
|
|
;;
|
|
|
|
*android-g++*)
|
|
|
|
XPLATFORM_ANDROID=yes
|
|
|
|
;;
|
|
|
|
esac
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2013-11-12 20:29:38 +00:00
|
|
|
# check the license
|
2013-11-13 14:15:07 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-12 20:29:38 +00:00
|
|
|
if [ "$COMMERCIAL_USER" = "ask" ]; then
|
|
|
|
while true; do
|
|
|
|
echo "Which edition of Qt do you want to use ?"
|
|
|
|
echo
|
|
|
|
echo "Type 'c' if you want to use the Commercial Edition."
|
|
|
|
echo "Type 'o' if you want to use the Open Source Edition."
|
|
|
|
echo
|
|
|
|
read commercial
|
|
|
|
echo
|
|
|
|
if [ "$commercial" = "c" ]; then
|
|
|
|
COMMERCIAL_USER="yes"
|
|
|
|
break
|
|
|
|
elif [ "$commercial" = "o" ]; then
|
|
|
|
COMMERCIAL_USER="no"
|
|
|
|
break
|
|
|
|
fi
|
2013-11-13 14:15:07 +00:00
|
|
|
done
|
2013-11-12 20:29:38 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-12 20:29:38 +00:00
|
|
|
if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
|
|
|
|
# Commercial preview release
|
|
|
|
Licensee="Preview"
|
|
|
|
Edition="Preview"
|
2014-02-26 14:16:34 +00:00
|
|
|
EditionString="Technology Preview"
|
2013-11-12 20:29:38 +00:00
|
|
|
elif [ $COMMERCIAL_USER = "yes" ]; then
|
2015-05-22 10:45:47 +00:00
|
|
|
if [ $UNAME_SYSTEM = "Linux" ]; then
|
2015-06-25 12:19:02 +00:00
|
|
|
case "$PLATFORM" in
|
|
|
|
*-32)
|
2015-05-22 10:45:47 +00:00
|
|
|
Licheck=licheck32
|
2015-06-25 12:19:02 +00:00
|
|
|
;;
|
|
|
|
*-64)
|
|
|
|
Licheck=licheck64
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if file -L /bin/sh | grep -q "64-bit" ; then
|
|
|
|
Licheck=licheck64
|
|
|
|
else
|
|
|
|
Licheck=licheck32
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
2015-05-22 10:45:47 +00:00
|
|
|
elif [ $UNAME_SYSTEM = "Darwin" ]; then
|
|
|
|
Licheck=licheck_mac
|
|
|
|
else
|
|
|
|
echo >&2 "Host operating system not supported by this edition of Qt."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -x "$relpath/bin/$Licheck" ]; then
|
|
|
|
LicheckOutput=`$relpath/bin/$Licheck $OPT_CONFIRM_LICENSE $relpath $outpath\
|
2014-03-31 13:09:22 +00:00
|
|
|
$PLATFORM $XPLATFORM`
|
2014-02-26 14:16:34 +00:00
|
|
|
if [ $? -ne 0 ]; then
|
2013-11-12 20:29:38 +00:00
|
|
|
exit 1
|
2014-02-26 14:16:34 +00:00
|
|
|
else
|
|
|
|
eval "$LicheckOutput"
|
2013-11-12 20:29:38 +00:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo
|
2014-02-26 14:16:34 +00:00
|
|
|
echo "Error: This is the Open Source version of Qt."
|
|
|
|
echo "If you want to use Enterprise features of Qt,"
|
2015-05-26 12:33:25 +00:00
|
|
|
echo "use the contact form at http://www.qt.io/contact-us"
|
2014-02-26 14:16:34 +00:00
|
|
|
echo "to purchase a license."
|
2013-11-12 20:29:38 +00:00
|
|
|
echo
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
elif [ $COMMERCIAL_USER = "no" ]; then
|
2016-02-12 20:46:51 +00:00
|
|
|
# Open Source edition - may only be used under the terms of the LGPLv3 or GPLv2.
|
2013-11-12 20:29:38 +00:00
|
|
|
Licensee="Open Source"
|
|
|
|
Edition="OpenSource"
|
|
|
|
EditionString="Open Source"
|
|
|
|
fi
|
2014-02-26 14:16:34 +00:00
|
|
|
|
|
|
|
if [ "$Edition" = "OpenSource" ] || [ "$Edition" = "Preview" ]; then
|
|
|
|
echo
|
|
|
|
echo "This is the Qt ${EditionString} Edition."
|
|
|
|
echo
|
2013-11-12 20:29:38 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-12 20:29:38 +00:00
|
|
|
if [ "$Edition" = "OpenSource" ]; then
|
|
|
|
while true; do
|
2014-09-30 08:34:00 +00:00
|
|
|
if [ "$CFG_ANDROID_STYLE_ASSETS" = "no" ] || [ "$XPLATFORM_ANDROID" = "no" ]; then
|
|
|
|
echo "You are licensed to use this software under the terms of"
|
2014-08-21 13:51:22 +00:00
|
|
|
echo "the GNU Lesser General Public License (LGPL) versions 3."
|
2016-02-12 20:46:51 +00:00
|
|
|
echo "You are also licensed to use this software under the terms of"
|
|
|
|
echo "the GNU General Public License (GPL) versions 2."
|
2013-11-12 20:29:38 +00:00
|
|
|
affix="either"
|
2016-02-12 20:46:51 +00:00
|
|
|
showGPL2="yes"
|
2013-11-12 20:29:38 +00:00
|
|
|
else
|
2014-09-30 08:34:00 +00:00
|
|
|
echo "You are licensed to use this software under the terms of"
|
|
|
|
echo "the GNU Lesser General Public License (LGPL) versions 3."
|
2016-02-12 20:46:51 +00:00
|
|
|
showGPL2="no"
|
2013-11-12 20:29:38 +00:00
|
|
|
affix="the"
|
|
|
|
fi
|
2014-09-30 08:34:00 +00:00
|
|
|
|
2013-11-12 20:29:38 +00:00
|
|
|
echo
|
|
|
|
if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
|
2014-02-26 14:16:34 +00:00
|
|
|
echo "You have already accepted the terms of the $EditionString license."
|
2013-11-12 20:29:38 +00:00
|
|
|
acceptance=yes
|
|
|
|
else
|
2016-02-12 20:46:51 +00:00
|
|
|
if [ -f "$relpath/LICENSE.LGPL3" ]; then
|
|
|
|
echo "Type 'L' to view the GNU Lesser General Public License version 3."
|
2013-11-12 20:29:38 +00:00
|
|
|
fi
|
2016-02-12 20:46:51 +00:00
|
|
|
if [ "$showGPL2" = "yes" ]; then
|
|
|
|
echo "Type 'G' to view the GNU General Public License version 2."
|
2014-09-30 08:34:00 +00:00
|
|
|
fi
|
2013-11-12 20:29:38 +00:00
|
|
|
echo "Type 'yes' to accept this license offer."
|
|
|
|
echo "Type 'no' to decline this license offer."
|
|
|
|
echo
|
|
|
|
echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
|
|
|
|
read acceptance
|
|
|
|
fi
|
|
|
|
echo
|
|
|
|
if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
|
|
|
|
break
|
|
|
|
elif [ "$acceptance" = "no" ]; then
|
|
|
|
echo "You are not licensed to use this software."
|
|
|
|
echo
|
|
|
|
exit 1
|
2016-02-12 20:46:51 +00:00
|
|
|
elif [ "$acceptance" = "L" ]; then
|
|
|
|
more "$relpath/LICENSE.LGPL3"
|
|
|
|
elif [ "$acceptance" = "G" ] && [ "$showGPL2" = "yes" ]; then
|
|
|
|
more "$relpath/LICENSE.GPL2"
|
2013-11-12 20:29:38 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
elif [ "$Edition" = "Preview" ]; then
|
|
|
|
TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
|
|
|
|
while true; do
|
2011-06-23 08:48:33 +00:00
|
|
|
|
2013-11-12 20:29:38 +00:00
|
|
|
if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
|
2014-02-26 14:16:34 +00:00
|
|
|
echo "You have already accepted the terms of the $EditionString license."
|
2013-11-12 20:29:38 +00:00
|
|
|
acceptance=yes
|
|
|
|
else
|
|
|
|
echo "You are licensed to use this software under the terms of"
|
|
|
|
echo "the $TheLicense"
|
|
|
|
echo
|
|
|
|
echo "Type '?' to read the Preview License."
|
|
|
|
echo "Type 'yes' to accept this license offer."
|
|
|
|
echo "Type 'no' to decline this license offer."
|
|
|
|
echo
|
|
|
|
echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
|
|
|
|
read acceptance
|
|
|
|
fi
|
|
|
|
echo
|
|
|
|
if [ "$acceptance" = "yes" ]; then
|
|
|
|
break
|
|
|
|
elif [ "$acceptance" = "no" ] ;then
|
|
|
|
echo "You are not licensed to use this software."
|
|
|
|
echo
|
|
|
|
exit 0
|
|
|
|
elif [ "$acceptance" = "?" ]; then
|
|
|
|
more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-12 20:29:38 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# command line and environment validation
|
|
|
|
#-------------------------------------------------------------------------------
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
|
2013-11-12 21:01:44 +00:00
|
|
|
if [ "$XPLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
|
2013-11-13 14:15:07 +00:00
|
|
|
echo
|
|
|
|
echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
|
|
|
|
echo "Qt can be built in release mode with separate debug information, so"
|
|
|
|
echo "-debug-and-release is not necessary anymore"
|
|
|
|
echo
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-02-05 15:25:06 +00:00
|
|
|
if ( [ "$CFG_XCB" = "system" ] || [ "$CFG_XCB" = "qt" ] ) && [ "$CFG_XKBCOMMON" = "no" ]; then
|
2014-12-09 10:45:29 +00:00
|
|
|
echo "Error: -no-xkbcommon-x11 is not supported on XCB platform plugin."
|
2013-11-13 14:15:07 +00:00
|
|
|
exit 101
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
if [ "$XPLATFORM_ANDROID" = "yes" ]; then
|
2015-02-20 14:45:28 +00:00
|
|
|
if [ "$CFG_DBUS" = "auto" ]; then
|
|
|
|
CFG_DBUS="no"
|
|
|
|
fi
|
2016-06-01 08:48:08 +00:00
|
|
|
if [ "$CFG_EGLFS" = "auto" ]; then
|
|
|
|
CFG_EGLFS="no"
|
|
|
|
fi
|
2013-11-13 14:15:07 +00:00
|
|
|
if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then
|
|
|
|
case $PLATFORM in
|
|
|
|
linux-*)
|
|
|
|
if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86" ]; then
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86
|
|
|
|
elif [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86_64" ]; then
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86_64
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
macx-*)
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86
|
2015-06-04 16:55:55 +00:00
|
|
|
if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/darwin-x86_64" ]; then
|
2013-11-13 14:15:07 +00:00
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86_64
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
win32-*)
|
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=windows
|
2015-06-04 16:55:55 +00:00
|
|
|
if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/windows-x86_64" ]; then
|
2013-11-13 14:15:07 +00:00
|
|
|
CFG_DEFAULT_ANDROID_NDK_HOST=windows-x86_64
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
if [ -z "$CFG_DEFAULT_ANDROID_NDK_ROOT" ]; then
|
|
|
|
echo
|
|
|
|
echo "Can not find Android NDK. Please use -android-ndk option to specify one"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -z "$CFG_DEFAULT_ANDROID_SDK_ROOT" ]; then
|
|
|
|
echo
|
|
|
|
echo "Can not find Android SDK. Please use -android-sdk option to specify one"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -z "CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION" ] || [ ! -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt" ]; then
|
|
|
|
echo
|
|
|
|
echo "Can not detect Android NDK toolchain. Please use -android-toolchain-version to specify"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ] || [ ! -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then
|
|
|
|
echo
|
|
|
|
echo "Can not detect the android host. Please use -android-ndk-host option to specify one"
|
|
|
|
exit 1
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
QT_QPA_DEFAULT_PLATFORM="android"
|
|
|
|
CFG_LARGEFILE="no"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
DeviceVar set DEFAULT_ANDROID_SDK_ROOT "$CFG_DEFAULT_ANDROID_SDK_ROOT"
|
|
|
|
DeviceVar set DEFAULT_ANDROID_NDK_ROOT "$CFG_DEFAULT_ANDROID_NDK_ROOT"
|
|
|
|
DeviceVar set DEFAULT_ANDROID_PLATFORM "$CFG_DEFAULT_ANDROID_PLATFORM"
|
|
|
|
DeviceVar set DEFAULT_ANDROID_NDK_HOST "$CFG_DEFAULT_ANDROID_NDK_HOST"
|
|
|
|
DeviceVar set DEFAULT_ANDROID_TARGET_ARCH "$CFG_DEFAULT_ANDROID_TARGET_ARCH"
|
|
|
|
DeviceVar set DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION "$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION"
|
|
|
|
fi
|
2013-09-08 03:55:50 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
if [ -d "$PLATFORM" ]; then
|
|
|
|
QMAKESPEC="$PLATFORM"
|
|
|
|
else
|
|
|
|
QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
|
|
|
|
fi
|
|
|
|
if [ -d "$XPLATFORM" ]; then
|
|
|
|
XQMAKESPEC="$XPLATFORM"
|
|
|
|
else
|
|
|
|
XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
|
|
|
|
fi
|
|
|
|
if [ "$PLATFORM" != "$XPLATFORM" ]; then
|
|
|
|
QT_CROSS_COMPILE=yes
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
|
|
|
|
fi
|
2013-08-26 15:44:36 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
|
|
|
if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
|
|
|
|
echo >&2
|
|
|
|
echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
|
|
|
|
echo " Please build Qt/Mac with 'macx-clang' or 'macx-g++', then use" >&2
|
|
|
|
echo " the 'macx-xcode' spec for your application, and it will link to" >&2
|
|
|
|
echo " the Qt/Mac build using the settings of the original mkspec." >&2
|
|
|
|
echo >&2
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
# check specified platforms are supported
|
|
|
|
if [ '!' -d "$QMAKESPEC" ]; then
|
|
|
|
echo
|
|
|
|
echo " The specified system/compiler is not supported:"
|
|
|
|
echo
|
|
|
|
echo " $QMAKESPEC"
|
|
|
|
echo
|
|
|
|
echo " Please see the README file for a complete list."
|
|
|
|
echo
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
if [ '!' -d "$XQMAKESPEC" ]; then
|
|
|
|
echo
|
|
|
|
echo " The specified system/compiler is not supported:"
|
|
|
|
echo
|
|
|
|
echo " $XQMAKESPEC"
|
|
|
|
echo
|
|
|
|
echo " Please see the README file for a complete list."
|
|
|
|
echo
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
|
|
|
|
echo
|
|
|
|
echo " The specified system/compiler port is not complete:"
|
|
|
|
echo
|
|
|
|
echo " $XQMAKESPEC/qplatformdefs.h"
|
|
|
|
echo
|
2015-01-28 08:44:43 +00:00
|
|
|
echo " Please information use the contact form at http://www.qt.io/contact-us"
|
2013-11-13 14:15:07 +00:00
|
|
|
echo
|
|
|
|
exit 2
|
|
|
|
fi
|
2012-01-23 22:31:13 +00:00
|
|
|
|
2013-11-13 14:44:48 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# build tree initialization
|
|
|
|
#-------------------------------------------------------------------------------
|
2012-10-29 11:59:09 +00:00
|
|
|
|
2013-11-13 14:44:48 +00:00
|
|
|
# is this a shadow build?
|
|
|
|
if [ "$OPT_SHADOW" = "maybe" ]; then
|
|
|
|
OPT_SHADOW=no
|
|
|
|
if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
|
|
|
|
if [ -h "$outpath" ]; then
|
|
|
|
[ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
|
|
|
|
else
|
|
|
|
OPT_SHADOW=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ "$OPT_SHADOW" = "yes" ]; then
|
|
|
|
if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
|
|
|
|
echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
|
|
|
|
echo >&2 "Cannot proceed."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
[ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
|
|
|
|
fi
|
2013-04-11 08:51:49 +00:00
|
|
|
|
2013-11-13 14:44:48 +00:00
|
|
|
# if the source tree is different from the build tree,
|
|
|
|
# symlink or copy part of the sources
|
|
|
|
if [ "$OPT_SHADOW" = "yes" ]; then
|
|
|
|
echo "Preparing build tree..."
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:44:48 +00:00
|
|
|
[ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:44:48 +00:00
|
|
|
mkdir -p "$outpath/mkspecs"
|
|
|
|
fi
|
2013-02-18 16:37:21 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
# detect build style
|
|
|
|
if [ "$CFG_DEBUG" = "auto" ]; then
|
2013-11-12 21:01:44 +00:00
|
|
|
if [ "$XPLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
|
2013-11-13 14:15:07 +00:00
|
|
|
CFG_DEBUG_RELEASE=yes
|
|
|
|
CFG_DEBUG=yes
|
|
|
|
elif [ "$CFG_DEV" = "yes" ]; then
|
|
|
|
CFG_DEBUG_RELEASE=no
|
|
|
|
CFG_DEBUG=yes
|
|
|
|
else
|
|
|
|
CFG_DEBUG_RELEASE=no
|
|
|
|
CFG_DEBUG=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG build_all debug_and_release"
|
|
|
|
fi
|
2012-09-20 09:08:48 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
if [ "$CFG_FORCEDEBUGINFO" = "yes" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG force_debug_info"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2015-10-26 11:38:50 +00:00
|
|
|
if [ "$CFG_RELEASE_TOOLS" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG release_tools"
|
|
|
|
fi
|
|
|
|
|
2014-09-30 14:39:12 +00:00
|
|
|
if [ "$XPLATFORM_MAC" = "yes" ]; then
|
2014-10-06 11:18:01 +00:00
|
|
|
[ "$CFG_PKGCONFIG" = "auto" ] && CFG_PKGCONFIG="no"
|
2014-09-30 14:39:12 +00:00
|
|
|
fi
|
|
|
|
|
2016-02-16 14:29:59 +00:00
|
|
|
if [ "$XPLATFORM_IOS" = "yes" ] || [ "$XPLATFORM_TVOS" = "yes" ]; then
|
2013-11-13 14:15:07 +00:00
|
|
|
CFG_RPATH="no"
|
2014-01-16 10:00:30 +00:00
|
|
|
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples"
|
2013-11-13 14:15:07 +00:00
|
|
|
CFG_SHARED="no" # iOS builds should be static to be able to submit to the App Store
|
2015-05-11 09:01:53 +00:00
|
|
|
CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtdoc qtmacextras qtserialport qtwebkit qtwebkit-examples"
|
2014-10-28 12:27:25 +00:00
|
|
|
CFG_PRECOMPILE="no" # Precompiled headers not supported with multiple -arch arguments
|
2016-02-16 14:29:59 +00:00
|
|
|
if [ "$XPLATFORM_TVOS" = "yes" ]; then
|
|
|
|
CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtscript"
|
|
|
|
CFG_WIDGETS="no"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
# If the user passes -sdk on the command line we build a SDK-specific Qt build.
|
|
|
|
# Otherwise we build a joined simulator and device build, which is the default.
|
|
|
|
if [ -z "$OPT_MAC_SDK" ]; then
|
2016-05-23 16:07:22 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG build_all simulator_and_device"
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-03-21 07:16:51 +00:00
|
|
|
# disable XCB and GTK support auto-detection on Mac
|
|
|
|
if [ "$XPLATFORM_MAC" = "yes" ]; then
|
|
|
|
[ "$CFG_XCB" = "auto" ] && CFG_XCB=no
|
2015-07-30 18:32:43 +00:00
|
|
|
[ "$CFG_GTK" = "auto" ] && CFG_GTK=no
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
TEST_COMPILER=$QMAKE_CONF_COMPILER
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
if [ "$XPLATFORM_ANDROID" = "yes" ] ; then
|
2014-10-30 12:03:00 +00:00
|
|
|
ANDROID_NDK_TOOLCHAIN_PREFIX=
|
2013-11-13 14:15:07 +00:00
|
|
|
ANDROID_NDK_TOOLS_PREFIX=
|
|
|
|
ANDROID_PLATFORM_ARCH=
|
|
|
|
case $CFG_DEFAULT_ANDROID_TARGET_ARCH in
|
|
|
|
armeabi*)
|
|
|
|
ANDROID_NDK_TOOLS_PREFIX=arm-linux-androideabi
|
2014-10-30 12:03:00 +00:00
|
|
|
ANDROID_NDK_TOOLCHAIN_PREFIX=arm-linux-androideabi
|
2013-11-13 14:15:07 +00:00
|
|
|
ANDROID_PLATFORM_ARCH=arch-arm
|
|
|
|
;;
|
|
|
|
x86)
|
2014-10-30 12:03:00 +00:00
|
|
|
ANDROID_NDK_TOOLS_PREFIX=i686-linux-android
|
|
|
|
ANDROID_NDK_TOOLCHAIN_PREFIX=x86
|
2013-11-13 14:15:07 +00:00
|
|
|
ANDROID_PLATFORM_ARCH=arch-x86
|
|
|
|
;;
|
|
|
|
mips)
|
|
|
|
ANDROID_NDK_TOOLS_PREFIX=mipsel-linux-android
|
2014-10-30 12:03:00 +00:00
|
|
|
ANDROID_NDK_TOOLCHAIN_PREFIX=mipsel-linux-android
|
2013-11-13 14:15:07 +00:00
|
|
|
ANDROID_PLATFORM_ARCH=arch-mips
|
|
|
|
;;
|
2014-10-30 12:03:00 +00:00
|
|
|
arm64-v8a)
|
|
|
|
ANDROID_NDK_TOOLS_PREFIX=aarch64-linux-android
|
|
|
|
ANDROID_NDK_TOOLCHAIN_PREFIX=aarch64-linux-android
|
|
|
|
ANDROID_PLATFORM_ARCH=arch-arm64
|
|
|
|
;;
|
|
|
|
mips64)
|
|
|
|
ANDROID_NDK_TOOLS_PREFIX=mips64el-linux-android
|
|
|
|
ANDROID_NDK_TOOLCHAIN_PREFIX=mips64el-linux-android
|
|
|
|
ANDROID_PLATFORM_ARCH=arch-mips64
|
|
|
|
;;
|
|
|
|
x86_64)
|
|
|
|
ANDROID_NDK_TOOLS_PREFIX=x86_64-linux-android
|
|
|
|
ANDROID_NDK_TOOLCHAIN_PREFIX=x86_64
|
|
|
|
ANDROID_PLATFORM_ARCH=arch-x86_64
|
|
|
|
;;
|
2013-11-13 14:15:07 +00:00
|
|
|
*)
|
|
|
|
echo "ERROR: Unknown android arch $CFG_DEFAULT_ANDROID_TARGET_ARCH"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
2014-10-30 12:03:00 +00:00
|
|
|
QMAKE_CONF_COMPILER=$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/$ANDROID_NDK_TOOLCHAIN_PREFIX-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST/bin/$ANDROID_NDK_TOOLS_PREFIX-g++
|
2013-11-13 14:15:07 +00:00
|
|
|
TEST_COMPILER="$QMAKE_CONF_COMPILER --sysroot=$CFG_DEFAULT_ANDROID_NDK_ROOT/platforms/$CFG_DEFAULT_ANDROID_PLATFORM/$ANDROID_PLATFORM_ARCH/"
|
2014-09-30 08:34:00 +00:00
|
|
|
if [ "$CFG_ANDROID_STYLE_ASSETS" = "yes" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG android-style-assets"
|
|
|
|
fi
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
GCC_MACHINE_DUMP=
|
|
|
|
case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
|
|
|
|
if [ -n "$GCC_MACHINE_DUMP" ]; then
|
|
|
|
DeviceVar set GCC_MACHINE_DUMP $($TEST_COMPILER -dumpmachine)
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then
|
|
|
|
SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
|
|
|
|
else
|
|
|
|
SYSROOT_FLAG=
|
|
|
|
fi
|
|
|
|
export SYSROOT_FLAG # used by config.tests/unix/{compile.test,arch.test}
|
2012-09-10 15:39:44 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
# Auto-detect default include and library search paths.
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
# Use intermediate variable to get around backtick/quote nesting problems.
|
|
|
|
awkprog='
|
|
|
|
BEGIN { ORS = ""; FS = "="; incs = 0; libs = 0; }
|
2011-05-18 14:35:04 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
function normalize(dir)
|
|
|
|
{
|
|
|
|
do {
|
|
|
|
odir = dir
|
2014-01-14 14:30:35 +00:00
|
|
|
sub(/\/[^\/]+\/\.\./, "", dir)
|
2013-11-13 14:15:07 +00:00
|
|
|
} while (dir != odir);
|
|
|
|
do {
|
|
|
|
odir = dir
|
|
|
|
gsub(/\/\./, "", dir)
|
|
|
|
} while (dir != odir);
|
|
|
|
sub("/$", "", dir);
|
|
|
|
return dir;
|
|
|
|
}
|
2012-03-07 14:07:07 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
# extract include paths from indented lines between
|
|
|
|
# #include <...> search starts here:
|
|
|
|
# and
|
|
|
|
# End of search list.
|
|
|
|
/^\#include </ { yup=1; print "DEFAULT_INCDIRS=\""; next }
|
|
|
|
/^End of search/ { yup=0; print "\"\n" }
|
|
|
|
/ \(framework directory\)$/ { next }
|
|
|
|
yup { print normalize(substr($0, 2)) "\n"; ++incs }
|
2012-02-28 09:00:32 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
# extract from one line like LIBRARY_PATH=/one/path:/another/path:...
|
|
|
|
$1 == "LIBRARY_PATH" {
|
|
|
|
libs = split($2, library_paths, ":");
|
|
|
|
print "DEFAULT_LIBDIRS=\"";
|
|
|
|
for (lib in library_paths) {
|
|
|
|
dir = normalize(library_paths[lib]);
|
|
|
|
if (!(dir in dirs)) {
|
|
|
|
print dir "\n";
|
|
|
|
dirs[dir] = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
print "\"\n"
|
|
|
|
}
|
2012-07-02 21:30:41 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
END {
|
|
|
|
if (incs == 0)
|
|
|
|
print "DEFAULT_INCDIRS=\"/usr/include\n/usr/local/include\"\n";
|
|
|
|
if (libs == 0)
|
|
|
|
print "DEFAULT_LIBDIRS=\"/lib\n/usr/lib\"\n";
|
|
|
|
}'
|
2012-07-16 13:13:18 +00:00
|
|
|
|
2015-10-18 20:11:28 +00:00
|
|
|
awkprog_result=`LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null | $AWK "$awkprog"`
|
|
|
|
eval "$awkprog_result"
|
|
|
|
[ "$OPT_VERBOSE" = "yes" ] && echo "$awkprog_result"
|
2012-04-18 22:57:00 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
#setup the build parts
|
|
|
|
if [ -z "$CFG_BUILD_PARTS" ]; then
|
|
|
|
CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
# build tests by default, if a developer build
|
|
|
|
if [ "$CFG_DEV" = "yes" ]; then
|
|
|
|
CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
|
|
|
|
fi
|
2012-03-28 03:38:00 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
# don't build tools by default when cross-compiling
|
|
|
|
if [ "$PLATFORM" != "$XPLATFORM" ]; then
|
2013-12-05 18:44:09 +00:00
|
|
|
CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed 's, tools,,g'`
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
for nobuild in $CFG_NOBUILD_PARTS; do
|
|
|
|
CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
|
|
|
|
done
|
|
|
|
if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
|
|
|
|
# echo
|
|
|
|
# echo "WARNING: libs is a required part of the build."
|
|
|
|
# echo
|
|
|
|
CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2014-12-04 15:03:13 +00:00
|
|
|
# postprocess installation and deployment paths
|
2013-11-13 14:15:07 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2011-10-14 13:55:35 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
if [ -z "$QT_INSTALL_PREFIX" ]; then
|
|
|
|
if [ "$CFG_DEV" = "yes" ]; then
|
|
|
|
QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
|
|
|
|
else
|
|
|
|
QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
|
|
|
|
fi
|
|
|
|
fi
|
2014-11-28 13:28:49 +00:00
|
|
|
QT_INSTALL_PREFIX=`makeabs "$QT_INSTALL_PREFIX"`
|
2011-10-14 13:55:35 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_EXT_PREFIX" ]; then
|
|
|
|
QT_EXT_PREFIX=$QT_INSTALL_PREFIX
|
|
|
|
if [ -n "$CFG_SYSROOT" ]; then
|
|
|
|
QMAKE_SYSROOTIFY=true
|
|
|
|
else
|
|
|
|
QMAKE_SYSROOTIFY=false
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
QT_EXT_PREFIX=`makeabs "$QT_EXT_PREFIX"`
|
|
|
|
QMAKE_SYSROOTIFY=false
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$QT_HOST_PREFIX" ]; then
|
|
|
|
if $QMAKE_SYSROOTIFY; then
|
|
|
|
QT_HOST_PREFIX=$CFG_SYSROOT$QT_EXT_PREFIX
|
|
|
|
else
|
|
|
|
QT_HOST_PREFIX=$QT_EXT_PREFIX
|
|
|
|
fi
|
|
|
|
HAVE_HOST_PATH=false
|
|
|
|
else
|
|
|
|
QT_HOST_PREFIX=`makeabs "$QT_HOST_PREFIX"`
|
|
|
|
HAVE_HOST_PATH=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
#------- make the paths relative to the prefixes --------
|
|
|
|
|
|
|
|
PREFIX_COMPLAINTS=
|
|
|
|
PREFIX_REMINDER=false
|
|
|
|
while read basevar baseoption var option; do
|
|
|
|
eval path=\$QT_${basevar}_$var
|
|
|
|
[ -z "$path" ] && continue
|
|
|
|
path=`makeabs "$path"`
|
|
|
|
eval base=\$QT_${basevar}_PREFIX
|
|
|
|
rel=${path##$base}
|
|
|
|
if [ x"$rel" = x"$path" ]; then
|
|
|
|
if [ x"$option" != x"sysconf" ]; then
|
|
|
|
PREFIX_COMPLAINTS="$PREFIX_COMPLAINTS
|
|
|
|
NOTICE: -${option}dir is not a subdirectory of ${baseoption}prefix."
|
|
|
|
eval \$HAVE_${basevar}_PATH || PREFIX_REMINDER=true
|
|
|
|
fi
|
|
|
|
eval QT_REL_${basevar}_$var=\$rel
|
|
|
|
elif [ -z "$rel" ]; then
|
|
|
|
eval QT_REL_${basevar}_$var=.
|
|
|
|
else
|
|
|
|
eval QT_REL_${basevar}_$var=\${rel#/}
|
|
|
|
fi
|
|
|
|
done <<EOF
|
|
|
|
INSTALL - DOCS doc
|
|
|
|
INSTALL - HEADERS header
|
|
|
|
INSTALL - LIBS lib
|
|
|
|
INSTALL - LIBEXECS libexec
|
|
|
|
INSTALL - BINS bin
|
|
|
|
INSTALL - PLUGINS plugin
|
|
|
|
INSTALL - IMPORTS import
|
|
|
|
INSTALL - QML qml
|
|
|
|
INSTALL - ARCHDATA archdata
|
|
|
|
INSTALL - DATA data
|
|
|
|
INSTALL - TRANSLATIONS translation
|
|
|
|
INSTALL - EXAMPLES examples
|
|
|
|
INSTALL - TESTS tests
|
|
|
|
INSTALL - SETTINGS sysconf
|
|
|
|
HOST -host BINS hostbin
|
|
|
|
HOST -host LIBS hostlib
|
|
|
|
HOST -host DATA hostdata
|
|
|
|
EOF
|
|
|
|
$PREFIX_REMINDER && PREFIX_COMPLAINTS="$PREFIX_COMPLAINTS
|
|
|
|
Maybe you forgot to specify -prefix/-hostprefix?"
|
|
|
|
|
|
|
|
if [ -z "$QT_REL_INSTALL_HEADERS" ]; then
|
|
|
|
QT_REL_INSTALL_HEADERS=include
|
2012-09-18 18:15:18 +00:00
|
|
|
fi
|
2012-10-23 13:31:20 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_LIBS" ]; then
|
|
|
|
QT_REL_INSTALL_LIBS=lib
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
2012-12-22 02:31:54 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_BINS" ]; then
|
|
|
|
QT_REL_INSTALL_BINS=bin
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2011-10-14 13:55:35 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_ARCHDATA" ]; then
|
|
|
|
QT_REL_INSTALL_ARCHDATA=.
|
|
|
|
fi
|
|
|
|
if [ x"$QT_REL_INSTALL_ARCHDATA" != x. ]; then
|
|
|
|
QT_REL_INSTALL_ARCHDATA_PREFIX=$QT_REL_INSTALL_ARCHDATA/
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_LIBEXECS" ]; then
|
|
|
|
if [ "$XPLATFORM_MINGW" = "yes" ]; then
|
|
|
|
QT_REL_INSTALL_LIBEXECS=${QT_REL_INSTALL_ARCHDATA_PREFIX}bin
|
|
|
|
else
|
|
|
|
QT_REL_INSTALL_LIBEXECS=${QT_REL_INSTALL_ARCHDATA_PREFIX}libexec
|
|
|
|
fi
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_PLUGINS" ]; then
|
|
|
|
QT_REL_INSTALL_PLUGINS=${QT_REL_INSTALL_ARCHDATA_PREFIX}plugins
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_IMPORTS" ]; then
|
|
|
|
QT_REL_INSTALL_IMPORTS=${QT_REL_INSTALL_ARCHDATA_PREFIX}imports
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_QML" ]; then
|
|
|
|
QT_REL_INSTALL_QML=${QT_REL_INSTALL_ARCHDATA_PREFIX}qml
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
2012-09-18 18:15:18 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_DATA" ]; then
|
|
|
|
QT_REL_INSTALL_DATA=.
|
|
|
|
fi
|
|
|
|
if [ x"$QT_REL_INSTALL_DATA" != x. ]; then
|
|
|
|
QT_REL_INSTALL_DATA_PREFIX=$QT_REL_INSTALL_DATA/
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$QT_REL_INSTALL_DOCS" ]; then
|
|
|
|
QT_REL_INSTALL_DOCS=${QT_REL_INSTALL_DATA_PREFIX}doc
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
2012-09-18 18:15:18 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_TRANSLATIONS" ]; then
|
|
|
|
QT_REL_INSTALL_TRANSLATIONS=${QT_REL_INSTALL_DATA_PREFIX}translations
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
2012-09-18 18:15:18 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_EXAMPLES" ]; then
|
|
|
|
QT_REL_INSTALL_EXAMPLES=examples
|
2012-09-18 18:15:18 +00:00
|
|
|
fi
|
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_TESTS" ]; then
|
|
|
|
QT_REL_INSTALL_TESTS=tests
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_INSTALL_SETTINGS" ]; then
|
2013-11-12 21:01:44 +00:00
|
|
|
if [ "$XPLATFORM_MAC" = "yes" ]; then
|
2014-12-04 15:03:13 +00:00
|
|
|
QT_REL_INSTALL_SETTINGS=/Library/Preferences/Qt
|
2013-11-13 14:15:07 +00:00
|
|
|
else
|
2014-12-04 15:03:13 +00:00
|
|
|
QT_REL_INSTALL_SETTINGS=etc/xdg
|
|
|
|
fi
|
2013-03-04 09:16:42 +00:00
|
|
|
fi
|
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
#------- host paths --------
|
2013-03-04 09:16:42 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_HOST_BINS" ]; then
|
|
|
|
if $HAVE_HOST_PATH; then
|
|
|
|
QT_REL_HOST_BINS=bin
|
2013-11-13 14:15:07 +00:00
|
|
|
else
|
2014-12-04 15:03:13 +00:00
|
|
|
QT_REL_HOST_BINS=$QT_REL_INSTALL_BINS
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_HOST_LIBS" ]; then
|
|
|
|
if $HAVE_HOST_PATH; then
|
|
|
|
QT_REL_HOST_LIBS=lib
|
2013-11-13 14:15:07 +00:00
|
|
|
else
|
2014-12-04 15:03:13 +00:00
|
|
|
QT_REL_HOST_LIBS=$QT_REL_INSTALL_LIBS
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -z "$QT_REL_HOST_DATA" ]; then
|
|
|
|
if $HAVE_HOST_PATH; then
|
|
|
|
QT_REL_HOST_DATA=.
|
2013-11-13 14:15:07 +00:00
|
|
|
else
|
2014-12-04 15:03:13 +00:00
|
|
|
QT_REL_HOST_DATA=$QT_REL_INSTALL_ARCHDATA
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2013-11-13 14:15:07 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-11-13 14:15:07 +00:00
|
|
|
if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG compile_examples"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
shortxspec=`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`
|
|
|
|
shortspec=`echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`
|
|
|
|
|
|
|
|
QT_CONFIGURE_STR_OFF=0
|
|
|
|
|
|
|
|
addConfStr()
|
|
|
|
{
|
|
|
|
QT_CONFIGURE_STR_OFFSETS="$QT_CONFIGURE_STR_OFFSETS $QT_CONFIGURE_STR_OFF,"
|
|
|
|
QT_CONFIGURE_STRS="$QT_CONFIGURE_STRS \"$1\\0\"
|
|
|
|
"
|
|
|
|
count=`echo "$1" | wc -c`
|
|
|
|
QT_CONFIGURE_STR_OFF=`expr $QT_CONFIGURE_STR_OFF + $count`
|
|
|
|
}
|
|
|
|
|
|
|
|
QT_CONFIGURE_STR_OFFSETS=
|
|
|
|
QT_CONFIGURE_STRS=
|
|
|
|
addConfStr "$QT_REL_INSTALL_DOCS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_HEADERS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_LIBS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_LIBEXECS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_BINS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_PLUGINS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_IMPORTS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_QML"
|
|
|
|
addConfStr "$QT_REL_INSTALL_ARCHDATA"
|
|
|
|
addConfStr "$QT_REL_INSTALL_DATA"
|
|
|
|
addConfStr "$QT_REL_INSTALL_TRANSLATIONS"
|
|
|
|
addConfStr "$QT_REL_INSTALL_EXAMPLES"
|
|
|
|
addConfStr "$QT_REL_INSTALL_TESTS"
|
|
|
|
QT_CONFIGURE_STR_OFFSETS_ALL=$QT_CONFIGURE_STR_OFFSETS
|
|
|
|
QT_CONFIGURE_STRS_ALL=$QT_CONFIGURE_STRS
|
|
|
|
|
|
|
|
QT_CONFIGURE_STR_OFFSETS=
|
|
|
|
QT_CONFIGURE_STRS=
|
|
|
|
addConfStr "$CFG_SYSROOT"
|
|
|
|
addConfStr "$QT_REL_HOST_BINS"
|
|
|
|
addConfStr "$QT_REL_HOST_LIBS"
|
|
|
|
addConfStr "$QT_REL_HOST_DATA"
|
|
|
|
addConfStr "$shortxspec"
|
|
|
|
addConfStr "$shortspec"
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# generate qconfig.cpp
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
[ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
|
|
|
|
|
|
|
|
cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
|
|
|
|
/* Installation date */
|
2015-02-05 06:37:13 +00:00
|
|
|
static const char qt_configure_installation [12+11] = "qt_instdate=2012-12-20";
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
/* Installation Info */
|
2014-12-04 15:03:13 +00:00
|
|
|
static const char qt_configure_prefix_path_str [256 + 12] = "qt_prfxpath=$QT_INSTALL_PREFIX";
|
2014-12-03 21:07:29 +00:00
|
|
|
#ifdef QT_BUILD_QMAKE
|
|
|
|
static const char qt_configure_ext_prefix_path_str [256 + 12] = "qt_epfxpath=$QT_EXT_PREFIX";
|
2014-12-04 15:03:13 +00:00
|
|
|
static const char qt_configure_host_prefix_path_str [256 + 12] = "qt_hpfxpath=$QT_HOST_PREFIX";
|
2012-02-28 19:57:38 +00:00
|
|
|
#endif
|
2013-08-09 11:34:04 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
static const short qt_configure_str_offsets[] = {
|
|
|
|
$QT_CONFIGURE_STR_OFFSETS_ALL
|
2013-08-09 11:34:04 +00:00
|
|
|
#ifdef QT_BUILD_QMAKE
|
2014-12-04 15:03:13 +00:00
|
|
|
$QT_CONFIGURE_STR_OFFSETS
|
2013-08-09 11:34:04 +00:00
|
|
|
#endif
|
2014-12-04 15:03:13 +00:00
|
|
|
};
|
|
|
|
static const char qt_configure_strs[] =
|
|
|
|
$QT_CONFIGURE_STRS_ALL#ifdef QT_BUILD_QMAKE
|
|
|
|
$QT_CONFIGURE_STRS#endif
|
|
|
|
;
|
|
|
|
|
|
|
|
#define QT_CONFIGURE_SETTINGS_PATH "$QT_REL_INSTALL_SETTINGS"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
#ifdef QT_BUILD_QMAKE
|
|
|
|
# define QT_CONFIGURE_SYSROOTIFY_PREFIX $QMAKE_SYSROOTIFY
|
|
|
|
#endif
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12
|
|
|
|
#ifdef QT_BUILD_QMAKE
|
2014-12-03 21:07:29 +00:00
|
|
|
# define QT_CONFIGURE_EXT_PREFIX_PATH qt_configure_ext_prefix_path_str + 12
|
2014-12-04 15:03:13 +00:00
|
|
|
# define QT_CONFIGURE_HOST_PREFIX_PATH qt_configure_host_prefix_path_str + 12
|
|
|
|
#endif
|
2011-04-27 10:05:43 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
# avoid unecessary rebuilds by copying only if qconfig.cpp has changed
|
|
|
|
if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
|
|
|
|
rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
|
|
|
|
else
|
|
|
|
[ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
|
|
|
|
mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
|
|
|
|
chmod -w "$outpath/src/corelib/global/qconfig.cpp"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# build qmake
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# symlink includes
|
2013-05-28 19:34:05 +00:00
|
|
|
if [ -e "$relpath/.git" ]; then
|
|
|
|
if [ -z "$PERL" ]; then
|
|
|
|
echo
|
|
|
|
echo "You need perl in your PATH to make a build from GIT."
|
|
|
|
echo "Cannot proceed."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-09-18 01:17:40 +00:00
|
|
|
"$relpath/bin/syncqt.pl" -version $QT_VERSION -minimal -module QtCore "$relpath" || exit 1
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2012-01-31 11:49:53 +00:00
|
|
|
# $1: input variable name (awk regexp)
|
|
|
|
# $2: optional output variable name
|
|
|
|
# $3: optional value transformation (sed command)
|
2011-04-27 10:05:43 +00:00
|
|
|
# relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
|
|
|
|
# is where the resulting variable is written to
|
|
|
|
setBootstrapVariable()
|
|
|
|
{
|
2012-01-31 11:49:53 +00:00
|
|
|
getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# build qmake
|
|
|
|
if true; then ###[ '!' -f "$outpath/bin/qmake" ];
|
2013-03-12 19:00:37 +00:00
|
|
|
echo "Creating qmake..."
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-03-09 09:50:23 +00:00
|
|
|
mkdir -p "$outpath/qmake" || exit
|
2011-04-27 10:05:43 +00:00
|
|
|
# fix makefiles
|
|
|
|
for mkfile in GNUmakefile Makefile; do
|
|
|
|
EXTRA_LFLAGS=
|
|
|
|
EXTRA_CFLAGS=
|
|
|
|
in_mkfile="${mkfile}.in"
|
|
|
|
if [ "$mkfile" = "Makefile" ]; then
|
|
|
|
# if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
|
|
|
|
# (cd qmake && qmake) >/dev/null 2>&1 && continue
|
|
|
|
# fi
|
|
|
|
in_mkfile="${mkfile}.unix"
|
|
|
|
fi
|
|
|
|
in_mkfile="$relpath/qmake/$in_mkfile"
|
|
|
|
mkfile="$outpath/qmake/$mkfile"
|
|
|
|
if [ -f "$mkfile" ]; then
|
|
|
|
[ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
|
|
|
|
rm -f "$mkfile"
|
|
|
|
fi
|
|
|
|
[ -f "$in_mkfile" ] || continue
|
|
|
|
|
|
|
|
echo "########################################################################" > "$mkfile"
|
|
|
|
echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
|
|
|
|
echo "########################################################################" >> "$mkfile"
|
|
|
|
EXTRA_OBJS=
|
|
|
|
EXTRA_SRCS=
|
2014-05-12 00:43:51 +00:00
|
|
|
EXTRA_CFLAGS="\$(QMAKE_CFLAGS) \$(QMAKE_CFLAGS_SPLIT_SECTIONS)"
|
2015-07-15 23:11:11 +00:00
|
|
|
EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS) \$(QMAKE_CXXFLAGS_CXX11) \$(QMAKE_CXXFLAGS_SPLIT_SECTIONS)"
|
2014-05-06 18:27:06 +00:00
|
|
|
EXTRA_LFLAGS="\$(QMAKE_LFLAGS) \$(QMAKE_LFLAGS_GCSECTIONS)"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
|
|
|
|
EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
|
|
|
|
fi
|
|
|
|
|
2012-01-31 11:49:53 +00:00
|
|
|
[ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
|
|
|
|
setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
|
|
|
|
setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
|
2011-04-27 10:05:43 +00:00
|
|
|
setBootstrapVariable QMAKE_CFLAGS
|
2014-05-12 00:43:51 +00:00
|
|
|
setBootstrapVariable QMAKE_CFLAGS_SPLIT_SECTIONS
|
2012-01-31 11:49:53 +00:00
|
|
|
setBootstrapVariable QMAKE_CXXFLAGS
|
2015-07-15 23:11:11 +00:00
|
|
|
setBootstrapVariable QMAKE_CXXFLAGS_CXX11
|
2014-05-12 00:43:51 +00:00
|
|
|
setBootstrapVariable QMAKE_CXXFLAGS_SPLIT_SECTIONS
|
2011-04-27 10:05:43 +00:00
|
|
|
setBootstrapVariable QMAKE_LFLAGS
|
2014-05-06 18:27:06 +00:00
|
|
|
setBootstrapVariable QMAKE_LFLAGS_GCSECTIONS
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-05-11 17:27:54 +00:00
|
|
|
if [ "$CFG_DEBUG" = "no" ] || [ "$CFG_RELEASE_TOOLS" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
setBootstrapVariable QMAKE_CFLAGS_RELEASE
|
2012-01-31 11:49:53 +00:00
|
|
|
setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
|
2011-04-27 10:05:43 +00:00
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
|
|
|
|
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
|
2016-04-27 13:14:55 +00:00
|
|
|
else
|
2011-04-27 10:05:43 +00:00
|
|
|
setBootstrapVariable QMAKE_CFLAGS_DEBUG
|
2012-01-31 11:49:53 +00:00
|
|
|
setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
|
2011-04-27 10:05:43 +00:00
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
|
|
|
|
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
|
|
|
|
fi
|
|
|
|
|
2015-10-12 07:55:30 +00:00
|
|
|
case `basename "$PLATFORM"` in
|
|
|
|
win32-g++*)
|
2016-03-18 07:45:27 +00:00
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS -DUNICODE"
|
|
|
|
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DUNICODE"
|
2013-02-02 12:31:53 +00:00
|
|
|
EXTRA_OBJS="qfilesystemengine_win.o \
|
|
|
|
qfilesystemiterator_win.o \
|
|
|
|
qfsfileengine_win.o \
|
|
|
|
qlocale_win.o \
|
|
|
|
qsettings_win.o \
|
|
|
|
qsystemlibrary.o \
|
|
|
|
registry.o"
|
|
|
|
EXTRA_SRCS="\"\$(SOURCE_PATH)/src/corelib/corelib/io/qfilesystemengine_win.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_win.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/io/qsettings_win.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/tools/qlocale_win.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/plugin/qsystemlibrary.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/tools/shared/windows/registry.cpp\""
|
2016-03-18 07:45:27 +00:00
|
|
|
EXTRA_LFLAGS="$EXTRA_LFLAGS -static -s -lole32 -luuid -ladvapi32 -lkernel32"
|
2013-02-02 12:31:53 +00:00
|
|
|
EXEEXT=".exe"
|
2015-10-12 07:55:30 +00:00
|
|
|
;;
|
|
|
|
*)
|
2013-02-02 12:31:53 +00:00
|
|
|
EXTRA_OBJS="qfilesystemengine_unix.o \
|
|
|
|
qfilesystemiterator_unix.o \
|
|
|
|
qfsfileengine_unix.o \
|
|
|
|
qlocale_unix.o"
|
|
|
|
EXTRA_SRCS="\"\$(SOURCE_PATH)/src/corelib/io/qfilesystemengine_unix.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_unix.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/io/qfsfileengine_unix.cpp\" \
|
2014-04-09 11:49:30 +00:00
|
|
|
\"\$(SOURCE_PATH)/src/corelib/tools/qlocale_unix.cpp\""
|
2013-02-02 12:31:53 +00:00
|
|
|
EXEEXT=
|
2015-10-12 07:55:30 +00:00
|
|
|
;;
|
|
|
|
esac
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2014-06-13 22:59:30 +00:00
|
|
|
echo "COCOA_LFLAGS =-framework Foundation -framework CoreServices" >>"$mkfile"
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
|
|
|
|
echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
|
2014-06-13 22:59:30 +00:00
|
|
|
EXTRA_LFLAGS="$EXTRA_LFLAGS \$(COCOA_LFLAGS)"
|
2011-04-27 10:05:43 +00:00
|
|
|
EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
|
2013-02-27 14:01:25 +00:00
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
|
|
|
|
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
|
2013-02-02 12:31:53 +00:00
|
|
|
EXTRA_OBJS="$EXTRA_OBJS \
|
|
|
|
qsettings_mac.o \
|
2014-06-13 22:59:30 +00:00
|
|
|
qcore_mac.o \
|
|
|
|
qcore_mac_objc.o"
|
2013-02-02 12:31:53 +00:00
|
|
|
EXTRA_SRCS="$EXTRA_SRCS \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/io/qsettings_mac.cpp\" \
|
2014-06-13 22:59:30 +00:00
|
|
|
\"\$(SOURCE_PATH)/src/corelib/kernel/qcore_mac.cpp\" \
|
|
|
|
\"\$(SOURCE_PATH)/src/corelib/kernel/qcore_mac_objc.mm\""
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2015-10-12 07:55:30 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
echo >>"$mkfile"
|
|
|
|
adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
|
|
|
|
adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
|
|
|
|
adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
|
2013-02-02 12:31:53 +00:00
|
|
|
|
2014-11-20 14:33:54 +00:00
|
|
|
echo "BUILD_PATH = .." >> "$mkfile"
|
2013-02-02 12:31:53 +00:00
|
|
|
echo "SOURCE_PATH = $adjrelpath" >> "$mkfile"
|
2013-05-28 19:34:05 +00:00
|
|
|
if [ -e "$relpath/.git" ]; then
|
|
|
|
echo 'INC_PATH = $(BUILD_PATH)/include' >> "$mkfile"
|
|
|
|
else
|
|
|
|
echo 'INC_PATH = $(SOURCE_PATH)/include' >> "$mkfile"
|
|
|
|
fi
|
2013-02-02 12:31:53 +00:00
|
|
|
echo "QMAKESPEC = $adjqmakespec" >> "$mkfile"
|
|
|
|
echo "QT_VERSION = $QT_VERSION" >> "$mkfile"
|
2015-09-18 01:17:40 +00:00
|
|
|
echo "QT_MAJOR_VERSION = $QT_MAJOR_VERSION" >> "$mkfile"
|
|
|
|
echo "QT_MINOR_VERSION = $QT_MINOR_VERSION" >> "$mkfile"
|
|
|
|
echo "QT_PATCH_VERSION = $QT_PATCH_VERSION" >> "$mkfile"
|
2013-02-02 12:31:53 +00:00
|
|
|
echo "EXTRA_CFLAGS = $EXTRA_CFLAGS" >> "$mkfile"
|
|
|
|
echo "EXTRA_CXXFLAGS = $EXTRA_CXXFLAGS" >> "$mkfile"
|
2013-06-14 14:48:24 +00:00
|
|
|
echo "QTOBJS =" $EXTRA_OBJS >> "$mkfile"
|
|
|
|
echo "QTSRCS =" $EXTRA_SRCS >> "$mkfile"
|
2013-02-02 12:31:53 +00:00
|
|
|
echo "LFLAGS = $EXTRA_LFLAGS" >> "$mkfile"
|
|
|
|
echo "EXEEXT = $EXEEXT" >> "$mkfile"
|
|
|
|
echo "RM_F = rm -f" >> "$mkfile"
|
|
|
|
echo "RM_RF = rm -rf" >> "$mkfile"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-01-22 11:36:35 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
|
|
|
echo "EXTRA_CXXFLAGS += -MMD" >> "$mkfile"
|
|
|
|
cat "$in_mkfile" >> "$mkfile"
|
|
|
|
echo "-include \$(notdir \$(DEPEND_SRC:%.cpp=%.d))" >> "$mkfile"
|
|
|
|
else
|
|
|
|
cat "$in_mkfile" >> "$mkfile"
|
|
|
|
if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
|
|
|
|
(cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
|
|
|
|
sed 's,^.*/\([^/]*.o\):,\1:,g' "$mkfile" >"$mkfile.tmp"
|
|
|
|
sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
|
|
|
|
rm "$mkfile.tmp"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2014-11-20 05:56:53 +00:00
|
|
|
if [ "$OPT_VERBOSE" = yes ]; then
|
|
|
|
# Show the output of make
|
|
|
|
(cd "$outpath/qmake"; "$MAKE") || exit 2
|
|
|
|
else
|
|
|
|
# Hide the output of make
|
2015-03-16 19:29:25 +00:00
|
|
|
# Use bash to print dots, if we have it, and stdout is a tty.
|
|
|
|
if test -t 1 && $WHICH bash > /dev/null 2>/dev/null; then
|
2014-11-20 05:56:53 +00:00
|
|
|
bash -c 'set -o pipefail
|
|
|
|
cd "$0/qmake"; "$1" | while read line; do
|
|
|
|
builtin echo -n .
|
|
|
|
done' "$outpath" "$MAKE" || exit 2
|
|
|
|
else
|
|
|
|
(cd "$outpath/qmake"; "$MAKE" -s) || exit 2
|
|
|
|
fi
|
|
|
|
echo "Done."
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
fi # Build qmake
|
|
|
|
|
2012-05-03 13:36:03 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# create a qt.conf for the Qt build tree itself
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
QTCONFFILE="$outpath/bin/qt.conf"
|
|
|
|
cat > "$QTCONFFILE" <<EOF
|
|
|
|
[EffectivePaths]
|
|
|
|
Prefix=..
|
2015-12-21 17:13:23 +00:00
|
|
|
EOF
|
|
|
|
if [ -n "$CFG_HOST_QT_TOOLS_PATH" ]; then
|
|
|
|
cat >> "$QTCONFFILE" <<EOF
|
2015-10-12 07:55:30 +00:00
|
|
|
[Paths]
|
|
|
|
Prefix=$QT_EXT_PREFIX
|
2015-12-21 17:13:23 +00:00
|
|
|
Documentation=$QT_REL_INSTALL_DOCS
|
|
|
|
Headers=$QT_REL_INSTALL_HEADERS
|
|
|
|
Libraries=$QT_REL_INSTALL_LIBS
|
|
|
|
LibraryExecutables=$QT_REL_INSTALL_LIBEXECS
|
|
|
|
Binaries=$QT_REL_INSTALL_BINS
|
|
|
|
Plugins=$QT_REL_INSTALL_PLUGINS
|
|
|
|
Imports=$QT_REL_INSTALL_IMPORTS
|
|
|
|
Qml2Imports=$QT_REL_INSTALL_QML
|
|
|
|
ArchData=$QT_REL_INSTALL_ARCHDATA
|
|
|
|
Data=$QT_REL_INSTALL_DATA
|
|
|
|
Translations=$QT_REL_INSTALL_TRANSLATIONS
|
|
|
|
Examples=$QT_REL_INSTALL_EXAMPLES
|
|
|
|
Tests=$QT_REL_INSTALL_TESTS
|
|
|
|
HostPrefix=$QT_HOST_PREFIX
|
|
|
|
HostBinaries=$QT_REL_HOST_BINS
|
|
|
|
HostLibraries=$QT_REL_HOST_LIBS
|
|
|
|
HostData=$QT_REL_HOST_DATA
|
2015-12-09 14:58:55 +00:00
|
|
|
TargetSpec=$XPLATFORM
|
|
|
|
HostSpec=$PLATFORM
|
2012-05-03 13:36:03 +00:00
|
|
|
EOF
|
2015-12-21 17:13:23 +00:00
|
|
|
if [ -n "$CFG_SYSROOT" ]; then
|
|
|
|
cat >> "$QTCONFFILE" <<EOF
|
2015-10-12 07:55:30 +00:00
|
|
|
Sysroot=$CFG_SYSROOT
|
|
|
|
EOF
|
2015-12-21 17:13:23 +00:00
|
|
|
fi
|
2015-10-12 07:55:30 +00:00
|
|
|
fi
|
2013-05-08 14:29:11 +00:00
|
|
|
if [ x"$relpath" != x"$outpath" ]; then
|
|
|
|
cat >> "$QTCONFFILE" <<EOF
|
|
|
|
[EffectiveSourcePaths]
|
|
|
|
Prefix=$relpath
|
|
|
|
EOF
|
|
|
|
fi
|
2012-05-03 13:36:03 +00:00
|
|
|
|
2015-10-12 07:55:30 +00:00
|
|
|
[ -z "$CFG_HOST_QT_TOOLS_PATH" ] && CFG_HOST_QT_TOOLS_PATH="$outpath/bin"
|
|
|
|
CFG_QMAKE_PATH="$CFG_HOST_QT_TOOLS_PATH/qmake"
|
|
|
|
|
2012-09-14 08:03:18 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# write out device config before we run the test.
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
|
|
|
|
if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
|
|
|
|
rm -f "$DEVICE_VARS_FILE"
|
|
|
|
else
|
|
|
|
mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
|
|
|
|
DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
|
|
|
|
fi
|
|
|
|
|
2015-10-12 07:55:30 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# write out host config.
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
HOST_VARS_OUTFILE="$outpath/mkspecs/qhost.pri"
|
|
|
|
if cmp -s "$HOST_VARS_FILE" "$HOST_VARS_OUTFILE"; then
|
|
|
|
rm -f "$HOST_VARS_FILE"
|
|
|
|
else
|
|
|
|
mv -f $HOST_VARS_FILE "$HOST_VARS_OUTFILE"
|
|
|
|
HOST_VARS_FILE="$HOST_VARS_OUTFILE"
|
|
|
|
fi
|
|
|
|
|
2016-02-12 14:27:53 +00:00
|
|
|
|
|
|
|
echo "Running configuration tests..."
|
|
|
|
|
2012-10-31 13:11:14 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Verify makespec
|
|
|
|
#-------------------------------------------------------------------------------
|
2015-10-12 07:55:30 +00:00
|
|
|
QMAKE_OUTPUT=`"$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" -E -nocache -spec "$XQMAKESPEC" "QT=" $DEV_NULL 2>&1`
|
2012-10-31 13:11:14 +00:00
|
|
|
if [ $? != "0" ]; then
|
|
|
|
echo "Failed to process makespec for platform '$XPLATFORM'"
|
|
|
|
if [ "$OPT_VERBOSE" = "yes" ]; then
|
|
|
|
echo "$QMAKE_OUTPUT"
|
|
|
|
else
|
|
|
|
echo "Turn on verbose messaging (-v) to see the final report."
|
|
|
|
fi
|
|
|
|
exit 101
|
|
|
|
fi
|
|
|
|
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Detect pkg-config
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
if [ -z "$PKG_CONFIG" ]; then
|
|
|
|
# See if PKG_CONFIG is set in the mkspec:
|
2015-10-12 07:55:30 +00:00
|
|
|
PKG_CONFIG="`"$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" -E -nocache -spec "$XQMAKESPEC" "CONFIG=" $DEV_NULL 2>&1 | sed -n -e 's,^PKG_CONFIG = \(.*\),\1,p'`"
|
2014-10-29 20:21:22 +00:00
|
|
|
[ -n "$PKG_CONFIG" ] && [ "$OPT_VERBOSE" = "yes" ] && echo "Found pkg-config from mkspec: $PKG_CONFIG"
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
fi
|
|
|
|
if [ -z "$PKG_CONFIG" ]; then
|
|
|
|
PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
|
2014-10-29 20:21:22 +00:00
|
|
|
[ -n "$PKG_CONFIG" ] && [ "$OPT_VERBOSE" = "yes" ] && echo "Found pkg-config from \$PATH: $PKG_CONFIG"
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_PKGCONFIG" = "no" ]; then
|
|
|
|
PKG_CONFIG=
|
2014-10-29 20:21:22 +00:00
|
|
|
[ "$OPT_VERBOSE" = "yes" ] && echo "pkg-config support disabled."
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
elif [ -n "$PKG_CONFIG" ]; then
|
|
|
|
# found a pkg-config
|
|
|
|
if [ "$QT_CROSS_COMPILE" = "yes" ]; then
|
|
|
|
# when xcompiling, check environment to see if it's actually usable
|
|
|
|
if [ -z "$PKG_CONFIG_LIBDIR" ]; then
|
|
|
|
if [ -n "$CFG_SYSROOT" ] && [ -d "$CFG_SYSROOT/usr/lib/pkgconfig" ]; then
|
|
|
|
PKG_CONFIG_LIBDIR=$CFG_SYSROOT/usr/lib/pkgconfig:$CFG_SYSROOT/usr/share/pkgconfig
|
2012-05-31 21:58:32 +00:00
|
|
|
if [ -n "$GCC_MACHINE_DUMP" ]; then
|
|
|
|
PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:$CFG_SYSROOT/usr/lib/$GCC_MACHINE_DUMP/pkgconfig
|
|
|
|
fi
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
export PKG_CONFIG_LIBDIR
|
|
|
|
echo >&2 "Note: PKG_CONFIG_LIBDIR automatically set to $PKG_CONFIG_LIBDIR"
|
2014-11-20 07:02:14 +00:00
|
|
|
elif [ "$CFG_PKGCONFIG" = "auto" ]; then
|
|
|
|
PKG_CONFIG=
|
|
|
|
echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set and"
|
|
|
|
echo >&2 "the host's .pc files would be used (even if you set PKG_CONFIG_PATH)."
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
echo >&2 "Set this variable to the directory that contains target .pc files"
|
|
|
|
echo >&2 "for pkg-config to function correctly when cross-compiling or"
|
2014-11-20 07:02:14 +00:00
|
|
|
echo >&2 "use -pkg-config to override this test."
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
|
|
|
|
if [ -n "$CFG_SYSROOT" ]; then
|
|
|
|
PKG_CONFIG_SYSROOT_DIR=$CFG_SYSROOT
|
|
|
|
export PKG_CONFIG_SYSROOT_DIR
|
|
|
|
echo >&2 "Note: PKG_CONFIG_SYSROOT_DIR automatically set to $PKG_CONFIG_SYSROOT_DIR"
|
2014-11-20 07:02:14 +00:00
|
|
|
elif [ "$CFG_PKGCONFIG" = "auto" ]; then
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
PKG_CONFIG=
|
|
|
|
echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set."
|
2014-11-20 07:02:14 +00:00
|
|
|
echo >&2 "Set this variable to your sysroot for pkg-config to function correctly when"
|
|
|
|
echo >&2 "cross-compiling or use -pkg-config to override this test."
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2014-11-20 07:02:14 +00:00
|
|
|
if [ -n "$PKG_CONFIG" ]; then
|
|
|
|
CFG_PKGCONFIG=yes
|
|
|
|
else
|
|
|
|
CFG_PKGCONFIG=no
|
|
|
|
fi
|
configure: add -pkg-config option to control pkg-config usage
Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.
-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.
This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.
By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
automatically (provided $SYSROOT/usr/lib/pkgconfig exists).
If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.
If the value is 'no', pkg-config usage is disabled.
If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.
This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).
Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-04 22:02:11 +00:00
|
|
|
elif [ "$CFG_PKGCONFIG" = "yes" ]; then
|
|
|
|
echo >&2 "Could not detect pkg-config from mkspec or PATH."
|
|
|
|
exit 101
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$PKG_CONFIG" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG no-pkg-config"
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2016-02-12 14:27:53 +00:00
|
|
|
# run configure tests
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2012-08-12 08:14:59 +00:00
|
|
|
# parameters: path, name, extra args
|
|
|
|
compileTest()
|
|
|
|
{
|
|
|
|
path=config.tests/$1
|
|
|
|
name=$2
|
|
|
|
shift 2
|
2015-01-07 18:22:01 +00:00
|
|
|
# allow config tests which behave differently depending on the type of
|
|
|
|
# library being built (shared/static) e.g. see config.tests/unix/icu
|
|
|
|
test_config="$QMAKE_CONFIG shared"
|
|
|
|
if [ "$CFG_SHARED" = "no" ]; then
|
|
|
|
test_config="$QMAKE_CONFIG static"
|
|
|
|
fi
|
2015-08-01 20:31:55 +00:00
|
|
|
echo $ECHO_N "checking for $name... $ECHO_C"
|
2015-10-12 07:55:30 +00:00
|
|
|
"$unixtests/compile.test" "$XQMAKESPEC" "$test_config" $OPT_VERBOSE "$relpath" "$outpath" "$path" "$name" "$CFG_QMAKE_PATH" "$QTCONFFILE" $I_FLAGS $D_FLAGS $L_FLAGS "$@"
|
2012-08-12 08:14:59 +00:00
|
|
|
}
|
|
|
|
|
2014-12-08 14:32:55 +00:00
|
|
|
compileTestWithPkgConfig()
|
|
|
|
{
|
|
|
|
if [ $# -lt 4 ]; then
|
|
|
|
echo "CompileTestWithPkgConfig requires at least 4 arguments."
|
|
|
|
echo "compileTestWithPkgConfig pkg_name configtest configtest_name qmake_postfix + additional arguments to compileTest"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
local pkg_name=$1
|
|
|
|
local configtest=$2
|
|
|
|
local configtest_name="$3"
|
|
|
|
local qmake_postfix=$4
|
|
|
|
shift 4
|
|
|
|
|
|
|
|
local has_used_pkg_config="no"
|
|
|
|
|
|
|
|
local incdir_raw incdir_mod cflags
|
|
|
|
local libdir_raw libdir_mod libs
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists $pkg_name 2>/dev/null; then
|
|
|
|
incdir_raw=`$PKG_CONFIG --cflags-only-I $pkg_name 2>/dev/null`
|
|
|
|
cflags=`$PKG_CONFIG --cflags-only-other $pkg_name 2>/dev/null`
|
|
|
|
libdir_raw=`$PKG_CONFIG --libs-only-L $pkg_name 2>/dev/null`
|
|
|
|
libs=`$PKG_CONFIG --libs-only-l --libs-only-other $pkg_name 2>/dev/null`
|
|
|
|
incdir_mod=`echo $incdir_raw | sed -e 's,^-I,,g' -e 's, -I, ,g'`
|
|
|
|
libdir_mod=`echo $libdir_raw | sed -e 's,^-L,,g' -e 's, -L, ,g'`
|
|
|
|
has_used_pkg_config="yes"
|
|
|
|
fi
|
2015-07-16 08:16:30 +00:00
|
|
|
if compileTest $configtest "$configtest_name" $libdir_raw $incdir_raw $libs $cflags "$@"; then
|
2014-12-08 14:32:55 +00:00
|
|
|
if [ "$has_used_pkg_config" = "yes" ] && [ -n "$qmake_postfix" ]; then
|
|
|
|
QMakeVar set QMAKE_INCDIR_$qmake_postfix "`shellArgumentListToQMakeList $incdir_mod`"
|
|
|
|
QMakeVar set QMAKE_LIBDIR_$qmake_postfix "`shellArgumentListToQMakeList $libdir_mod`"
|
|
|
|
QMakeVar set QMAKE_LIBS_$qmake_postfix "`shellArgumentListToQMakeList $libs`"
|
|
|
|
QMakeVar set QMAKE_CFLAGS_$qmake_postfix "`shellArgumentListToQMakeList $cflags`"
|
|
|
|
fi
|
|
|
|
return 0
|
|
|
|
else
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-02-14 09:01:17 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# determine the target and host architectures
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2012-07-20 13:26:07 +00:00
|
|
|
# Use config.tests/arch/arch.pro to have the compiler tell us what the target architecture is
|
2012-03-27 17:43:45 +00:00
|
|
|
OUTFILE=$outpath/arch.result
|
2015-10-12 07:55:30 +00:00
|
|
|
"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "target" $CFG_QMAKE_PATH $QTCONFFILE $I_FLAGS $D_FLAGS $L_FLAGS
|
2012-03-27 17:43:45 +00:00
|
|
|
if [ $? -eq 0 ]; then
|
2011-12-31 22:40:49 +00:00
|
|
|
eval `cat "$OUTFILE"`
|
2012-03-27 17:43:45 +00:00
|
|
|
else
|
|
|
|
echo
|
|
|
|
echo "Could not determine the target architecture!"
|
|
|
|
echo "Turn on verbose messaging (-v) to see the final report."
|
|
|
|
fi
|
|
|
|
rm -f "$OUTFILE" 2>/dev/null
|
2012-02-14 09:01:17 +00:00
|
|
|
[ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
|
2012-03-27 17:43:45 +00:00
|
|
|
|
2012-02-14 09:01:17 +00:00
|
|
|
if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
|
|
|
|
# Do the same test again, using the host compiler
|
2015-10-12 07:55:30 +00:00
|
|
|
SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "host" $CFG_QMAKE_PATH $QTCONFFILE $I_FLAGS $D_FLAGS $L_FLAGS
|
2012-03-27 17:43:45 +00:00
|
|
|
if [ $? -eq 0 ]; then
|
2011-12-31 22:40:49 +00:00
|
|
|
eval `cat "$OUTFILE"`
|
2012-03-27 17:43:45 +00:00
|
|
|
else
|
|
|
|
echo
|
|
|
|
echo "Could not determine the host architecture!"
|
|
|
|
echo "Turn on verbose messaging (-v) to see the final report."
|
|
|
|
fi
|
|
|
|
rm -f "$OUTFILE" 2>/dev/null
|
2012-02-14 09:01:17 +00:00
|
|
|
[ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
|
|
|
|
else
|
|
|
|
# not cross compiling, host == target
|
|
|
|
CFG_HOST_ARCH="$CFG_ARCH"
|
2011-12-31 22:40:49 +00:00
|
|
|
CFG_HOST_CPUFEATURES="$CFG_CPUFEATURES"
|
2012-02-14 09:01:17 +00:00
|
|
|
fi
|
2012-03-27 17:43:45 +00:00
|
|
|
unset OUTFILE
|
2012-02-14 09:01:17 +00:00
|
|
|
|
|
|
|
if [ "$OPT_VERBOSE" = "yes" ]; then
|
|
|
|
echo "System architecture: '$CFG_ARCH'"
|
2012-03-26 20:13:58 +00:00
|
|
|
echo "Host architecture: '$CFG_HOST_ARCH'"
|
2012-02-14 09:01:17 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# functionality tests
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2016-02-12 14:27:53 +00:00
|
|
|
# auto-detect precompiled header support
|
|
|
|
if [ "$CFG_PRECOMPILE" = "auto" ]; then
|
|
|
|
if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
|
|
|
|
CFG_PRECOMPILE=no
|
|
|
|
else
|
|
|
|
CFG_PRECOMPILE=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# auto-detect -fvisibility support
|
|
|
|
if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
|
|
|
|
if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
|
|
|
|
if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
|
|
|
|
echo "-reduce-exports was requested but this compiler does not support it"
|
|
|
|
echo "Re-run configure with -v for more information"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CFG_REDUCE_EXPORTS=no
|
|
|
|
else
|
|
|
|
CFG_REDUCE_EXPORTS=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# auto-detect -fuse-ld=gold support
|
|
|
|
if [ "$CFG_USE_GOLD_LINKER" != "no" ]; then
|
|
|
|
if compilerSupportsFlag $TEST_COMPILER -fuse-ld=gold; then
|
|
|
|
CFG_USE_GOLD_LINKER=yes
|
|
|
|
else
|
|
|
|
if [ "$CFG_USE_GOLD_LINKER" = "yes" ]; then
|
|
|
|
echo "-use-gold-linker was requested but this compiler does not support it"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CFG_USE_GOLD_LINKER=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# auto-detect --enable-new-dtags support
|
|
|
|
if linkerSupportsFlag $TEST_COMPILER --enable-new-dtags; then
|
|
|
|
CFG_ENABLE_NEW_DTAGS=yes
|
|
|
|
else
|
|
|
|
CFG_ENABLE_NEW_DTAGS=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
# auto-detect -fstack-protector-strong support (for QNX only currently)
|
|
|
|
if [ "$XPLATFORM_QNX" = "yes" ]; then
|
|
|
|
if compilerSupportsFlag $TEST_COMPILER -fstack-protector-strong; then
|
|
|
|
CFG_STACK_PROTECTOR_STRONG=yes
|
|
|
|
else
|
|
|
|
CFG_STACK_PROTECTOR_STRONG=no
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
CFG_STACK_PROTECTOR_STRONG=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect the availability of the -Bsymbolic-functions linker optimization
|
|
|
|
if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
|
|
|
|
if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
|
|
|
|
if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
|
|
|
|
echo "-reduce-relocations was requested but this compiler does not support it"
|
|
|
|
echo "Re-run configure with -v for more information"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CFG_REDUCE_RELOCATIONS=no
|
|
|
|
else
|
|
|
|
CFG_REDUCE_RELOCATIONS=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# auto-detect GNU make support
|
|
|
|
if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
|
|
|
|
CFG_USE_GNUMAKE=yes
|
|
|
|
fi
|
|
|
|
|
|
|
|
# find the default framework value
|
|
|
|
if [ "$XPLATFORM_MAC" = "yes" ]; then
|
|
|
|
if [ "$CFG_FRAMEWORK" = "auto" ]; then
|
|
|
|
CFG_FRAMEWORK="$CFG_SHARED"
|
|
|
|
elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
|
|
|
|
echo
|
|
|
|
echo "WARNING: Using static linking will disable the use of Mac frameworks."
|
|
|
|
echo
|
|
|
|
CFG_FRAMEWORK="no"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
CFG_FRAMEWORK=no
|
|
|
|
fi
|
|
|
|
|
2014-04-11 11:30:03 +00:00
|
|
|
if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
|
2016-02-12 14:27:53 +00:00
|
|
|
# sanity-check for separate debug info
|
|
|
|
if [ "$CFG_SHARED" = "no" ]; then
|
|
|
|
echo "ERROR: -separate-debug-info is incompatible with -static"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ "$CFG_DEBUG" = "no" -a "$CFG_DEBUG_RELEASE" = "no" -a "$CFG_FORCEDEBUGINFO" = "no" ]; then
|
|
|
|
echo "ERROR: -separate-debug-info needs -debug, -debug-and-release, or -force-debug-info"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Detect objcopy support
|
2016-04-22 07:31:58 +00:00
|
|
|
if [ "$XPLATFORM_MAC" = "no" ]; then
|
|
|
|
if ! compileTest unix/objcopy "objcopy"; then
|
|
|
|
echo "ERROR: -separate-debug-info was requested but this binutils does not support it."
|
|
|
|
echo "Re-run configure with -v for more information"
|
|
|
|
exit 1
|
|
|
|
fi
|
2014-04-11 11:30:03 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-07-09 00:21:30 +00:00
|
|
|
# Detect C++11 & up support
|
|
|
|
stdcxx_error=false
|
2015-07-09 23:33:33 +00:00
|
|
|
if ! compileTest common/c++11 "C++11"; then
|
|
|
|
echo "ERROR: Qt requires a C++11 compiler and yours does not seem to be that."
|
|
|
|
echo "Please upgrade."
|
|
|
|
exit 1
|
2015-07-09 00:21:30 +00:00
|
|
|
elif [ "$CFG_STDCXX" = "c++11" ]; then
|
|
|
|
: # CFG_STDCXX is correct
|
|
|
|
elif ! compileTest common/c++14 "C++14"; then
|
|
|
|
if [ "$CFG_STDCXX" != "auto" ]; then
|
|
|
|
stdcxx_error=true
|
2012-05-29 05:10:09 +00:00
|
|
|
else
|
2015-07-09 00:21:30 +00:00
|
|
|
CFG_STDCXX="c++11"
|
2012-05-29 05:10:09 +00:00
|
|
|
fi
|
2015-07-09 00:21:30 +00:00
|
|
|
elif [ "$CFG_STDCXX" = "c++14" ]; then
|
|
|
|
: # CFG_STDCXX is correct
|
|
|
|
elif ! compileTest common/c++1z "C++1z"; then
|
|
|
|
if [ "$CFG_STDCXX" != "auto" ]; then
|
|
|
|
stdcxx_error=true
|
|
|
|
else
|
|
|
|
CFG_STDCXX="c++14"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
CFG_STDCXX="c++1z"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if $stdcxx_error && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "$CFG_STDCXX support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
2012-05-29 05:10:09 +00:00
|
|
|
fi
|
|
|
|
|
2015-09-08 23:35:33 +00:00
|
|
|
# Detect whether 64-bit std::atomic works -- some 32-bit platforms require extra library support
|
|
|
|
if compileTest common/atomic64 "64-bit std::atomic"; then
|
2016-03-15 08:46:32 +00:00
|
|
|
CFG_STD_ATOMIC64=yes
|
2015-09-08 23:35:33 +00:00
|
|
|
elif compileTest common/atomic64 "64-bit std::atomic in -latomic" -latomic; then
|
2016-03-15 08:46:32 +00:00
|
|
|
CFG_STD_ATOMIC64=libatomic
|
2015-09-08 23:35:33 +00:00
|
|
|
else
|
2016-03-15 08:46:32 +00:00
|
|
|
CFG_STD_ATOMIC64=no
|
2012-05-29 05:10:09 +00:00
|
|
|
fi
|
|
|
|
|
2015-10-28 02:48:04 +00:00
|
|
|
# Detect whether std::atomic works for function pointers -- some implementations are buggy
|
|
|
|
if ! compileTest common/atomicfptr "std::atomic for function pointers"; then
|
|
|
|
echo "ERROR: detected a std::atomic implementation that fails for function pointers."
|
|
|
|
echo "Please apply the patch corresponding to your Standard Library vendor, found in"
|
|
|
|
echo " $relpath/config.tests/common/atomicfptr"
|
|
|
|
exit 101
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# detect sse2 support
|
2015-09-18 05:20:14 +00:00
|
|
|
CFG_SSE_LIST=
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "${CFG_SSE2}" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest common/sse2 "sse2"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_SSE2=yes
|
2015-09-18 05:20:14 +00:00
|
|
|
CFG_SSE_LIST=SSE2
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
CFG_SSE2=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect sse3 support
|
2013-12-08 19:58:44 +00:00
|
|
|
if [ "${CFG_SSE2}" = "no" ]; then
|
|
|
|
CFG_SSE3=no
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "${CFG_SSE3}" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest common/sse3 "sse3"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_SSE3=yes
|
2015-09-18 05:20:14 +00:00
|
|
|
CFG_SSE_LIST="$CFG_SSE_LIST SSE3"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
CFG_SSE3=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect ssse3 support
|
2013-12-08 19:58:44 +00:00
|
|
|
if [ "${CFG_SSE3}" = "no" ]; then
|
|
|
|
CFG_SSSE3=no
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "${CFG_SSSE3}" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest common/ssse3 "ssse3"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_SSSE3=yes
|
2015-09-18 05:20:14 +00:00
|
|
|
CFG_SSE_LIST="$CFG_SSE_LIST SSSE3"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
CFG_SSSE3=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect sse4.1 support
|
2013-12-08 19:58:44 +00:00
|
|
|
if [ "${CFG_SSSE3}" = "no" ]; then
|
|
|
|
CFG_SSE4_1=no
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "${CFG_SSE4_1}" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest common/sse4_1 "sse4_1"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_SSE4_1=yes
|
2015-09-18 05:20:14 +00:00
|
|
|
CFG_SSE_LIST="$CFG_SSE_LIST SSE4.1"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
CFG_SSE4_1=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect sse4.2 support
|
2013-12-08 19:58:44 +00:00
|
|
|
if [ "${CFG_SSE4_1}" = "no" ]; then
|
|
|
|
CFG_SSE4_2=no
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "${CFG_SSE4_2}" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest common/sse4_2 "sse4_2"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_SSE4_2=yes
|
2015-09-18 05:20:14 +00:00
|
|
|
CFG_SSE_LIST="$CFG_SSE_LIST SSE4.2"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
CFG_SSE4_2=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect avx support
|
2015-09-18 05:20:14 +00:00
|
|
|
CFG_AVX_LIST=
|
2013-12-08 19:58:44 +00:00
|
|
|
if [ "${CFG_SSE4_2}" = "no" ]; then
|
|
|
|
CFG_AVX=no
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "${CFG_AVX}" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest common/avx "avx"; then
|
2012-05-16 11:42:53 +00:00
|
|
|
case "$XQMAKESPEC" in
|
|
|
|
*g++*|*-clang*)
|
|
|
|
# Some clang versions produce internal compiler errors compiling Qt AVX code
|
|
|
|
case `$TEST_COMPILER --version` in
|
2013-03-04 14:36:26 +00:00
|
|
|
Apple\ clang\ version\ [23]*)
|
2012-05-16 11:42:53 +00:00
|
|
|
CFG_AVX=no
|
|
|
|
if [ "$OPT_VERBOSE" = "yes" ]; then
|
|
|
|
echo 'AVX support disabled for blacklisted clang compiler'
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
CFG_AVX=yes
|
2015-09-18 05:20:14 +00:00
|
|
|
CFG_AVX_LIST=AVX
|
2012-05-16 11:42:53 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
CFG_AVX=yes
|
2015-09-18 05:20:14 +00:00
|
|
|
CFG_AVX_LIST=AVX
|
2012-05-16 11:42:53 +00:00
|
|
|
;;
|
|
|
|
esac
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
CFG_AVX=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-12-30 00:44:16 +00:00
|
|
|
# detect avx2 support
|
2012-05-16 11:42:53 +00:00
|
|
|
if [ "${CFG_AVX}" = "no" ]; then
|
|
|
|
CFG_AVX2=no
|
|
|
|
fi
|
2011-12-30 00:44:16 +00:00
|
|
|
if [ "${CFG_AVX2}" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest common/avx2 "avx2"; then
|
2011-12-30 00:44:16 +00:00
|
|
|
CFG_AVX2=yes
|
2015-09-18 05:20:14 +00:00
|
|
|
CFG_AVX_LIST="$CFG_AVX_LIST AVX2"
|
2011-12-30 00:44:16 +00:00
|
|
|
else
|
|
|
|
CFG_AVX2=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-07-17 21:46:05 +00:00
|
|
|
# detect avx512 support
|
2015-11-17 08:11:53 +00:00
|
|
|
if [ "${CFG_AVX2}" = "no" ]; then
|
|
|
|
CFG_AVX512=
|
|
|
|
fi
|
2015-09-30 17:00:39 +00:00
|
|
|
if [ "${CFG_AVX512}" = "auto" ]; then
|
2015-07-17 21:46:05 +00:00
|
|
|
# First, test for AVX-512 Foundation
|
|
|
|
if compileTest common/avx512 "avx512f" AVX512=F; then
|
|
|
|
# Test for the sub-features
|
|
|
|
CFG_AVX512=f
|
|
|
|
CFG_AVX512_UPPER=AVX512F
|
|
|
|
for feature in er cd pf dq bw vl ifma vbmi; do
|
2015-10-15 08:25:41 +00:00
|
|
|
if [ -n "$BASH_VERSION" ] && [ "${BASH_VERSION%%.*}" -gt 3 ]; then
|
2015-07-17 21:46:05 +00:00
|
|
|
upper=${feature^^*}
|
|
|
|
elif [ -n "$ZSH_VERSION" ]; then
|
|
|
|
upper=${(U)feature}
|
|
|
|
else
|
|
|
|
upper=`echo $feature | tr a-z A-Z`
|
|
|
|
fi
|
|
|
|
if compileTest common/avx512 "avx512$feature" AVX512=$upper; then
|
|
|
|
CFG_AVX512="$CFG_AVX512 $feature"
|
|
|
|
CFG_AVX512_UPPER="$CFG_AVX512_UPPER AVX512$upper"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
else
|
|
|
|
CFG_AVX512=
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-06-25 00:03:53 +00:00
|
|
|
# check Neon support
|
|
|
|
if [ "$CFG_NEON" = "auto" ]; then
|
|
|
|
# no compile test, just check what the compiler has
|
|
|
|
case "$CFG_CPUFEATURES" in
|
|
|
|
*neon*)
|
|
|
|
CFG_NEON=yes
|
|
|
|
;;
|
2014-11-21 22:36:44 +00:00
|
|
|
*)
|
|
|
|
CFG_NEON=no
|
|
|
|
;;
|
2014-06-25 00:03:53 +00:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2012-03-02 16:43:52 +00:00
|
|
|
# detect mips_dsp support
|
2012-07-20 13:03:56 +00:00
|
|
|
if [ "$CFG_ARCH" = "mips" ] && [ "${CFG_MIPS_DSP}" = "auto" ]; then
|
2015-10-12 07:55:30 +00:00
|
|
|
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dsp "mips_dsp" "$CFG_QMAKE_PATH" "$QTCONFFILE" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
|
2012-07-20 13:03:56 +00:00
|
|
|
CFG_MIPS_DSP=yes
|
2012-03-02 16:43:52 +00:00
|
|
|
else
|
2012-07-20 13:03:56 +00:00
|
|
|
CFG_MIPS_DSP=no
|
|
|
|
fi
|
|
|
|
elif [ "$CFG_ARCH" != "mips" ]; then
|
|
|
|
CFG_MIPS_DSP=no
|
2012-03-02 16:43:52 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# detect mips_dspr2 support
|
2012-07-20 13:03:56 +00:00
|
|
|
if [ "$CFG_ARCH" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "auto" ]; then
|
2015-10-12 07:55:30 +00:00
|
|
|
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dspr2 "mips_dspr2" "$CFG_QMAKE_PATH" "$QTCONFFILE" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
|
2012-07-20 13:03:56 +00:00
|
|
|
CFG_MIPS_DSPR2=yes
|
2012-03-02 16:43:52 +00:00
|
|
|
else
|
2012-07-20 13:03:56 +00:00
|
|
|
CFG_MIPS_DSPR2=no
|
|
|
|
fi
|
|
|
|
elif [ "$CFG_ARCH" != "mips" ]; then
|
|
|
|
CFG_MIPS_DSPR2=no
|
2012-03-02 16:43:52 +00:00
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
|
2013-03-04 09:16:42 +00:00
|
|
|
[ "$XPLATFORM_ANDROID" = "yes" ] && QMakeVar add styles "android"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-12-22 09:27:53 +00:00
|
|
|
# check IPC support
|
|
|
|
if ! compileTest unix/ipc_sysv "ipc_sysv" ; then
|
|
|
|
# SYSV IPC is not supported - check POSIX IPC
|
|
|
|
if compileTest unix/ipc_posix "ipc_posix" ; then
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_POSIX_IPC"
|
|
|
|
else
|
2016-03-18 11:30:33 +00:00
|
|
|
if [ "$XPLATFORM_ANDROID" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] ; then
|
2014-12-22 09:27:53 +00:00
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SYSTEMSEMAPHORE QT_NO_SHAREDMEMORY"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-09-18 18:15:18 +00:00
|
|
|
if [ "$XPLATFORM_QNX" = "yes" ]; then
|
|
|
|
if [ "$CFG_SLOG2" != "no" ]; then
|
|
|
|
if compileTest unix/slog2 "slog2"; then
|
|
|
|
CFG_SLOG2=yes
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG slog2"
|
|
|
|
else
|
|
|
|
CFG_SLOG2=no
|
|
|
|
fi
|
|
|
|
fi
|
2013-10-16 15:38:32 +00:00
|
|
|
if [ "$CFG_QNX_IMF" != "no" ]; then
|
|
|
|
if compileTest unix/qqnx_imf "qqnx_imf"; then
|
|
|
|
CFG_QNX_IMF=yes
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG qqnx_imf"
|
|
|
|
else
|
|
|
|
CFG_QNX_IMF=no
|
|
|
|
fi
|
|
|
|
fi
|
2013-11-21 11:58:22 +00:00
|
|
|
if [ "$CFG_PPS" != "no" ]; then
|
|
|
|
if compileTest unix/pps "pps"; then
|
|
|
|
CFG_PPS=yes
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG qqnx_pps"
|
|
|
|
else
|
|
|
|
CFG_PPS=no
|
|
|
|
fi
|
|
|
|
fi
|
2014-01-29 12:43:03 +00:00
|
|
|
|
|
|
|
if [ "$CFG_LGMON" != "no" ]; then
|
|
|
|
if compileTest unix/lgmon "lgmon"; then
|
|
|
|
CFG_LGMON=yes
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG lgmon"
|
|
|
|
else
|
|
|
|
CFG_LGMON=no
|
|
|
|
fi
|
|
|
|
fi
|
2012-09-18 18:15:18 +00:00
|
|
|
fi
|
|
|
|
|
2015-10-27 00:54:21 +00:00
|
|
|
if [ "$XPLATFORM_INTEGRITY" = "yes" ]; then
|
2015-10-29 14:59:48 +00:00
|
|
|
CFG_INTEGRITYFB=yes
|
2015-10-27 00:54:21 +00:00
|
|
|
CFG_SHARED=no
|
|
|
|
CFG_LARGEFILE=no
|
|
|
|
fi
|
|
|
|
|
2016-02-19 14:18:47 +00:00
|
|
|
# detect zlib
|
|
|
|
if [ "$CFG_SYSTEM_ZLIB" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/zlib "zlib"; then
|
2016-02-19 14:18:47 +00:00
|
|
|
CFG_SYSTEM_ZLIB=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
2016-02-19 14:18:47 +00:00
|
|
|
CFG_SYSTEM_ZLIB=no
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2013-12-20 15:14:31 +00:00
|
|
|
if [ "$CFG_MTDEV" != "no" ]; then
|
|
|
|
if compileTest unix/mtdev "mtdev"; then
|
|
|
|
CFG_MTDEV=yes
|
|
|
|
else
|
|
|
|
CFG_MTDEV=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ "$CFG_MTDEV" = "no" ]; then
|
|
|
|
QMakeVar add DEFINES QT_NO_MTDEV
|
|
|
|
fi
|
|
|
|
|
2014-01-01 16:36:24 +00:00
|
|
|
if [ "$CFG_JOURNALD" != "no" ]; then
|
|
|
|
if compileTest unix/journald "journald"; then
|
|
|
|
CFG_JOURNALD=yes
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG journald"
|
|
|
|
else
|
|
|
|
if [ "$CFG_JOURNALD" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "journald support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_JOURNALD=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-07-04 14:13:31 +00:00
|
|
|
if [ "$CFG_SYSLOG" != "no" ]; then
|
|
|
|
if compileTest unix/syslog "syslog"; then
|
|
|
|
CFG_SYSLOG=yes
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG syslog"
|
|
|
|
else
|
|
|
|
if [ "$CFG_SYSLOG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "syslog support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_SYSLOG=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# detect jpeg
|
|
|
|
if [ "$CFG_LIBJPEG" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/libjpeg "libjpeg"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_LIBJPEG=system
|
|
|
|
else
|
|
|
|
CFG_LIBJPEG=qt
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect png
|
|
|
|
if [ "$CFG_LIBPNG" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/libpng "libpng"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_LIBPNG=system
|
|
|
|
else
|
|
|
|
CFG_LIBPNG=qt
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2016-02-03 19:33:02 +00:00
|
|
|
# detect dl
|
2016-05-17 06:24:36 +00:00
|
|
|
if compileTest unix/dlopen "dlopen"; then
|
2016-02-03 19:33:02 +00:00
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG no-libdl"
|
2016-05-17 06:24:36 +00:00
|
|
|
else
|
|
|
|
if ! compileTest unix/libdl "libdl"; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG no-libdl"
|
|
|
|
QMakeVar add DEFINES QT_NO_DYNAMIC_LIBRARY
|
|
|
|
fi
|
2016-02-03 19:33:02 +00:00
|
|
|
fi
|
|
|
|
|
2012-03-07 14:07:07 +00:00
|
|
|
if [ "$CFG_EGLFS" = "yes" ]; then
|
|
|
|
if [ "$CFG_EGL" = "no" ]; then
|
|
|
|
echo "The EGLFS plugin requires EGL support and cannot be built"
|
|
|
|
exit 101
|
|
|
|
fi
|
|
|
|
CFG_EGL=yes
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# auto-detect SQL-modules support
|
|
|
|
for _SQLDR in $CFG_SQL_AVAILABLE; do
|
|
|
|
case $_SQLDR in
|
|
|
|
mysql)
|
|
|
|
if [ "$CFG_SQL_mysql" != "no" ]; then
|
|
|
|
[ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
|
|
|
|
if [ -x "$CFG_MYSQL_CONFIG" ]; then
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null | filterIncludeOptions`
|
2015-11-09 15:46:27 +00:00
|
|
|
# -rdynamic should not be returned by mysql_config, but is on RHEL 6.6
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_LIBS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null | filterLibraryOptions | sed "s/-rdynamic//"`
|
|
|
|
QMAKE_LIBS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null | filterLibraryOptions | sed "s/-rdynamic//"`
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
|
|
|
|
QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
|
|
|
|
fi
|
|
|
|
if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
|
|
|
|
if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
|
|
|
|
echo " You need MySql 4 or higher."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_SQL_mysql="no"
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_LIBS_MYSQL=""
|
|
|
|
QMAKE_LIBS_MYSQL_R=""
|
|
|
|
QMAKE_CFLAGS_MYSQL=""
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
else
|
2016-03-20 22:07:46 +00:00
|
|
|
if compileTest unix/mysql_r "MySQL (thread-safe)" $QMAKE_LIBS_MYSQL_R $QMAKE_CFLAGS_MYSQL; then
|
2011-04-27 10:05:43 +00:00
|
|
|
QMakeVar add CONFIG use_libmysqlclient_r
|
2016-03-18 12:35:40 +00:00
|
|
|
CFG_SQL_mysql=yes
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_LIBS_MYSQL="$QMAKE_LIBS_MYSQL_R"
|
|
|
|
elif compileTest unix/mysql "MySQL (thread-unsafe)" $QMAKE_LIBS_MYSQL $QMAKE_CFLAGS_MYSQL; then
|
2016-03-18 12:35:40 +00:00
|
|
|
CFG_SQL_mysql=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "MySQL support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_SQL_mysql=no
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_LIBS_MYSQL=""
|
|
|
|
QMAKE_LIBS_MYSQL_R=""
|
|
|
|
QMAKE_CFLAGS_MYSQL=""
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
psql)
|
|
|
|
if [ "$CFG_SQL_psql" != "no" ]; then
|
2015-02-19 21:41:02 +00:00
|
|
|
[ -z "$CFG_PSQL_CONFIG" ] && CFG_PSQL_CONFIG=`"$WHICH" pg_config`
|
2011-04-27 10:05:43 +00:00
|
|
|
# Be careful not to use native pg_config when cross building.
|
2015-02-19 21:41:02 +00:00
|
|
|
if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null | filterIncludePath`
|
|
|
|
QMAKE_LIBS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null | filterLibraryPath`
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
[ -z "$QMAKE_CFLAGS_PSQL" ] || QMAKE_CFLAGS_PSQL="-I$QMAKE_CFLAGS_PSQL"
|
|
|
|
[ -z "$QMAKE_LIBS_PSQL" ] || QMAKE_LIBS_PSQL="-L$QMAKE_LIBS_PSQL"
|
2011-04-27 10:05:43 +00:00
|
|
|
# But, respect PSQL_LIBS if set
|
2016-03-20 22:07:46 +00:00
|
|
|
[ -z "$PSQL_LIBS" ] || QMAKE_LIBS_PSQL="$PSQL_LIBS"
|
|
|
|
if compileTest unix/psql "PostgreSQL" $QMAKE_LIBS_PSQL $QMAKE_CFLAGS_PSQL; then
|
2016-03-18 12:35:40 +00:00
|
|
|
CFG_SQL_psql=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "PostgreSQL support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_SQL_psql=no
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_PSQL=""
|
|
|
|
QMAKE_LIBS_PSQL=""
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
odbc)
|
|
|
|
if [ "$CFG_SQL_odbc" != "no" ]; then
|
2013-11-12 21:01:44 +00:00
|
|
|
if [ "$XPLATFORM_MAC" != "yes" ] && compileTest unix/odbc "ODBC"; then
|
2016-03-18 12:35:40 +00:00
|
|
|
CFG_SQL_odbc=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/iodbc "iODBC"; then
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_LIBS_ODBC="-liodbc"
|
2016-03-18 12:35:40 +00:00
|
|
|
CFG_SQL_odbc=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "ODBC support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_SQL_odbc=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
oci)
|
|
|
|
if [ "$CFG_SQL_oci" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/oci "OCI"; then
|
2016-03-18 12:35:40 +00:00
|
|
|
CFG_SQL_oci=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_SQL_oci=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
tds)
|
|
|
|
if [ "$CFG_SQL_tds" != "no" ]; then
|
2016-03-20 22:07:46 +00:00
|
|
|
[ -z "$SYBASE" ] || QMAKE_LIBS_TDS="-L$SYBASE/lib"
|
|
|
|
[ -z "$SYBASE_LIBS" ] || QMAKE_LIBS_TDS="$QMAKE_LIBS_TDS $SYBASE_LIBS"
|
|
|
|
if compileTest unix/tds "TDS" $QMAKE_LIBS_TDS; then
|
2016-03-18 12:35:40 +00:00
|
|
|
CFG_SQL_tds=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "TDS support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_SQL_tds=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
db2)
|
|
|
|
if [ "$CFG_SQL_db2" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/db2 "DB2"; then
|
2016-03-18 12:35:40 +00:00
|
|
|
CFG_SQL_db2=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "ODBC support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_SQL_db2=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
ibase)
|
|
|
|
if [ "$CFG_SQL_ibase" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/ibase "InterBase"; then
|
2016-03-18 12:35:40 +00:00
|
|
|
CFG_SQL_ibase=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "InterBase support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_SQL_ibase=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
sqlite2)
|
|
|
|
if [ "$CFG_SQL_sqlite2" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/sqlite2 "SQLite2"; then
|
2016-03-18 12:35:40 +00:00
|
|
|
CFG_SQL_sqlite2=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "SQLite2 support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_SQL_sqlite2=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
sqlite)
|
|
|
|
if [ "$CFG_SQL_sqlite" != "no" ]; then
|
|
|
|
SQLITE_AUTODETECT_FAILED="no"
|
|
|
|
if [ "$CFG_SQLITE" = "system" ]; then
|
2013-03-19 03:58:02 +00:00
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists sqlite3 2>/dev/null; then
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
|
|
|
|
QMAKE_LIBS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
|
2012-07-17 09:52:10 +00:00
|
|
|
else
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_SQLITE=
|
|
|
|
QMAKE_LIBS_SQLITE="-lsqlite3 -lz"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
if compileTest unix/sqlite "SQLite" $QMAKE_LIBS_SQLITE $QMAKE_CFLAGS_SQLITE; then
|
2016-03-18 12:35:40 +00:00
|
|
|
CFG_SQL_sqlite=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
|
|
|
|
else
|
|
|
|
SQLITE_AUTODETECT_FAILED="yes"
|
|
|
|
CFG_SQL_sqlite=no
|
|
|
|
fi
|
|
|
|
elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
|
2016-03-18 12:35:40 +00:00
|
|
|
CFG_SQL_sqlite=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
SQLITE_AUTODETECT_FAILED="yes"
|
|
|
|
CFG_SQL_sqlite=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "SQLite support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if [ "$OPT_VERBOSE" = "yes" ]; then
|
|
|
|
echo "unknown SQL driver: $_SQLDR"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
# auto-detect CUPS support
|
|
|
|
if [ "$CFG_CUPS" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/cups "Cups"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_CUPS=yes
|
|
|
|
else
|
|
|
|
if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "Cups support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_CUPS=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# auto-detect iconv(3) support
|
|
|
|
if [ "$CFG_ICONV" != "no" ]; then
|
2012-03-17 17:49:36 +00:00
|
|
|
if [ "$XPLATFORM_MINGW" = "yes" ]; then
|
2012-02-02 15:06:05 +00:00
|
|
|
CFG_ICONV=no
|
2012-08-12 08:14:59 +00:00
|
|
|
elif compileTest unix/iconv "POSIX iconv"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_ICONV=yes
|
2012-08-12 08:14:59 +00:00
|
|
|
elif compileTest unix/sun-libiconv "SUN libiconv"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_ICONV=sun
|
2012-08-12 08:14:59 +00:00
|
|
|
elif compileTest unix/gnu-libiconv "GNU libiconv"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_ICONV=gnu
|
|
|
|
else
|
|
|
|
if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "Iconv support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_ICONV=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# auto-detect libdbus-1 support
|
2014-12-11 22:32:59 +00:00
|
|
|
# auto: detect if libdbus-1 is present; if so, link to it
|
|
|
|
# linked: fail if libdbus-1 is not present; otherwise link to it
|
|
|
|
# runtime: no detection (cannot fail), load libdbus-1 at runtime
|
|
|
|
if [ "$CFG_DBUS" = "auto" ] || [ "$CFG_DBUS" = "linked" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
|
|
|
|
QMAKE_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
|
2014-07-09 09:58:44 +00:00
|
|
|
else
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_LIBS_DBUS="-ldbus-1"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
if compileTest unix/dbus "D-Bus" $QMAKE_CFLAGS_DBUS $QMAKE_LIBS_DBUS; then
|
|
|
|
QMakeVar set QMAKE_LIBS_DBUS "$QMAKE_LIBS_DBUS"
|
|
|
|
QMakeVar set QMAKE_CFLAGS_DBUS "$QMAKE_CFLAGS_DBUS"
|
2014-07-09 09:58:44 +00:00
|
|
|
# Try find correct host configuration for dbus tools when cross-compiling
|
|
|
|
if [ "$QT_CROSS_COMPILE" = "yes" ] && env -i PATH="$PATH" \
|
|
|
|
pkg-config --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_DBUS=`env -i PATH="$PATH" pkg-config --cflags dbus-1 2>/dev/null`
|
2014-07-09 09:58:44 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
QMakeVar set QT_HOST_CFLAGS_DBUS "$QMAKE_CFLAGS_DBUS"
|
2014-12-11 22:32:59 +00:00
|
|
|
CFG_DBUS=linked
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
2014-12-11 22:32:59 +00:00
|
|
|
# Failed to compile the test, so it's an error if CFG_DBUS is "linked"
|
|
|
|
if [ "$CFG_DBUS" = "linked" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
2012-12-28 18:09:39 +00:00
|
|
|
echo "The Qt D-Bus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
|
2014-11-20 07:02:14 +00:00
|
|
|
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
|
2011-04-27 10:05:43 +00:00
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
2014-12-11 22:32:59 +00:00
|
|
|
else
|
|
|
|
# CFG_DBUS is "auto" here
|
|
|
|
CFG_DBUS=runtime
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-01-27 17:41:32 +00:00
|
|
|
# auto-detect libproxy support
|
|
|
|
if [ "$CFG_LIBPROXY" != "no" ]; then
|
|
|
|
if compileTest common/libproxy "libproxy"; then
|
|
|
|
CFG_LIBPROXY=yes
|
|
|
|
else
|
|
|
|
if [ "$CFG_LIBPROXY" = "auto" ]; then
|
|
|
|
CFG_LIBPROXY=no
|
|
|
|
elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
# CFG_LIBPROXY is "yes" here
|
|
|
|
echo "The libproxy support cannot be enabled because libproxy was not found."
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
# auto-detect Glib support
|
|
|
|
if [ "$CFG_GLIB" != "no" ]; then
|
|
|
|
if [ -n "$PKG_CONFIG" ]; then
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
|
|
|
|
QMAKE_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
if compileTest unix/glib "Glib" $QMAKE_CFLAGS_GLIB $QMAKE_LIBS_GLIB; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_GLIB=yes
|
2016-03-20 22:07:46 +00:00
|
|
|
QMakeVar set QMAKE_CFLAGS_GLIB "$QMAKE_CFLAGS_GLIB"
|
|
|
|
QMakeVar set QMAKE_LIBS_GLIB "$QMAKE_LIBS_GLIB"
|
2012-03-26 20:13:58 +00:00
|
|
|
else
|
|
|
|
if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "Glib support cannot be enabled due to functionality tests!"
|
2014-11-20 07:02:14 +00:00
|
|
|
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
|
2012-03-26 20:13:58 +00:00
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
2012-01-26 17:43:06 +00:00
|
|
|
else
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_GLIB=no
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-04-24 12:23:02 +00:00
|
|
|
# auto-detect GTK style support
|
2015-07-30 18:32:43 +00:00
|
|
|
if [ "$CFG_GLIB" = "yes" -a "$CFG_GTK" != "no" ]; then
|
2012-04-24 12:23:02 +00:00
|
|
|
if [ -n "$PKG_CONFIG" ]; then
|
2016-03-29 08:03:46 +00:00
|
|
|
QMAKE_CFLAGS_GTK3=`$PKG_CONFIG --cflags gtk+-3.0 2>/dev/null`
|
|
|
|
QMAKE_LIBS_GTK3=`$PKG_CONFIG --libs gtk+-3.0 2>/dev/null`
|
2012-04-24 12:23:02 +00:00
|
|
|
fi
|
2016-03-29 08:03:46 +00:00
|
|
|
if [ -n "$QMAKE_CFLAGS_GTK3" ] ; then
|
2015-07-30 18:32:43 +00:00
|
|
|
CFG_GTK=yes
|
2015-11-03 21:06:19 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG gtk3"
|
2016-03-29 08:03:46 +00:00
|
|
|
QMakeVar set QMAKE_CFLAGS_GTK3 "$QMAKE_CFLAGS_GTK3"
|
|
|
|
QMakeVar set QMAKE_LIBS_GTK3 "$QMAKE_LIBS_GTK3"
|
2012-04-24 12:23:02 +00:00
|
|
|
else
|
2015-07-30 18:32:43 +00:00
|
|
|
if [ "$CFG_GTK" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
2014-03-14 18:42:18 +00:00
|
|
|
echo "GTK theme support cannot be enabled due to functionality tests!"
|
2014-11-20 07:02:14 +00:00
|
|
|
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
|
2015-07-30 18:32:43 +00:00
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
2012-04-24 12:23:02 +00:00
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
2015-07-30 18:32:43 +00:00
|
|
|
CFG_GTK=no
|
2012-04-24 12:23:02 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
elif [ "$CFG_GLIB" = "no" ]; then
|
2015-07-30 18:32:43 +00:00
|
|
|
CFG_GTK=no
|
2012-04-24 12:23:02 +00:00
|
|
|
fi
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
# auto-detect libicu support
|
|
|
|
if [ "$CFG_ICU" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/icu "ICU"; then
|
2012-03-26 20:13:58 +00:00
|
|
|
[ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
|
|
|
|
else
|
|
|
|
if [ "$CFG_ICU" = "auto" ]; then
|
|
|
|
CFG_ICU=no
|
|
|
|
elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
# CFG_ICU is "yes"
|
|
|
|
|
|
|
|
echo "The ICU library support cannot be enabled."
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
# Auto-detect PulseAudio support
|
|
|
|
if [ "$CFG_PULSEAUDIO" != "no" ]; then
|
|
|
|
if [ -n "$PKG_CONFIG" ]; then
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
|
|
|
|
QMAKE_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
if compileTest unix/pulseaudio "PulseAudio" $QMAKE_CFLAGS_PULSEAUDIO $QMAKE_LIBS_PULSEAUDIO; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_PULSEAUDIO=yes
|
2016-03-20 22:07:46 +00:00
|
|
|
QMakeVar set QMAKE_CFLAGS_PULSEAUDIO "$QMAKE_CFLAGS_PULSEAUDIO"
|
|
|
|
QMakeVar set QMAKE_LIBS_PULSEAUDIO "$QMAKE_LIBS_PULSEAUDIO"
|
2012-03-26 20:13:58 +00:00
|
|
|
else
|
|
|
|
if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "PulseAudio support cannot be enabled due to functionality tests!"
|
2014-11-20 07:02:14 +00:00
|
|
|
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
|
2012-03-26 20:13:58 +00:00
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_PULSEAUDIO=no
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-11-07 09:16:21 +00:00
|
|
|
# X11/MINGW OpenGL
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$XPLATFORM_MINGW" = "yes" ]; then
|
2014-04-23 09:53:38 +00:00
|
|
|
# auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher)
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_GUI" = "no" ]; then
|
|
|
|
if [ "$CFG_OPENGL" = "auto" ]; then
|
|
|
|
CFG_OPENGL=no
|
|
|
|
fi
|
|
|
|
if [ "$CFG_OPENGL" != "no" ]; then
|
|
|
|
echo "OpenGL enabled, but GUI disabled."
|
|
|
|
echo " You might need to either enable the GUI or disable OpenGL"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest x11/opengl "OpenGL"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_OPENGL=desktop
|
2014-04-23 09:53:38 +00:00
|
|
|
elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_OPENGL=es2
|
|
|
|
else
|
|
|
|
if [ "$CFG_OPENGL" = "yes" ]; then
|
|
|
|
echo "All the OpenGL functionality tests failed!"
|
|
|
|
echo " You might need to modify the include and library search paths by editing"
|
|
|
|
echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
|
|
|
|
echo " ${XQMAKESPEC}."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CFG_OPENGL=no
|
|
|
|
fi
|
|
|
|
elif [ "$CFG_OPENGL" = "es2" ]; then
|
2014-04-23 09:53:38 +00:00
|
|
|
#OpenGL ES 2.0
|
|
|
|
compileTest unix/opengles2 "OpenGL ES 2.0"
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ $? != "0" ]; then
|
|
|
|
echo "The OpenGL ES 2.0 functionality test failed!"
|
|
|
|
echo " You might need to modify the include and library search paths by editing"
|
|
|
|
echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
|
|
|
|
echo " ${XQMAKESPEC}."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
elif [ "$CFG_OPENGL" = "desktop" ]; then
|
|
|
|
# Desktop OpenGL support
|
2012-08-12 08:14:59 +00:00
|
|
|
compileTest x11/opengl "OpenGL"
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ $? != "0" ]; then
|
|
|
|
echo "The OpenGL functionality test failed!"
|
|
|
|
echo " You might need to modify the include and library search paths by editing"
|
|
|
|
echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
|
|
|
|
echo " ${XQMAKESPEC}."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi # X11/MINGW OpenGL
|
|
|
|
|
2013-11-12 21:01:44 +00:00
|
|
|
if [ "$XPLATFORM_MAC" = "yes" ]; then
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$CFG_COREWLAN" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest mac/corewlan "CoreWlan"; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_COREWLAN=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_COREWLAN=no
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-04-23 09:53:38 +00:00
|
|
|
# auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher)
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
|
2014-12-08 14:32:55 +00:00
|
|
|
if compileTestWithPkgConfig gl unix/opengldesktop "OpenGL" OPENGL; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_OPENGL=desktop
|
2014-12-08 14:32:55 +00:00
|
|
|
elif compileTestWithPkgConfig glesv2 unix/opengles2 "OpenGL ES 2.0" OPENGL_ES2; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_OPENGL=es2
|
|
|
|
else
|
|
|
|
if [ "$CFG_OPENGL" = "yes" ]; then
|
|
|
|
echo "All the OpenGL functionality tests failed!"
|
|
|
|
echo " You might need to modify the include and library search paths by editing"
|
|
|
|
echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
|
|
|
|
echo " ${XQMAKESPEC}."
|
|
|
|
exit 1
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_OPENGL=no
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
elif [ "$CFG_OPENGL" = "es2" ]; then
|
2014-04-23 09:53:38 +00:00
|
|
|
#OpenGL ES 2.0
|
2012-03-26 20:13:58 +00:00
|
|
|
|
2014-12-08 14:32:55 +00:00
|
|
|
compileTestWithPkgConfig glesv2 unix/opengles2 "OpenGL ES 2.0" OPENGL_ES2
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ $? != "0" ]; then
|
|
|
|
echo "The OpenGL ES 2.0 functionality test failed!"
|
2014-11-20 07:02:14 +00:00
|
|
|
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
|
2012-03-26 20:13:58 +00:00
|
|
|
echo " You might need to modify the include and library search paths by editing"
|
|
|
|
echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
|
|
|
|
echo " ${XQMAKESPEC}."
|
|
|
|
exit 1
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
elif [ "$CFG_OPENGL" = "desktop" ]; then
|
|
|
|
# Desktop OpenGL support
|
2014-12-08 14:32:55 +00:00
|
|
|
compileTestWithPkgConfig gl unix/opengldesktop "OpenGL" OPENGL
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ $? != "0" ]; then
|
|
|
|
echo "The OpenGL functionality test failed!"
|
|
|
|
echo " You might need to modify the include and library search paths by editing"
|
|
|
|
echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
|
|
|
|
echo " ${XQMAKESPEC}."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-04-23 09:53:38 +00:00
|
|
|
# If OpenGL ES 2.0 is enabled, check for 3.0 and higher. This is used to allow
|
|
|
|
# compile-time differentiation and including the version specific (but backwards
|
|
|
|
# compatible) ES headers (for example, GLES3/gl31.h). Other than that, there is
|
|
|
|
# no difference in the configuration, even the library is the same.
|
|
|
|
if [ "$CFG_OPENGL" = "es2" ]; then
|
2014-12-08 14:32:55 +00:00
|
|
|
if compileTestWithPkgConfig glesv2 unix/opengles3 "OpenGL ES 3.0" ""; then
|
2014-04-23 09:53:38 +00:00
|
|
|
# Add a define for ES3, in addition to ES and ES2.
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_3"
|
|
|
|
fi
|
2014-12-08 14:32:55 +00:00
|
|
|
if compileTestWithPkgConfig glesv2 unix/opengles31 "OpenGL ES 3.1" ""; then
|
2014-04-23 09:53:38 +00:00
|
|
|
# Add a define for ES31.
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_3_1"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-09-22 11:18:11 +00:00
|
|
|
# auto-detect FontConfig support
|
2016-05-04 19:18:01 +00:00
|
|
|
ORIG_CFG_FREETYPE="$CFG_FREETYPE"
|
2011-09-22 11:18:11 +00:00
|
|
|
if [ "$CFG_FONTCONFIG" != "no" ]; then
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
|
|
|
|
QMAKE_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
|
2011-09-22 11:18:11 +00:00
|
|
|
else
|
2016-03-20 22:07:46 +00:00
|
|
|
QMAKE_CFLAGS_FONTCONFIG=
|
|
|
|
QMAKE_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
|
2011-09-22 11:18:11 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
if compileTest unix/fontconfig "FontConfig" $QMAKE_CFLAGS_FONTCONFIG $QMAKE_LIBS_FONTCONFIG; then
|
2012-03-26 20:13:58 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG fontconfig"
|
2016-03-20 22:07:46 +00:00
|
|
|
QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QMAKE_CFLAGS_FONTCONFIG"
|
|
|
|
QMakeVar set QMAKE_LIBS_FONTCONFIG "$QMAKE_LIBS_FONTCONFIG"
|
2012-06-04 17:15:57 +00:00
|
|
|
CFG_FONTCONFIG=yes
|
2013-09-08 03:20:43 +00:00
|
|
|
CFG_FREETYPE=system
|
2012-06-04 17:15:57 +00:00
|
|
|
else
|
|
|
|
CFG_FONTCONFIG=no
|
2011-09-22 11:18:11 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
|
2011-09-22 11:18:11 +00:00
|
|
|
fi
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$CFG_LIBUDEV" != "no" ]; then
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
|
|
|
|
QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
|
|
|
|
QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
|
2014-12-02 10:43:47 +00:00
|
|
|
QMAKE_CFLAGS_LIBUDEV=`$PKG_CONFIG --cflags libudev 2>/dev/null`
|
2012-03-26 20:13:58 +00:00
|
|
|
QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
|
|
|
|
QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2014-12-02 10:43:47 +00:00
|
|
|
if compileTest unix/libudev "libudev" $QMAKE_CFLAGS_LIBUDEV $QMAKE_LIBS_LIBUDEV; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_LIBUDEV=yes
|
|
|
|
QT_CONFIG="$QT_CONFIG libudev"
|
|
|
|
elif [ "$CFG_LIBUDEV" = "yes" ]; then
|
|
|
|
echo "The libudev functionality test failed!"
|
2014-11-20 07:02:14 +00:00
|
|
|
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
|
2012-03-26 20:13:58 +00:00
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
CFG_LIBUDEV=no
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
2012-08-08 07:36:23 +00:00
|
|
|
if [ "$CFG_LIBUDEV" = "no" ]; then
|
|
|
|
QMakeVar add DEFINES QT_NO_LIBUDEV
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$CFG_EVDEV" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/evdev "evdev"; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_EVDEV=yes
|
|
|
|
QT_CONFIG="$QT_CONFIG evdev"
|
|
|
|
elif [ "$CFG_EVDEV" = "yes" ]; then
|
|
|
|
echo "The evdev functionality test failed!"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
CFG_EVDEV=no
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2012-08-08 07:36:23 +00:00
|
|
|
if [ "$CFG_EVDEV" = "no" ]; then
|
|
|
|
QMakeVar add DEFINES QT_NO_EVDEV
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-03-26 14:22:51 +00:00
|
|
|
if [ "$CFG_TSLIB" != "no" ]; then
|
|
|
|
if compileTest unix/tslib "tslib"; then
|
|
|
|
CFG_TSLIB=yes
|
|
|
|
QT_CONFIG="$QT_CONFIG tslib"
|
|
|
|
elif [ "$CFG_TSLIB" = "yes" ]; then
|
|
|
|
echo "The tslib functionality test failed!"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
CFG_TSLIB=no
|
|
|
|
fi
|
|
|
|
fi
|
2014-10-13 13:47:26 +00:00
|
|
|
if [ "$CFG_TSLIB" = "no" ]; then
|
|
|
|
QMakeVar add DEFINES QT_NO_TSLIB
|
|
|
|
fi
|
2013-03-26 14:22:51 +00:00
|
|
|
|
2014-12-09 10:45:29 +00:00
|
|
|
if [ "$CFG_XKBCOMMON_EVDEV" != "no" ]; then
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
|
|
|
|
QMAKE_INCDIR_XKBCOMMON_EVDEV=`$PKG_CONFIG --cflags-only-I xkbcommon 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
|
|
|
|
QMAKE_LIBS_XKBCOMMON_EVDEV=`$PKG_CONFIG --libs xkbcommon 2>/dev/null`
|
|
|
|
QMAKE_CFLAGS_XKBCOMMON_EVDEV=`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`
|
|
|
|
QMakeVar set QMAKE_INCDIR_XKBCOMMON_EVDEV "$QMAKE_INCDIR_XKBCOMMON_EVDEV"
|
|
|
|
QMakeVar set QMAKE_LIBS_XKBCOMMON_EVDEV "$QMAKE_LIBS_XKBCOMMON_EVDEV"
|
|
|
|
fi
|
|
|
|
if compileTest unix/xkbcommon "xkbcommon" $QMAKE_CFLAGS_XKBCOMMON_EVDEV $QMAKE_LIBS_XKBCOMMON_EVDEV; then
|
|
|
|
CFG_XKBCOMMON_EVDEV=yes
|
|
|
|
QT_CONFIG="$QT_CONFIG xkbcommon-evdev"
|
|
|
|
elif [ "$CFG_XKBCOMMON_EVDEV" = "yes" ]; then
|
|
|
|
echo "The xkbcommon-evdev functionality test failed!"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
CFG_XKBCOMMON_EVDEV=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_LIBINPUT" != "no" ] && [ "$CFG_LIBUDEV" != "no" ]; then
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libinput 2>/dev/null; then
|
|
|
|
QMAKE_INCDIR_LIBINPUT=`$PKG_CONFIG --cflags-only-I libinput 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
|
|
|
|
QMAKE_LIBS_LIBINPUT=`$PKG_CONFIG --libs libinput 2>/dev/null`
|
|
|
|
QMAKE_CFLAGS_LIBINPUT=`$PKG_CONFIG --cflags libinput 2>/dev/null`
|
2015-01-28 12:06:37 +00:00
|
|
|
QMAKE_LIBINPUT_VERSION_MAJOR=`$PKG_CONFIG --modversion libinput 2>/dev/null | cut -d . -f 1`
|
|
|
|
QMAKE_LIBINPUT_VERSION_MINOR=`$PKG_CONFIG --modversion libinput 2>/dev/null | cut -d . -f 2`
|
|
|
|
QMakeVar set QMAKE_LIBINPUT_VERSION_MAJOR "$QMAKE_LIBINPUT_VERSION_MAJOR"
|
|
|
|
QMakeVar set QMAKE_LIBINPUT_VERSION_MINOR "$QMAKE_LIBINPUT_VERSION_MINOR"
|
2014-12-09 10:45:29 +00:00
|
|
|
QMakeVar set QMAKE_INCDIR_LIBINPUT "$QMAKE_INCDIR_LIBINPUT"
|
|
|
|
QMakeVar set QMAKE_LIBS_LIBINPUT "$QMAKE_LIBS_LIBINPUT"
|
|
|
|
fi
|
|
|
|
if compileTest unix/libinput "libinput" $QMAKE_CFLAGS_LIBINPUT $QMAKE_LIBS_LIBINPUT; then
|
|
|
|
CFG_LIBINPUT=yes
|
|
|
|
QT_CONFIG="$QT_CONFIG libinput"
|
|
|
|
elif [ "$CFG_LIBINPUT" = "yes" ]; then
|
|
|
|
echo "The libinput functionality test failed!"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
CFG_LIBINPUT=no
|
|
|
|
fi
|
2015-03-04 14:35:38 +00:00
|
|
|
else
|
|
|
|
CFG_LIBINPUT=no
|
2014-12-09 10:45:29 +00:00
|
|
|
fi
|
|
|
|
if [ "$CFG_LIBINPUT" = "no" ]; then
|
|
|
|
QMakeVar add DEFINES QT_NO_LIBINPUT
|
|
|
|
fi
|
|
|
|
|
2013-11-13 18:14:45 +00:00
|
|
|
# Check we actually have X11 :-)
|
|
|
|
if compileTest x11/xlib "XLib"; then
|
|
|
|
QT_CONFIG="$QT_CONFIG xlib"
|
|
|
|
fi
|
|
|
|
|
2014-01-14 09:42:15 +00:00
|
|
|
# auto-detect Xrender support
|
|
|
|
if [ "$CFG_XRENDER" != "no" ]; then
|
|
|
|
if compileTest x11/xrender "Xrender"; then
|
|
|
|
CFG_XRENDER=yes
|
|
|
|
QT_CONFIG="$QT_CONFIG xrender"
|
|
|
|
else
|
|
|
|
if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "Xrender support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_XRENDER=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# auto-detect XInput2 support
|
|
|
|
if [ "$CFG_XINPUT2" != "no" ]; then
|
|
|
|
if compileTest x11/xinput2 "XInput2"; then
|
2015-03-27 10:51:02 +00:00
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xi 2>/dev/null; then
|
2016-03-29 08:05:16 +00:00
|
|
|
QMAKE_XINPUT2_VERSION_MAJOR=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 1`
|
|
|
|
QMAKE_XINPUT2_VERSION_MINOR=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 2`
|
|
|
|
QMAKE_XINPUT2_VERSION_PATCH=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 3`
|
|
|
|
QMakeVar set QMAKE_XINPUT2_VERSION_MAJOR "$QMAKE_XINPUT2_VERSION_MAJOR"
|
|
|
|
QMakeVar set QMAKE_XINPUT2_VERSION_MINOR "$QMAKE_XINPUT2_VERSION_MINOR"
|
|
|
|
QMakeVar set QMAKE_XINPUT2_VERSION_PATCH "$QMAKE_XINPUT2_VERSION_PATCH"
|
2015-03-27 10:51:02 +00:00
|
|
|
fi
|
2014-01-14 09:42:15 +00:00
|
|
|
CFG_XINPUT2=yes
|
|
|
|
else
|
|
|
|
if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "XInput2 support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_XINPUT2=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$CFG_XCB" != "no" ]; then
|
2016-05-20 09:42:11 +00:00
|
|
|
# find X11 prefix
|
2014-02-04 10:54:44 +00:00
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "x11" 2> /dev/null; then
|
|
|
|
QMAKE_X11_PREFIX="`$PKG_CONFIG --variable=prefix x11`"
|
|
|
|
else
|
|
|
|
# default to LSB prefix
|
|
|
|
QMAKE_X11_PREFIX="/usr"
|
|
|
|
fi
|
|
|
|
QMakeVar set QMAKE_X11_PREFIX "$QMAKE_X11_PREFIX"
|
|
|
|
|
2016-05-20 09:42:11 +00:00
|
|
|
# both -qt-xcb and -system-xcb depends on libxcb from the system
|
|
|
|
XCB_DEP="xcb >= 1.5"
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "$XCB_DEP" 2>/dev/null; then
|
|
|
|
QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
|
|
|
|
QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
|
|
|
|
fi
|
|
|
|
if ! compileTest qpa/xcb "xcb" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
|
|
|
if [ "$CFG_XCB" != "auto" ]; then
|
|
|
|
echo "Missing dependency lib$XCB_DEP."
|
|
|
|
[ -z "$PKG_CONFIG" ] && echo "Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CFG_XCB=no
|
|
|
|
fi
|
2012-01-04 13:57:38 +00:00
|
|
|
|
2016-05-20 09:42:11 +00:00
|
|
|
# xcb plugin depends on libxkbcommon
|
|
|
|
if [ "$CFG_XCB" != "no" ] && [ "$CFG_XKBCOMMON" = no ]; then
|
|
|
|
if [ "$CFG_XCB" != "auto" ]; then
|
|
|
|
echo "XCB plugin requires libxkbcommon. See -qt-xkbcommon-x11 and -system-xkbcommon-x11."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CFG_XCB=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_XCB" != "no" ]; then
|
2012-10-29 11:59:09 +00:00
|
|
|
if [ "$CFG_XCB" = "qt" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG xcb-qt"
|
|
|
|
else
|
2014-02-05 15:25:06 +00:00
|
|
|
# libxcb version 1.10 was the first version that enables xcb-xkb by default,
|
|
|
|
# therefore the minimal xcb-xkb version we support is 1.10
|
|
|
|
CFG_XKB=no
|
2016-05-20 09:42:11 +00:00
|
|
|
XKB_DEP="xcb-xkb >= 1.10"
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "$XKB_DEP" 2>/dev/null; then
|
2013-04-02 15:25:19 +00:00
|
|
|
QMAKE_CFLAGS_XKB="`$PKG_CONFIG --cflags xcb xcb-xkb 2>/dev/null`"
|
|
|
|
QMAKE_LIBS_XKB="`$PKG_CONFIG --libs xcb xcb-xkb 2>/dev/null`"
|
|
|
|
fi
|
2016-05-20 09:42:11 +00:00
|
|
|
if compileTest qpa/xcb-xkb "xcb-xkb" $QMAKE_CFLAGS_XKB $QMAKE_LIBS_XKB; then
|
|
|
|
CFG_XKB=yes
|
|
|
|
else
|
2013-04-02 15:25:19 +00:00
|
|
|
QMakeVar add DEFINES QT_NO_XKB
|
2012-10-29 11:59:09 +00:00
|
|
|
fi
|
|
|
|
|
2016-05-20 09:42:11 +00:00
|
|
|
XCB_PACKAGES="xcb xcb-shm xcb-sync xcb-xfixes xcb-randr xcb-image xcb-keysyms xcb-icccm xcb-shape"
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "$XCB_PACKAGES" 2>/dev/null; then
|
|
|
|
QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags $XCB_PACKAGES 2>/dev/null`"
|
|
|
|
QMAKE_LIBS_XCB="`$PKG_CONFIG --libs $XCB_PACKAGES 2>/dev/null`"
|
|
|
|
fi
|
2012-10-29 11:59:09 +00:00
|
|
|
if compileTest qpa/xcb-syslibs "xcb-syslibs" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
2016-05-20 09:42:11 +00:00
|
|
|
CFG_XCB="system"
|
2012-10-29 11:59:09 +00:00
|
|
|
if compileTest qpa/xcb-render "xcb-render" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
|
|
|
QT_CONFIG="$QT_CONFIG xcb-render"
|
|
|
|
fi
|
|
|
|
else
|
2016-05-20 09:42:11 +00:00
|
|
|
if [ "$CFG_XCB" != "auto" ]; then
|
|
|
|
echo "The test for linking against libxcb and support libraries failed"
|
|
|
|
echo "(need $XCB_PACKAGES)."
|
|
|
|
echo "You might need to install dependency packages, or pass -qt-xcb."
|
|
|
|
echo "See src/plugins/platforms/xcb/README."
|
|
|
|
[ -z "$PKG_CONFIG" ] && echo "Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CFG_XCB="no"
|
2012-10-29 11:59:09 +00:00
|
|
|
fi
|
2012-10-01 08:17:21 +00:00
|
|
|
fi
|
2016-05-20 09:42:11 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_XCB" != "no" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG xcb-plugin"
|
|
|
|
|
|
|
|
# Other deps that are not bundled with -qt-xcb and therefore need to be
|
|
|
|
# checked for both -qt-xcb and -system-xcb
|
|
|
|
|
|
|
|
if compileTest qpa/xcb-glx "xcb-glx" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
|
|
|
CFG_XCB_GLX=yes
|
|
|
|
QT_CONFIG="$QT_CONFIG xcb-glx"
|
|
|
|
fi
|
2012-10-01 08:17:21 +00:00
|
|
|
|
2013-11-28 11:07:09 +00:00
|
|
|
if [ "$CFG_XCB_XLIB" != "no" ]; then
|
|
|
|
if compileTest qpa/xcb-xlib "xcb-xlib" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
|
|
|
QT_CONFIG="$QT_CONFIG xcb-xlib"
|
2013-11-28 13:38:08 +00:00
|
|
|
CFG_XCB_XLIB=yes
|
|
|
|
else
|
|
|
|
CFG_XCB_XLIB=no
|
2013-11-28 11:07:09 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2011-10-14 13:55:35 +00:00
|
|
|
|
2013-09-11 15:22:45 +00:00
|
|
|
if [ "$CFG_SM" != "no" ] && [ -n "$PKG_CONFIG" ]; then
|
|
|
|
if $PKG_CONFIG --exists "sm" 2>/dev/null && $PKG_CONFIG --exists "ice" 2>/dev/null; then
|
|
|
|
QT_CONFIG="$QT_CONFIG xcb-sm"
|
|
|
|
fi
|
|
|
|
fi
|
2012-03-07 14:07:07 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2012-03-07 14:07:07 +00:00
|
|
|
|
2012-02-28 09:00:32 +00:00
|
|
|
if [ "$CFG_DIRECTFB" != "no" ]; then
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then
|
|
|
|
QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
|
|
|
|
QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest qpa/directfb "DirectFB" $QMAKE_CFLAGS_DIRECTFB $QMAKE_LIBS_DIRECTFB; then
|
2012-04-18 13:56:26 +00:00
|
|
|
CFG_DIRECTFB=yes
|
|
|
|
elif [ "$CFG_DIRECTFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo " DirectFB support cannot be enabled due to functionality tests!"
|
2014-11-20 07:02:14 +00:00
|
|
|
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
|
2012-04-18 13:56:26 +00:00
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_DIRECTFB=no
|
|
|
|
fi
|
2012-02-28 09:00:32 +00:00
|
|
|
else
|
|
|
|
CFG_DIRECTFB=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-10-13 14:09:51 +00:00
|
|
|
if [ "$CFG_GBM" != "no" ]; then
|
|
|
|
if compileTest qpa/gbm "GBM"; then
|
|
|
|
CFG_GBM=yes
|
|
|
|
elif [ "$CFG_GBM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo " GBM support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_GBM=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-07-02 21:30:41 +00:00
|
|
|
if [ "$CFG_LINUXFB" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest qpa/linuxfb "LinuxFB"; then
|
2012-07-02 21:30:41 +00:00
|
|
|
CFG_LINUXFB=yes
|
|
|
|
elif [ "$CFG_LINUXFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo " Linux Framebuffer support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_LINUXFB=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-07-16 13:13:18 +00:00
|
|
|
if [ "$CFG_KMS" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest qpa/kms "KMS"; then
|
2012-07-16 13:13:18 +00:00
|
|
|
CFG_KMS=yes
|
|
|
|
elif [ "$CFG_KMS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo " KMS support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_KMS=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-08-07 12:28:14 +00:00
|
|
|
if [ "$CFG_MIRCLIENT" != "no" ]; then
|
|
|
|
if compileTest qpa/mirclient "Mir client"; then
|
|
|
|
CFG_MIRCLIENT=yes
|
|
|
|
elif [ "$CFG_MIRCLIENT" = "yes" ]; then
|
|
|
|
echo " Mir client support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_MIRCLIENT=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
# Detect libxkbcommon
|
2014-03-28 15:22:14 +00:00
|
|
|
MIN_REQ_XKBCOMMON="0.4.1"
|
2014-02-05 15:25:06 +00:00
|
|
|
# currently only xcb platform plugin supports building xkbcommon
|
|
|
|
if [ "$CFG_XCB" != "no" ]; then
|
2014-07-01 01:37:55 +00:00
|
|
|
if [ "$CFG_XKBCOMMON" != "no" ] && [ "$CFG_XKBCOMMON" != "qt" ]; then
|
|
|
|
# Check if there is a suitable system-wide xkbcommon
|
2014-03-28 15:22:14 +00:00
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkbcommon xkbcommon-x11 >= $MIN_REQ_XKBCOMMON" 2>/dev/null; then
|
2014-02-05 15:25:06 +00:00
|
|
|
QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon xkbcommon-x11 2>/dev/null`"
|
|
|
|
QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon xkbcommon-x11 2>/dev/null`"
|
2013-04-11 08:51:49 +00:00
|
|
|
|
|
|
|
QMakeVar set QMAKE_CFLAGS_XKBCOMMON "$QMAKE_CFLAGS_XKBCOMMON"
|
|
|
|
QMakeVar set QMAKE_LIBS_XKBCOMMON "$QMAKE_LIBS_XKBCOMMON"
|
2013-08-03 15:00:19 +00:00
|
|
|
CFG_XKBCOMMON=system
|
2014-07-01 01:37:55 +00:00
|
|
|
elif [ "$CFG_XKBCOMMON" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo " xkbcommon support cannot be enabled because either xkbcommon or "
|
|
|
|
echo " xkbcommon-x11 >= $MIN_REQ_XKBCOMMON was not found via pkg-config!"
|
2014-11-20 07:02:14 +00:00
|
|
|
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
|
2014-07-01 01:37:55 +00:00
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
2013-04-11 08:51:49 +00:00
|
|
|
else
|
|
|
|
# use the bundled version instead
|
|
|
|
CFG_XKBCOMMON=qt
|
|
|
|
fi
|
|
|
|
fi
|
2014-02-05 15:25:06 +00:00
|
|
|
if [ "$CFG_XKBCOMMON" = "qt" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG xkbcommon-qt"
|
|
|
|
# detect XKB config root
|
|
|
|
if [ "$CFG_XKB_CONFIG_ROOT" = "auto" ]; then
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkeyboard-config" 2> /dev/null; then
|
|
|
|
CFG_XKB_CONFIG_ROOT="`$PKG_CONFIG --variable=xkb_base xkeyboard-config`"
|
|
|
|
else
|
|
|
|
# search for xkb configs in most probable locations
|
|
|
|
if [ -d "/usr/share/X11/xkb" ]; then
|
|
|
|
# Linux
|
|
|
|
CFG_XKB_CONFIG_ROOT="/usr/share/X11/xkb"
|
|
|
|
elif [ -d "/usr/local/share/X11/xkb" ]; then
|
|
|
|
# BSD UNIX
|
|
|
|
CFG_XKB_CONFIG_ROOT="/usr/local/share/X11/xkb"
|
|
|
|
fi
|
2014-03-04 15:26:07 +00:00
|
|
|
fi
|
|
|
|
fi
|
2014-02-05 15:25:06 +00:00
|
|
|
QMakeVar set QMAKE_XKB_CONFIG_ROOT "$CFG_XKB_CONFIG_ROOT"
|
|
|
|
if [ "$CFG_XKB_CONFIG_ROOT" = "auto" ]; then
|
|
|
|
CFG_XKB_CONFIG_ROOT="not found"
|
|
|
|
fi
|
2014-03-04 15:26:07 +00:00
|
|
|
fi
|
2014-02-05 15:25:06 +00:00
|
|
|
else
|
|
|
|
CFG_XKBCOMMON=no
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# EGL Support
|
2013-11-19 15:53:21 +00:00
|
|
|
if [ "$CFG_EGL" != "no" ]; then
|
|
|
|
if [ "$CFG_EGL" = "yes" ] && [ "$CFG_OPENGL" = "no" ]; then
|
2013-11-12 08:25:23 +00:00
|
|
|
echo "EGL support was requested but OpenGL support is disabled."
|
2013-11-19 15:53:21 +00:00
|
|
|
echo "Either disable EGL support or enable OpenGL support."
|
2013-06-12 22:21:04 +00:00
|
|
|
exit 101
|
2013-11-19 15:53:21 +00:00
|
|
|
fi
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
|
|
|
|
QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
|
|
|
|
QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
|
|
|
|
QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
|
|
|
|
QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
|
|
|
|
QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
|
2013-10-07 18:07:07 +00:00
|
|
|
QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`"
|
2012-03-26 20:13:58 +00:00
|
|
|
fi # detect EGL support
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_EGL=yes
|
2014-02-06 11:10:11 +00:00
|
|
|
if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
|
|
|
|
CFG_EGL_X=yes
|
|
|
|
else
|
|
|
|
CFG_EGL_X=no
|
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
elif [ "$CFG_EGL" = "yes" ]; then
|
|
|
|
echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
|
2014-11-20 07:02:14 +00:00
|
|
|
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
|
2012-03-26 20:13:58 +00:00
|
|
|
echo " You might need to modify the include and library search paths by editing"
|
|
|
|
echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
CFG_EGL=no
|
2014-02-06 11:10:11 +00:00
|
|
|
CFG_EGL_X=no
|
2012-03-07 14:07:07 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2012-03-07 14:07:07 +00:00
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$CFG_EGLFS" != "no" ]; then
|
2014-03-12 15:56:19 +00:00
|
|
|
if [ "$XPLATFORM_QNX" = "no" ] && [ "$CFG_OPENGL" != "no" ]; then
|
2012-04-16 05:04:33 +00:00
|
|
|
CFG_EGLFS="$CFG_EGL"
|
2015-03-02 15:09:22 +00:00
|
|
|
# Detect eglfs backends.
|
|
|
|
if compileTest qpa/eglfs-brcm "eglfs-brcm"; then
|
|
|
|
CFG_EGLFS_BRCM=yes
|
|
|
|
else
|
|
|
|
CFG_EGLFS_BRCM=no
|
|
|
|
fi
|
2015-10-13 14:07:19 +00:00
|
|
|
if compileTest qpa/eglfs-egldevice "eglfs-egldevice"; then
|
|
|
|
CFG_EGLFS_EGLDEVICE=yes
|
|
|
|
else
|
|
|
|
CFG_EGLFS_EGLDEVICE=no
|
|
|
|
fi
|
2015-09-16 09:32:57 +00:00
|
|
|
if compileTest qpa/eglfs-mali "eglfs-mali" \
|
|
|
|
|| compileTest qpa/eglfs-mali-2 "eglfs-mali-2"; then
|
2015-03-02 15:09:22 +00:00
|
|
|
CFG_EGLFS_MALI=yes
|
|
|
|
else
|
|
|
|
CFG_EGLFS_MALI=no
|
|
|
|
fi
|
|
|
|
if compileTest qpa/eglfs-viv "eglfs-viv"; then
|
|
|
|
CFG_EGLFS_VIV=yes
|
|
|
|
else
|
|
|
|
CFG_EGLFS_VIV=no
|
|
|
|
fi
|
2015-10-29 13:11:29 +00:00
|
|
|
if [ "$CFG_EGLFS_VIV" = "yes" ] && compileTest qpa/wayland-server "wayland-server"; then
|
|
|
|
CFG_EGLFS_VIV_WL=yes
|
|
|
|
else
|
|
|
|
CFG_EGLFS_VIV_WL=no
|
|
|
|
fi
|
2012-04-16 05:04:33 +00:00
|
|
|
else
|
|
|
|
CFG_EGLFS="no"
|
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2011-06-01 09:00:58 +00:00
|
|
|
|
2012-05-10 21:52:05 +00:00
|
|
|
# Detect accessibility support
|
2013-01-18 15:36:42 +00:00
|
|
|
if [ "$CFG_ACCESSIBILITY" = "no" ]; then
|
|
|
|
echo >&2 "Warning: Disabling Accessibility. This version of Qt is unsupported."
|
|
|
|
else
|
|
|
|
CFG_ACCESSIBILITY=yes
|
|
|
|
|
|
|
|
# linux/xcb accessibility bridge needs dbus
|
|
|
|
if [ "$CFG_XCB" != "no" ]; then
|
|
|
|
if [ "$CFG_DBUS" != "no" ]; then
|
|
|
|
CFG_ACCESSIBILITY_ATSPI_BRIDGE=yes
|
|
|
|
QT_CONFIG="$QT_CONFIG accessibility-atspi-bridge"
|
2012-05-10 21:52:05 +00:00
|
|
|
else
|
2013-01-18 15:36:42 +00:00
|
|
|
echo >&2 "Warning: Disabling Linux Accessibility Bridge: DBus is missing."
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY_ATSPI_BRIDGE"
|
2012-05-10 21:52:05 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-04-18 22:57:00 +00:00
|
|
|
# Determine the default QPA platform
|
|
|
|
if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
|
|
|
|
# check the mkspec
|
|
|
|
QT_QPA_DEFAULT_PLATFORM=`getXQMakeConf QT_QPA_DEFAULT_PLATFORM`
|
|
|
|
if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
|
2012-05-15 11:53:46 +00:00
|
|
|
if [ "$XPLATFORM_MINGW" = "yes" ]; then
|
|
|
|
QT_QPA_DEFAULT_PLATFORM="windows"
|
2013-11-12 21:01:44 +00:00
|
|
|
elif [ "$XPLATFORM_MAC" = "yes" ]; then
|
2012-04-18 22:57:00 +00:00
|
|
|
QT_QPA_DEFAULT_PLATFORM="cocoa"
|
|
|
|
elif [ "$UNAME_SYSTEM" = "QNX" ]; then
|
|
|
|
QT_QPA_DEFAULT_PLATFORM="qnx"
|
2015-10-29 14:59:48 +00:00
|
|
|
elif [ "$XPLATFORM_INTEGRITY" = "yes" ]; then
|
|
|
|
QT_QPA_DEFAULT_PLATFORM="integrityfb"
|
2012-04-18 22:57:00 +00:00
|
|
|
else
|
|
|
|
QT_QPA_DEFAULT_PLATFORM="xcb"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
|
|
|
|
QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
|
|
|
|
QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
|
|
|
|
fi
|
2013-03-14 15:35:23 +00:00
|
|
|
|
2012-04-18 13:56:26 +00:00
|
|
|
if [ "$CFG_DIRECTFB" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG directfb"
|
2012-02-28 09:00:32 +00:00
|
|
|
QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
|
|
|
|
QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB"
|
|
|
|
fi
|
2015-10-13 14:09:51 +00:00
|
|
|
if [ "$CFG_GBM" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG gbm"
|
|
|
|
fi
|
2012-07-02 21:30:41 +00:00
|
|
|
if [ "$CFG_LINUXFB" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG linuxfb"
|
|
|
|
fi
|
2015-10-29 14:59:48 +00:00
|
|
|
if [ "$CFG_INTEGRITYFB" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG integrityfb"
|
|
|
|
fi
|
2012-07-16 13:13:18 +00:00
|
|
|
if [ "$CFG_KMS" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG kms"
|
|
|
|
fi
|
2015-08-07 12:28:14 +00:00
|
|
|
if [ "$CFG_MIRCLIENT" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG mirclient"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2015-10-15 13:40:26 +00:00
|
|
|
# double-conversion support
|
|
|
|
if [ "$CFG_DOUBLECONVERSION" = "no" ]; then
|
|
|
|
if ! compileTest common/xlocalescanprint "XLocaleScanPrint"; then
|
|
|
|
echo "Your C library does not provide sscanf_l or snprintf_l."
|
|
|
|
echo "You need to use libdouble-conversion for double/string conversion."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
elif [ "$CFG_DOUBLECONVERSION" != "qt" ]; then
|
|
|
|
if compileTest unix/doubleconversion "DoubleConversion"; then
|
|
|
|
CFG_DOUBLECONVERSION=system
|
|
|
|
elif [ "$CFG_DOUBLECONVERSION" = "system" ]; then
|
|
|
|
echo "No system libdouble-conversion found."
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
CFG_DOUBLECONVERSION=qt
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# freetype support
|
2013-09-08 03:20:43 +00:00
|
|
|
[ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_FREETYPE" = "auto" ] && CFG_FREETYPE=no
|
|
|
|
if [ "$CFG_FREETYPE" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/freetype "FreeType"; then
|
2013-09-08 03:20:43 +00:00
|
|
|
CFG_FREETYPE=system
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
2013-09-08 03:20:43 +00:00
|
|
|
CFG_FREETYPE=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2013-08-26 15:44:36 +00:00
|
|
|
# harfbuzz support
|
2015-11-05 01:33:11 +00:00
|
|
|
[ "$XPLATFORM_MAC" = "yes" ] && [ "$CFG_HARFBUZZ" = "auto" ] && CFG_HARFBUZZ=qt
|
|
|
|
if [ "$CFG_HARFBUZZ" = "auto" ] || [ "$CFG_HARFBUZZ" = "system" ]; then
|
|
|
|
if compileTest unix/harfbuzz "HarfBuzz"; then
|
|
|
|
CFG_HARFBUZZ=system
|
|
|
|
else
|
|
|
|
if [ "$CFG_HARFBUZZ" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
2014-07-08 16:49:18 +00:00
|
|
|
echo " HarfBuzz system library support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_HARFBUZZ=qt
|
|
|
|
fi
|
2013-08-26 15:44:36 +00:00
|
|
|
fi
|
|
|
|
fi
|
2014-07-08 16:49:18 +00:00
|
|
|
if [ "$XPLATFORM_MAC" = "yes" -a "$CFG_HARFBUZZ" != "qt" ]; then
|
2014-01-29 15:46:47 +00:00
|
|
|
echo
|
2014-07-08 16:49:18 +00:00
|
|
|
echo "WARNING: On OS X, AAT is supported only with -qt-harfbuzz."
|
2014-01-29 15:46:47 +00:00
|
|
|
echo
|
|
|
|
fi
|
2013-08-26 15:44:36 +00:00
|
|
|
|
2012-08-12 08:14:59 +00:00
|
|
|
if ! compileTest unix/stl "STL" &&
|
2012-03-26 17:57:40 +00:00
|
|
|
[ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "STL functionality check failed! Cannot build Qt with this STL library."
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
exit 101
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# detect POSIX clock_gettime()
|
|
|
|
if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/clock-gettime "POSIX clock_gettime()"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_CLOCK_GETTIME=yes
|
|
|
|
else
|
|
|
|
CFG_CLOCK_GETTIME=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect POSIX monotonic clocks
|
|
|
|
if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/clock-monotonic "POSIX Monotonic Clock"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_CLOCK_MONOTONIC=yes
|
|
|
|
else
|
|
|
|
CFG_CLOCK_MONOTONIC=no
|
|
|
|
fi
|
|
|
|
elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
|
|
|
|
CFG_CLOCK_MONOTONIC=no
|
|
|
|
fi
|
|
|
|
|
2013-11-11 15:04:46 +00:00
|
|
|
# detect posix_fallocate
|
|
|
|
if [ "$CFG_POSIX_FALLOCATE" = "auto" ]; then
|
|
|
|
if compileTest unix/posix_fallocate "posix_fallocate"; then
|
|
|
|
CFG_POSIX_FALLOCATE=yes
|
|
|
|
else
|
|
|
|
CFG_POSIX_FALLOCATE=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# detect mremap
|
|
|
|
if [ "$CFG_MREMAP" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/mremap "mremap"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_MREMAP=yes
|
|
|
|
else
|
|
|
|
CFG_MREMAP=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# find if the platform provides getaddrinfo (ipv6 dns lookups)
|
|
|
|
if [ "$CFG_GETADDRINFO" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/getaddrinfo "getaddrinfo"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_GETADDRINFO=yes
|
|
|
|
else
|
|
|
|
if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "getaddrinfo support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_GETADDRINFO=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# find if the platform provides inotify
|
|
|
|
if [ "$CFG_INOTIFY" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/inotify "inotify"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_INOTIFY=yes
|
|
|
|
else
|
|
|
|
if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "inotify support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_INOTIFY=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-10-25 19:38:13 +00:00
|
|
|
# find if the platform provides eventfd
|
|
|
|
if [ "$CFG_EVENTFD" != "no" ]; then
|
|
|
|
if compileTest unix/eventfd "eventfd"; then
|
|
|
|
CFG_EVENTFD=yes
|
|
|
|
else
|
|
|
|
if [ "$CFG_EVENTFD" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "eventfd support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_EVENTFD=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# find if the platform provides if_nametoindex (ipv6 interface name support)
|
|
|
|
if [ "$CFG_IPV6IFNAME" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/ipv6ifname "IPv6 interface name"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_IPV6IFNAME=yes
|
|
|
|
else
|
|
|
|
if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "IPv6 interface name support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_IPV6IFNAME=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# find if the platform provides getifaddrs (network interface enumeration)
|
|
|
|
if [ "$CFG_GETIFADDRS" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/getifaddrs "getifaddrs"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_GETIFADDRS=yes
|
|
|
|
else
|
|
|
|
if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "getifaddrs support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_GETIFADDRS=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-07-11 05:09:15 +00:00
|
|
|
# find if the platform provides thread-safe CLOEXEC support
|
2015-07-20 07:07:12 +00:00
|
|
|
if compileTest unix/cloexec "cloexec"; then
|
2015-07-11 05:09:15 +00:00
|
|
|
CFG_CLOEXEC=yes
|
|
|
|
fi
|
|
|
|
|
2015-10-15 13:04:17 +00:00
|
|
|
if compileTest unix/ppoll "ppoll"; then
|
|
|
|
CFG_POLL="ppoll"
|
|
|
|
elif compileTest unix/pollts "pollts"; then
|
|
|
|
CFG_POLL="pollts"
|
|
|
|
elif compileTest unix/poll "poll"; then
|
|
|
|
CFG_POLL="poll"
|
|
|
|
else
|
|
|
|
CFG_POLL="select"
|
|
|
|
fi
|
|
|
|
|
2015-08-06 08:24:34 +00:00
|
|
|
if [ "$XPLATFORM_MAC" = "yes" ] && [ "$CFG_SECURETRANSPORT" != "no" ] && ([ "$CFG_OPENSSL" = "no" ] || [ "$CFG_OPENSSL" = "auto" ]); then
|
|
|
|
CFG_SECURETRANSPORT=yes
|
|
|
|
CFG_OPENSSL=no
|
|
|
|
else
|
|
|
|
CFG_SECURETRANSPORT=no
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# detect OpenSSL
|
2011-11-07 09:16:21 +00:00
|
|
|
if [ "$CFG_OPENSSL" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/openssl "OpenSSL"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_OPENSSL" = "auto" ]; then
|
|
|
|
CFG_OPENSSL=yes
|
|
|
|
fi
|
|
|
|
else
|
2014-11-24 11:15:34 +00:00
|
|
|
if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "OpenSSL support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_OPENSSL=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-08-22 15:20:49 +00:00
|
|
|
|
2012-01-23 22:31:13 +00:00
|
|
|
# detect PCRE
|
|
|
|
if [ "$CFG_PCRE" != "qt" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/pcre "PCRE"; then
|
2012-01-23 22:31:13 +00:00
|
|
|
CFG_PCRE=system
|
|
|
|
else
|
|
|
|
if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "PCRE support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
echo " If you believe this message is in error you may use the continue"
|
|
|
|
echo " switch (-continue) to $0 to continue."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
CFG_PCRE=qt
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-11-07 09:16:21 +00:00
|
|
|
if [ "$CFG_ALSA" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/alsa "alsa"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_ALSA=yes
|
|
|
|
else
|
|
|
|
CFG_ALSA=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-02-13 15:41:58 +00:00
|
|
|
# detect GStreamer support
|
|
|
|
if [ "$CFG_GSTREAMER" = "auto" ] || [ "$CFG_GSTREAMER" = "yes" ]; then
|
2015-08-25 15:28:13 +00:00
|
|
|
if compileTest unix/gstreamer "GStreamer 1.0" -config gst-1.0; then
|
2015-02-13 15:41:58 +00:00
|
|
|
CFG_GSTREAMER=yes
|
|
|
|
CFG_GSTREAMER_VERSION=1.0
|
2015-08-25 15:28:13 +00:00
|
|
|
elif compileTest unix/gstreamer "GStreamer 0.10" -config gst-0.10; then
|
|
|
|
CFG_GSTREAMER=yes
|
|
|
|
CFG_GSTREAMER_VERSION=0.10
|
2015-02-13 15:41:58 +00:00
|
|
|
else
|
|
|
|
if [ "$CFG_GSTREAMER" = "yes" ]; then
|
|
|
|
echo "GStreamer support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CFG_GSTREAMER=no
|
|
|
|
fi
|
|
|
|
elif [ "$CFG_GSTREAMER" = "0.10" ]; then
|
|
|
|
if compileTest unix/gstreamer "GStreamer 0.10" -config gst-0.10; then
|
|
|
|
CFG_GSTREAMER=yes
|
|
|
|
CFG_GSTREAMER_VERSION=0.10
|
|
|
|
else
|
|
|
|
echo "The GStreamer 0.10 functionality test failed!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
elif [ "$CFG_GSTREAMER" = "1.0" ]; then
|
|
|
|
if compileTest unix/gstreamer "GStreamer 1.0" -config gst-1.0; then
|
|
|
|
CFG_GSTREAMER=yes
|
|
|
|
CFG_GSTREAMER_VERSION=1.0
|
|
|
|
else
|
|
|
|
echo "The GStreamer 1.0 functionality test failed!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
Add color font support on Windows
Detect if DirectWrite 2 is available, and support color fonts if possible.
One limitation worth mentioning is that if the color font contains regular,
monochrome glyphs as well, then these will be drawn in black, and not in the
pen color. Fixing this would require some elaborate rewrites in the font
rendering system, since we would have to have two font caches per
color font (one for mono and one for colors), or do some sort of trick where
we make argb(r, g, b, 0) mean subpixel alpha instead, and detect glyphs that
are not correctly premultiplied when blitting to the screen.
Another limitation is that the approach does not work with distance field
rendering. In principle we could support this on Windows, since the
format is vector based, but it would also require substantial work and
it is not possible to support for Apple/Google fonts anyway, so it would
just lead to code which is not cross-platform.
[ChangeLog][Windows] Added support for color fonts (color emojis) when
DirectWrite 2 is available.
Change-Id: I6a608dd5d2aa3a7e762a06830902bddac7c550a5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-16 14:52:28 +00:00
|
|
|
# Detect DirectWrite 2 support on Windows
|
|
|
|
if [ "$CFG_DIRECTWRITE" = "no" ]; then
|
|
|
|
CFG_DIRECTWRITE2=no
|
|
|
|
fi
|
|
|
|
if [ "$CFG_DIRECTWRITE2" = "auto" ]; then
|
|
|
|
if compileTest win/directwrite2 "directwrite2"; then
|
|
|
|
CFG_DIRECTWRITE2=yes
|
|
|
|
else
|
|
|
|
CFG_DIRECTWRITE2=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# ask for all that hasn't been auto-detected or specified in the arguments
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2015-07-09 23:33:33 +00:00
|
|
|
# Set "c++11" unconditionally, as lots of code does contains(QT_CONFIG, c++11)
|
|
|
|
QT_CONFIG="$QT_CONFIG c++11"
|
|
|
|
if [ "$CFG_STDCXX" != "c++11" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG c++14"
|
|
|
|
if [ "$CFG_STDCXX" != "c++14" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG c++1z"
|
2015-07-09 00:21:30 +00:00
|
|
|
fi
|
|
|
|
fi
|
2012-05-29 05:10:09 +00:00
|
|
|
|
2016-03-15 08:46:32 +00:00
|
|
|
if [ "$CFG_STD_ATOMIC64" = "libatomic" ]; then
|
2015-09-08 23:35:33 +00:00
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG atomic64-libatomic"
|
|
|
|
fi
|
2012-05-29 05:10:09 +00:00
|
|
|
|
2013-11-13 13:59:30 +00:00
|
|
|
if [ "$CFG_SILENT" = "yes" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG silent"
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# disable accessibility
|
|
|
|
if [ "$CFG_ACCESSIBILITY" = "no" ]; then
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
|
|
|
|
else
|
|
|
|
QT_CONFIG="$QT_CONFIG accessibility"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# enable egl
|
2012-03-07 14:07:07 +00:00
|
|
|
if [ "$CFG_EGL" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG egl"
|
|
|
|
else
|
2011-04-27 10:05:43 +00:00
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
|
2012-03-07 14:07:07 +00:00
|
|
|
fi
|
|
|
|
|
2014-02-06 11:10:11 +00:00
|
|
|
# enable egl on X
|
|
|
|
if [ "$CFG_EGL_X" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG egl_x11"
|
|
|
|
else
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL_X11"
|
|
|
|
fi
|
|
|
|
|
2012-03-07 14:07:07 +00:00
|
|
|
# enable eglfs
|
|
|
|
if [ "$CFG_EGLFS" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG eglfs"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
2012-03-07 14:07:07 +00:00
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2015-03-02 15:09:22 +00:00
|
|
|
# eglfs backends
|
|
|
|
if [ "$CFG_EGLFS_BRCM" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG eglfs_brcm"
|
|
|
|
fi
|
2015-10-13 14:07:19 +00:00
|
|
|
if [ "$CFG_EGLFS_EGLDEVICE" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG eglfs_egldevice"
|
|
|
|
fi
|
2015-10-13 14:09:51 +00:00
|
|
|
if [ "$CFG_EGLFS" = "yes" ] && [ "$CFG_KMS" = "yes" ] && [ "$CFG_GBM" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG eglfs_gbm"
|
|
|
|
CFG_EGLFS_GBM="yes"
|
|
|
|
else
|
|
|
|
CFG_EGLFS_GBM="no"
|
|
|
|
fi
|
2015-03-02 15:09:22 +00:00
|
|
|
if [ "$CFG_EGLFS_MALI" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG eglfs_mali"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_EGLFS_VIV" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG eglfs_viv"
|
2015-10-29 13:11:29 +00:00
|
|
|
if [ "$CFG_EGLFS_VIV_WL" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG eglfs_viv_wl"
|
|
|
|
fi
|
2015-03-02 15:09:22 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# enable opengl
|
|
|
|
if [ "$CFG_OPENGL" = "no" ]; then
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
|
|
|
|
else
|
|
|
|
QT_CONFIG="$QT_CONFIG opengl"
|
|
|
|
fi
|
|
|
|
|
2011-08-16 10:53:04 +00:00
|
|
|
if [ "$CFG_OPENGL" = "es2" ]; then
|
2013-11-12 08:25:23 +00:00
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG opengles2"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_SHARED" = "yes" ]; then
|
2012-05-30 10:09:00 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG shared"
|
2013-02-15 18:28:28 +00:00
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
|
2011-04-27 10:05:43 +00:00
|
|
|
elif [ "$CFG_SHARED" = "no" ]; then
|
2012-05-30 10:09:00 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG static"
|
2013-02-15 18:28:28 +00:00
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG static"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG largefile"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
|
|
|
|
fi
|
|
|
|
[ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
|
2012-09-20 12:11:25 +00:00
|
|
|
[ "$CFG_STACK_PROTECTOR_STRONG" = "yes" ] && QT_CONFIG="$QT_CONFIG stack-protector-strong"
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
|
2012-09-14 14:04:59 +00:00
|
|
|
[ "$CFG_STRIP" = "no" ] && QMAKE_CONFIG="$QMAKE_CONFIG nostrip"
|
2016-04-14 20:48:15 +00:00
|
|
|
if testXConfig precompile_header; then
|
|
|
|
[ "$CFG_PRECOMPILE" = "no" ] && QMakeVar del CONFIG precompile_header
|
|
|
|
else
|
|
|
|
[ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
|
|
|
|
fi
|
2014-07-01 09:46:50 +00:00
|
|
|
[ "$CFG_USE_GOLD_LINKER" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG use_gold_linker"
|
2015-04-22 11:09:36 +00:00
|
|
|
[ "$CFG_ENABLE_NEW_DTAGS" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG enable_new_dtags"
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
|
2011-08-15 13:36:08 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG separate_debug_info"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
[ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
|
|
|
|
[ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
|
|
|
|
[ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
|
|
|
|
[ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
|
|
|
|
[ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
|
|
|
|
[ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
|
2011-12-30 00:44:16 +00:00
|
|
|
[ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
|
2015-07-17 21:46:05 +00:00
|
|
|
for feature in $CFG_AVX512; do
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG avx512$feature"
|
|
|
|
done
|
2014-06-25 00:03:53 +00:00
|
|
|
[ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
|
2012-03-02 16:43:52 +00:00
|
|
|
if [ "$CFG_ARCH" = "mips" ]; then
|
|
|
|
[ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
|
|
|
|
[ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG clock-gettime"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG clock-monotonic"
|
|
|
|
fi
|
2013-11-11 15:04:46 +00:00
|
|
|
if [ "$CFG_POSIX_FALLOCATE" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG posix_fallocate"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_MREMAP" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG mremap"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_GETADDRINFO" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG getaddrinfo"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_IPV6IFNAME" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG ipv6ifname"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_GETIFADDRS" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG getifaddrs"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_INOTIFY" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG inotify"
|
|
|
|
fi
|
2012-10-25 19:38:13 +00:00
|
|
|
if [ "$CFG_EVENTFD" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG eventfd"
|
|
|
|
fi
|
2015-07-11 05:09:15 +00:00
|
|
|
if [ "$CFG_CLOEXEC" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG threadsafe-cloexec"
|
|
|
|
fi
|
2015-10-15 13:04:17 +00:00
|
|
|
if [ "$CFG_POLL" = "select" ]; then
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NATIVE_POLL"
|
|
|
|
fi
|
|
|
|
QT_CONFIG="$QT_CONFIG poll_$CFG_POLL"
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_LIBJPEG" = "no" ]; then
|
|
|
|
CFG_JPEG="no"
|
|
|
|
elif [ "$CFG_LIBJPEG" = "system" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG system-jpeg"
|
|
|
|
fi
|
2016-04-06 08:15:14 +00:00
|
|
|
if [ "$CFG_JPEG" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG jpeg"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_LIBPNG" = "no" ]; then
|
|
|
|
CFG_PNG="no"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_LIBPNG" = "system" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG system-png"
|
|
|
|
fi
|
2016-04-06 08:15:14 +00:00
|
|
|
if [ "$CFG_PNG" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG png"
|
|
|
|
fi
|
2016-04-06 08:15:14 +00:00
|
|
|
if [ "$CFG_GIF" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG gif"
|
|
|
|
fi
|
2016-03-29 08:02:17 +00:00
|
|
|
if [ "$CFG_DOUBLECONVERSION" = "system" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG doubleconversion system-doubleconversion"
|
2016-05-31 09:47:43 +00:00
|
|
|
elif [ "$CFG_DOUBLECONVERSION" = "qt" ]; then
|
2015-10-15 13:40:26 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG doubleconversion"
|
|
|
|
fi
|
2013-09-08 03:20:43 +00:00
|
|
|
if [ "$CFG_FREETYPE" = "no" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
|
2013-09-08 03:20:43 +00:00
|
|
|
elif [ "$CFG_FREETYPE" = "system" ]; then
|
2016-03-29 08:02:17 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG freetype system-freetype"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
|
|
|
QT_CONFIG="$QT_CONFIG freetype"
|
|
|
|
fi
|
2013-08-26 15:44:36 +00:00
|
|
|
if [ "$CFG_HARFBUZZ" = "no" ]; then
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_HARFBUZZ"
|
|
|
|
elif [ "$CFG_HARFBUZZ" = "system" ]; then
|
2016-03-29 08:02:17 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG harfbuzz system-harfbuzz"
|
2013-08-26 15:44:36 +00:00
|
|
|
else
|
|
|
|
QT_CONFIG="$QT_CONFIG harfbuzz"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_GUI" = "auto" ]; then
|
|
|
|
CFG_GUI="yes"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_GUI" = "no" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG no-gui"
|
2012-03-07 00:11:44 +00:00
|
|
|
CFG_WIDGETS="no"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_WIDGETS" = "no" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG no-widgets"
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2013-11-12 21:01:44 +00:00
|
|
|
if [ "$XPLATFORM_MAC" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
#On Mac we implicitly link against libz, so we
|
|
|
|
#never use the 3rdparty stuff.
|
2016-02-19 14:18:47 +00:00
|
|
|
CFG_SYSTEM_ZLIB=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-02-19 14:18:47 +00:00
|
|
|
if [ "$CFG_SYSTEM_ZLIB" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG system-zlib"
|
|
|
|
fi
|
|
|
|
|
2013-12-20 15:14:31 +00:00
|
|
|
[ "$CFG_MTDEV" = "yes" ] && QT_CONFIG="$QT_CONFIG mtdev"
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
|
2016-03-29 08:02:17 +00:00
|
|
|
[ "$CFG_ICONV" != "no" ] && QT_CONFIG="$QT_CONFIG iconv"
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
|
|
|
|
[ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
|
|
|
|
[ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
|
2014-12-09 13:42:50 +00:00
|
|
|
[ "$CFG_DBUS" != "no" ] && QT_CONFIG="$QT_CONFIG dbus"
|
|
|
|
[ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus-linked"
|
2016-06-03 07:12:15 +00:00
|
|
|
[ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG ssl openssl"
|
|
|
|
[ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG ssl openssl-linked"
|
2014-08-22 15:20:49 +00:00
|
|
|
[ "$CFG_SECURETRANSPORT" = "yes" ] && QT_CONFIG="$QT_CONFIG ssl securetransport"
|
2015-01-27 17:41:32 +00:00
|
|
|
[ "$CFG_LIBPROXY" = "yes" ] && QT_CONFIG="$QT_CONFIG libproxy"
|
2012-10-29 11:59:09 +00:00
|
|
|
[ "$CFG_XCB" != "no" ] && QT_CONFIG="$QT_CONFIG xcb"
|
2011-10-14 13:55:35 +00:00
|
|
|
[ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
|
2012-10-23 13:31:20 +00:00
|
|
|
[ "$CFG_SYSTEM_PROXIES" = "yes" ] && QT_CONFIG="$QT_CONFIG system-proxies"
|
2012-12-10 20:34:48 +00:00
|
|
|
[ "$CFG_DIRECTWRITE" = "yes" ] && QT_CONFIG="$QT_CONFIG directwrite"
|
Add color font support on Windows
Detect if DirectWrite 2 is available, and support color fonts if possible.
One limitation worth mentioning is that if the color font contains regular,
monochrome glyphs as well, then these will be drawn in black, and not in the
pen color. Fixing this would require some elaborate rewrites in the font
rendering system, since we would have to have two font caches per
color font (one for mono and one for colors), or do some sort of trick where
we make argb(r, g, b, 0) mean subpixel alpha instead, and detect glyphs that
are not correctly premultiplied when blitting to the screen.
Another limitation is that the approach does not work with distance field
rendering. In principle we could support this on Windows, since the
format is vector based, but it would also require substantial work and
it is not possible to support for Apple/Google fonts anyway, so it would
just lead to code which is not cross-platform.
[ChangeLog][Windows] Added support for color fonts (color emojis) when
DirectWrite 2 is available.
Change-Id: I6a608dd5d2aa3a7e762a06830902bddac7c550a5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-16 14:52:28 +00:00
|
|
|
[ "$CFG_DIRECTWRITE2" = "yes" ] && QT_CONFIG="$QT_CONFIG directwrite2"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2016-03-08 18:38:59 +00:00
|
|
|
[ '!' -z "$DEFINES" ] && QMakeVar add EXTRA_DEFINES "$DEFINES"
|
|
|
|
[ '!' -z "$INCLUDES" ] && QMakeVar add EXTRA_INCLUDEPATH "$INCLUDES"
|
|
|
|
[ '!' -z "$L_FLAGS" ] && QMakeVar add EXTRA_LIBS "$L_FLAGS"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-08-07 11:04:48 +00:00
|
|
|
if [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ -n "$RPATH_FLAGS" ]; then
|
|
|
|
echo
|
|
|
|
echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
|
|
|
|
echo " undefined."
|
|
|
|
echo
|
|
|
|
exit 1
|
|
|
|
elif [ "$CFG_RPATH" = "yes" ]; then
|
|
|
|
RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
|
|
|
|
CFG_RPATH=no
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [ -n "$RPATH_FLAGS" ]; then
|
|
|
|
# add the user defined rpaths
|
2016-03-08 18:38:59 +00:00
|
|
|
QMakeVar add EXTRA_RPATHS "$RPATH_FLAGS"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
2012-08-09 13:02:44 +00:00
|
|
|
if [ "$CFG_RPATH" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG rpath"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2011-10-24 11:00:49 +00:00
|
|
|
if [ '!' -z "$W_FLAGS" ]; then
|
|
|
|
# add the user defined warning flags
|
2011-10-28 18:05:34 +00:00
|
|
|
QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
|
|
|
|
QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
|
2011-10-24 11:00:49 +00:00
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$XPLATFORM_MINGW" = "yes" ]; then
|
|
|
|
# mkspecs/features/win32/default_pre.prf sets "no-rtti".
|
|
|
|
# Follow default behavior of configure.exe by overriding with "rtti".
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_ALSA" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG alsa"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_PULSEAUDIO" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG pulseaudio"
|
|
|
|
fi
|
|
|
|
|
2015-02-13 15:41:58 +00:00
|
|
|
[ "$CFG_GSTREAMER_VERSION" = "0.10" ] && QT_CONFIG="$QT_CONFIG gstreamer-0.10"
|
|
|
|
[ "$CFG_GSTREAMER_VERSION" = "1.0" ] && QT_CONFIG="$QT_CONFIG gstreamer-1.0"
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_COREWLAN" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG corewlan"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_ICU" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG icu"
|
|
|
|
fi
|
|
|
|
|
2011-11-11 10:21:52 +00:00
|
|
|
if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG force_asserts"
|
|
|
|
fi
|
|
|
|
|
2015-10-29 13:59:59 +00:00
|
|
|
if [ "$CFG_LTCG" = "yes" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG ltcg"
|
|
|
|
fi
|
|
|
|
|
2014-09-30 07:50:22 +00:00
|
|
|
if [ "$CFG_SANITIZERS" != "none" ]; then
|
|
|
|
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitizer"
|
|
|
|
|
|
|
|
if [ "$CFG_SANITIZE_ADDRESS" = "yes" ]; then
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitize_address"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_SANITIZE_THREAD" = "yes" ]; then
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitize_thread"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_SANITIZE_MEMORY" = "yes" ]; then
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitize_memory"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_SANITIZE_UNDEFINED" = "yes" ]; then
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitize_undefined"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-01-23 22:31:13 +00:00
|
|
|
if [ "$CFG_PCRE" = "qt" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG pcre"
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_CONCURRENT="yes"
|
2016-02-17 11:53:57 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG concurrent"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-01-26 17:43:06 +00:00
|
|
|
# ### Vestige
|
2012-03-30 11:43:10 +00:00
|
|
|
if [ "$CFG_QML_DEBUG" = "no" ]; then
|
2015-07-02 15:33:08 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG no-qml-debug"
|
2011-05-09 05:34:25 +00:00
|
|
|
fi
|
|
|
|
|
2012-05-21 12:17:43 +00:00
|
|
|
case "$QMAKE_CONF_COMPILER" in
|
2013-03-21 20:21:33 +00:00
|
|
|
*clang*)
|
2012-12-22 02:03:00 +00:00
|
|
|
# Clang
|
2013-03-21 20:21:33 +00:00
|
|
|
COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n -E '
|
|
|
|
/^Apple (clang|LLVM) version /{s///; s/^([0-9]*)\.([0-9]*).*$/QT_APPLE_CLANG_MAJOR_VERSION=\1; QT_APPLE_CLANG_MINOR_VERSION=\2/;p;q;}
|
|
|
|
/^clang version /{s///; s/^([0-9]*)\.([0-9]*).*$/QT_CLANG_MAJOR_VERSION=\1; QT_CLANG_MINOR_VERSION=\2/;p;q;}'`
|
2012-12-22 02:03:00 +00:00
|
|
|
eval "$COMPILER_VERSION"
|
|
|
|
;;
|
2013-01-24 23:00:27 +00:00
|
|
|
*icpc)
|
|
|
|
# Intel CC
|
|
|
|
COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n '
|
|
|
|
s/icpc version \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\) .*$/QT_ICC_MAJOR_VERSION=\1; QT_ICC_MINOR_VERSION=\2; QT_ICC_PATCH_VERSION=\3/p'`
|
|
|
|
eval "$COMPILER_VERSION"
|
|
|
|
;;
|
2012-05-21 12:17:43 +00:00
|
|
|
*g++*)
|
2011-09-15 10:29:08 +00:00
|
|
|
# GNU C++
|
|
|
|
COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
|
|
|
|
|
|
|
|
case "$COMPILER_VERSION" in
|
|
|
|
*.*.*)
|
|
|
|
QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
|
|
|
|
QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
|
|
|
|
QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
|
|
|
|
;;
|
|
|
|
*.*)
|
|
|
|
QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
|
|
|
|
QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
|
|
|
|
QT_GCC_PATCH_VERSION=0
|
|
|
|
;;
|
2014-11-29 00:06:18 +00:00
|
|
|
*)
|
|
|
|
QT_GCC_MAJOR_VERSION=$COMPILER_VERSION
|
|
|
|
QT_GCC_MINOR_VERSION=0
|
|
|
|
QT_GCC_PATCH_VERSION=0
|
2011-09-15 10:29:08 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
#
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2015-09-28 18:19:36 +00:00
|
|
|
echo "Done running configuration tests."
|
|
|
|
|
2015-09-18 05:04:44 +00:00
|
|
|
# Save stdout in fd 3
|
|
|
|
exec 3>&1
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# part of configuration information goes into qconfig.h
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2015-09-18 05:04:44 +00:00
|
|
|
# Open qconfig.h.new
|
|
|
|
exec > "$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
|
2015-09-18 01:17:40 +00:00
|
|
|
# start with Qt's version number
|
2015-09-18 05:04:44 +00:00
|
|
|
cat <<EOF
|
2015-09-18 01:17:40 +00:00
|
|
|
#define QT_VERSION_MAJOR $QT_MAJOR_VERSION
|
|
|
|
#define QT_VERSION_MINOR $QT_MINOR_VERSION
|
|
|
|
#define QT_VERSION_PATCH $QT_PATCH_VERSION
|
|
|
|
#define QT_VERSION_STR "$QT_VERSION"
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2015-09-18 05:04:44 +00:00
|
|
|
echo '/* Compile time features */'
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-05-30 10:09:00 +00:00
|
|
|
if [ "$CFG_SHARED" = "no" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
cat <<EOF
|
2012-05-30 10:09:00 +00:00
|
|
|
/* Qt was configured for a static build */
|
|
|
|
#if !defined(QT_SHARED) && !defined(QT_STATIC)
|
|
|
|
# define QT_STATIC
|
|
|
|
#endif
|
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "#define QT_LARGEFILE_SUPPORT 64"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2013-10-01 10:34:20 +00:00
|
|
|
if [ "$CFG_QREAL" != double ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "#define QT_COORD_TYPE $CFG_QREAL"
|
|
|
|
echo "#define QT_COORD_TYPE_STRING $CFG_QREAL_STRING"
|
2013-10-01 10:34:20 +00:00
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_FRAMEWORK" = "yes" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "#define QT_MAC_FRAMEWORK_BUILD"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2016-03-15 08:46:32 +00:00
|
|
|
if [ "$CFG_STD_ATOMIC64" = "no" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "#define QT_NO_STD_ATOMIC64"
|
2015-09-08 23:35:33 +00:00
|
|
|
fi
|
|
|
|
|
2012-01-29 12:54:19 +00:00
|
|
|
#REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
|
|
|
|
if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "#define QT_REDUCE_RELOCATIONS"
|
2012-01-29 12:54:19 +00:00
|
|
|
fi
|
|
|
|
|
2012-08-11 20:55:04 +00:00
|
|
|
# Add compiler sub-architecture support
|
2015-09-18 05:04:44 +00:00
|
|
|
echo ""
|
|
|
|
echo "// Compiler sub-arch support"
|
2013-04-29 11:26:58 +00:00
|
|
|
for SUBARCH in SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2 \
|
|
|
|
MIPS_DSP MIPS_DSPR2; do
|
|
|
|
eval "VAL=\$CFG_$SUBARCH"
|
|
|
|
case "$VAL" in
|
|
|
|
yes)
|
2013-08-07 02:32:37 +00:00
|
|
|
echo "#define QT_COMPILER_SUPPORTS_$SUBARCH 1" \
|
2015-09-18 05:04:44 +00:00
|
|
|
|
2012-08-11 20:55:04 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
2015-07-17 21:46:05 +00:00
|
|
|
for feature in $CFG_AVX512_UPPER; do
|
2015-10-23 12:01:35 +00:00
|
|
|
echo "#define QT_COMPILER_SUPPORTS_$feature 1"
|
2015-07-17 21:46:05 +00:00
|
|
|
done
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2015-09-18 05:04:44 +00:00
|
|
|
echo ""
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
if [ "$CFG_DEV" = "yes" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "#define QT_BUILD_INTERNAL"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Add turned on SQL drivers
|
|
|
|
for DRIVER in $CFG_SQL_AVAILABLE; do
|
|
|
|
eval "VAL=\$CFG_SQL_$DRIVER"
|
2016-03-18 12:35:40 +00:00
|
|
|
if [ "$VAL" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
|
2016-03-18 12:35:40 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
QMakeVar set sql-drivers "$SQL_DRIVERS"
|
|
|
|
|
|
|
|
# Add other configuration options to the qconfig.h file
|
2016-04-06 08:15:14 +00:00
|
|
|
[ "$CFG_GIF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_GIF"
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
|
|
|
|
[ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
|
|
|
|
[ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
|
2015-01-27 17:41:32 +00:00
|
|
|
[ "$CFG_LIBPROXY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LIBPROXY"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# X11/Unix/Mac only configs
|
|
|
|
[ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
|
|
|
|
[ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
|
2014-04-02 09:54:36 +00:00
|
|
|
[ "$CFG_EVDEV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EVDEV"
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
|
|
|
|
[ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
|
2013-11-11 15:04:46 +00:00
|
|
|
[ "$CFG_POSIX_FALLOCATE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_POSIX_FALLOCATE"
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
|
|
|
|
[ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
|
|
|
|
[ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
|
|
|
|
[ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
|
|
|
|
[ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
|
2012-10-25 19:38:13 +00:00
|
|
|
[ "$CFG_EVENTFD" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EVENTFD"
|
2015-07-11 05:09:15 +00:00
|
|
|
[ "$CFG_CLOEXEC" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_THREADSAFE_CLOEXEC=1"
|
2014-08-22 15:20:49 +00:00
|
|
|
[ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
|
2014-08-22 15:20:49 +00:00
|
|
|
[ "$CFG_OPENSSL" = "no" ] && [ "$CFG_SECURETRANSPORT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SSL"
|
|
|
|
[ "$CFG_SECURETRANSPORT" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SECURETRANSPORT"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
[ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
|
2014-10-13 13:47:26 +00:00
|
|
|
[ "$CFG_TSLIB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_TSLIB"
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
|
|
|
|
[ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
|
|
|
|
[ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
|
|
|
|
|
|
|
|
[ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
|
|
|
|
[ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
|
|
|
|
[ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
|
|
|
|
|
|
|
|
# sort QCONFIG_FLAGS for neatness if we can
|
|
|
|
[ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
|
|
|
|
QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
|
|
|
|
|
|
|
|
if [ -n "$QCONFIG_FLAGS" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
cat << EOF
|
2011-04-27 10:05:43 +00:00
|
|
|
#ifndef QT_BOOTSTRAPPED
|
|
|
|
|
|
|
|
EOF
|
|
|
|
for cfg in $QCONFIG_FLAGS; do
|
|
|
|
cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
|
|
|
|
cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
|
|
|
|
# figure out define logic, so we can output the correct
|
|
|
|
# ifdefs to override the global defines in a project
|
|
|
|
cfgdNeg=
|
|
|
|
if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
|
|
|
|
# QT_NO_option can be forcefully turned on by QT_option
|
2013-12-05 18:44:09 +00:00
|
|
|
cfgdNeg=`echo $cfgd | sed 's,QT_NO_,QT_,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
|
|
|
|
# QT_option can be forcefully turned off by QT_NO_option
|
2013-12-05 18:44:09 +00:00
|
|
|
cfgdNeg=`echo $cfgd | sed 's,QT_,QT_NO_,'`
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z $cfgdNeg ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
cat << EOF
|
2011-04-27 10:05:43 +00:00
|
|
|
#ifndef $cfgd
|
|
|
|
# define $cfg
|
|
|
|
#endif
|
|
|
|
|
|
|
|
EOF
|
|
|
|
else
|
2015-09-18 05:04:44 +00:00
|
|
|
cat << EOF
|
2011-04-27 10:05:43 +00:00
|
|
|
#if defined($cfgd) && defined($cfgdNeg)
|
|
|
|
# undef $cfgd
|
|
|
|
#elif !defined($cfgd) && !defined($cfgdNeg)
|
|
|
|
# define $cfg
|
|
|
|
#endif
|
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
done
|
2015-09-18 05:04:44 +00:00
|
|
|
cat << EOF
|
2011-04-27 10:05:43 +00:00
|
|
|
#endif // QT_BOOTSTRAPPED
|
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
cat << EOF
|
2011-04-27 10:05:43 +00:00
|
|
|
#define QT_VISIBILITY_AVAILABLE
|
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$QT_LIBINFIX" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
cat << EOF
|
2011-04-27 10:05:43 +00:00
|
|
|
#define QT_LIBINFIX "$QT_LIBINFIX"
|
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\""
|
|
|
|
|
|
|
|
# Close qconfig.h.new (by restoring the original stdout)
|
|
|
|
exec >&3
|
2012-04-18 22:57:00 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# avoid unecessary rebuilds by copying only if qconfig.h has changed
|
|
|
|
if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
|
|
|
|
rm -f "$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
else
|
2013-05-28 09:18:09 +00:00
|
|
|
mv -f "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2010-11-11 15:35:09 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# save configuration into qconfig.pri
|
|
|
|
#-------------------------------------------------------------------------------
|
2015-09-18 05:04:44 +00:00
|
|
|
|
|
|
|
# open qconfig.pri
|
2011-04-27 10:05:43 +00:00
|
|
|
QTCONFIG="$outpath/mkspecs/qconfig.pri"
|
2015-09-18 05:04:44 +00:00
|
|
|
exec > "$QTCONFIG.tmp"
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_DEBUG" = "yes" ]; then
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
|
|
|
|
if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG release"
|
|
|
|
fi
|
|
|
|
QT_CONFIG="$QT_CONFIG debug"
|
|
|
|
elif [ "$CFG_DEBUG" = "no" ]; then
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
|
|
|
|
if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG debug"
|
|
|
|
fi
|
|
|
|
QT_CONFIG="$QT_CONFIG release"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_FRAMEWORK" = "no" ]; then
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
|
|
|
|
else
|
|
|
|
QT_CONFIG="$QT_CONFIG qt_framework"
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_DEV" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG private_tests"
|
2012-12-22 02:31:54 +00:00
|
|
|
if [ "$CFG_WERROR" != "no" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG warnings_are_errors"
|
|
|
|
fi
|
2012-12-22 21:12:02 +00:00
|
|
|
if [ "$CFG_HEADERSCLEAN" != "no" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG headersclean"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [ "$CFG_WERROR" = "yes" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG warnings_are_errors"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_HEADERSCLEAN" = "yes" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG headersclean"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2015-09-18 05:04:44 +00:00
|
|
|
cat <<EOF
|
2011-04-27 10:05:43 +00:00
|
|
|
#configuration
|
|
|
|
CONFIG += $QTCONFIG_CONFIG
|
2013-03-25 15:03:25 +00:00
|
|
|
host_build {
|
|
|
|
QT_ARCH = $CFG_HOST_ARCH
|
2013-07-18 10:19:02 +00:00
|
|
|
QT_TARGET_ARCH = $CFG_ARCH
|
2013-03-25 15:03:25 +00:00
|
|
|
} else {
|
|
|
|
QT_ARCH = $CFG_ARCH
|
|
|
|
}
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_CONFIG += $QT_CONFIG
|
|
|
|
|
|
|
|
#versioning
|
|
|
|
QT_VERSION = $QT_VERSION
|
|
|
|
QT_MAJOR_VERSION = $QT_MAJOR_VERSION
|
|
|
|
QT_MINOR_VERSION = $QT_MINOR_VERSION
|
|
|
|
QT_PATCH_VERSION = $QT_PATCH_VERSION
|
|
|
|
|
|
|
|
#namespaces
|
|
|
|
QT_LIBINFIX = $QT_LIBINFIX
|
|
|
|
QT_NAMESPACE = $QT_NAMESPACE
|
|
|
|
|
2015-05-21 13:45:44 +00:00
|
|
|
QT_EDITION = $Edition
|
2011-04-27 10:05:43 +00:00
|
|
|
EOF
|
2012-05-12 00:54:30 +00:00
|
|
|
|
2015-05-22 13:02:23 +00:00
|
|
|
if [ "$Edition" != "OpenSource" ] && [ "$Edition" != "Preview" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "QT_LICHECK = $Licheck"
|
|
|
|
echo "QT_RELEASE_DATE = $ReleaseDate"
|
2015-05-22 13:02:23 +00:00
|
|
|
fi
|
2015-09-18 05:04:44 +00:00
|
|
|
echo
|
2015-05-22 13:02:23 +00:00
|
|
|
|
2012-12-10 14:11:47 +00:00
|
|
|
if [ "$CFG_SHARED" = "no" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "QT_DEFAULT_QPA_PLUGIN = q$QT_QPA_DEFAULT_PLATFORM"
|
|
|
|
echo
|
2012-12-10 14:11:47 +00:00
|
|
|
fi
|
|
|
|
|
2012-05-12 00:54:30 +00:00
|
|
|
if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "# pkgconfig"
|
|
|
|
echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR"
|
|
|
|
echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR"
|
|
|
|
echo
|
2012-05-12 00:54:30 +00:00
|
|
|
fi
|
|
|
|
|
2012-08-03 17:56:23 +00:00
|
|
|
if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "# sysroot"
|
|
|
|
echo "!host_build {"
|
|
|
|
echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]"
|
|
|
|
echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]"
|
|
|
|
echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]"
|
|
|
|
echo "}"
|
|
|
|
echo
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION"
|
|
|
|
echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION"
|
|
|
|
echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2013-01-24 23:00:27 +00:00
|
|
|
if [ -n "$QT_ICC_MAJOR_VERSION" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "QT_ICC_MAJOR_VERSION = $QT_ICC_MAJOR_VERSION"
|
|
|
|
echo "QT_ICC_MINOR_VERSION = $QT_ICC_MINOR_VERSION"
|
|
|
|
echo "QT_ICC_PATCH_VERSION = $QT_ICC_PATCH_VERSION"
|
2013-01-24 23:00:27 +00:00
|
|
|
fi
|
2012-12-22 02:03:00 +00:00
|
|
|
if [ -n "$QT_CLANG_MAJOR_VERSION" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "QT_CLANG_MAJOR_VERSION = $QT_CLANG_MAJOR_VERSION"
|
|
|
|
echo "QT_CLANG_MINOR_VERSION = $QT_CLANG_MINOR_VERSION"
|
2012-12-22 02:03:00 +00:00
|
|
|
fi
|
|
|
|
if [ -n "$QT_APPLE_CLANG_MAJOR_VERSION" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "QT_APPLE_CLANG_MAJOR_VERSION = $QT_APPLE_CLANG_MAJOR_VERSION"
|
|
|
|
echo "QT_APPLE_CLANG_MINOR_VERSION = $QT_APPLE_CLANG_MINOR_VERSION"
|
2012-12-22 02:03:00 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "#Qt opengl include path"
|
|
|
|
echo "QMAKE_INCDIR_OPENGL_ES2 = `shellArgumentListToQMakeList "$QMAKE_INCDIR_OPENGL_ES2"`"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2015-09-18 05:04:44 +00:00
|
|
|
# Close qconfig.pri.tmp (by restoring the original stdout)
|
|
|
|
exec >&3
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# replace qconfig.pri if it differs from the newly created temp file
|
|
|
|
if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
|
|
|
|
rm -f "$QTCONFIG.tmp"
|
|
|
|
else
|
|
|
|
mv -f "$QTCONFIG.tmp" "$QTCONFIG"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2010-11-11 15:35:09 +00:00
|
|
|
# save configuration into qmodule.pri
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
2015-09-18 05:04:44 +00:00
|
|
|
|
|
|
|
# open qmodule.pri
|
2010-11-11 15:35:09 +00:00
|
|
|
QTMODULE="$outpath/mkspecs/qmodule.pri"
|
2015-09-18 05:04:44 +00:00
|
|
|
exec > "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "CONFIG += $QMAKE_CONFIG"
|
|
|
|
echo "QT_BUILD_PARTS += $CFG_BUILD_PARTS"
|
2013-02-18 16:37:21 +00:00
|
|
|
if [ -n "$CFG_SKIP_MODULES" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "QT_SKIP_MODULES += $CFG_SKIP_MODULES"
|
2013-02-18 16:37:21 +00:00
|
|
|
fi
|
2013-10-28 20:59:17 +00:00
|
|
|
DISABLED_FEATURES=
|
|
|
|
for cfg in $QCONFIG_FLAGS; do
|
|
|
|
ncfg=${cfg#QT_NO_}
|
|
|
|
if [ x$ncfg != x$cfg ]; then
|
|
|
|
DISABLED_FEATURES="$DISABLED_FEATURES $ncfg"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ -n "$DISABLED_FEATURES" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "QT_NO_DEFINES = $DISABLED_FEATURES"
|
2013-10-28 20:59:17 +00:00
|
|
|
fi
|
2011-12-14 01:33:15 +00:00
|
|
|
|
2015-11-12 16:25:55 +00:00
|
|
|
cat <<EOF
|
2013-04-10 10:57:06 +00:00
|
|
|
host_build {
|
2013-04-10 15:43:51 +00:00
|
|
|
QT_CPU_FEATURES.$CFG_HOST_ARCH = $CFG_HOST_CPUFEATURES
|
2013-04-10 10:57:06 +00:00
|
|
|
} else {
|
2013-04-10 15:43:51 +00:00
|
|
|
QT_CPU_FEATURES.$CFG_ARCH = $CFG_CPUFEATURES
|
2013-04-10 10:57:06 +00:00
|
|
|
}
|
|
|
|
EOF
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "QT_COORD_TYPE = $CFG_QREAL"
|
2013-04-10 10:57:06 +00:00
|
|
|
|
2016-03-20 22:07:46 +00:00
|
|
|
if [ -n "$QMAKE_CFLAGS_PSQL" ]; then
|
|
|
|
echo "QMAKE_CFLAGS_PSQL = $QMAKE_CFLAGS_PSQL"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
if [ -n "$QMAKE_LIBS_PSQL" ]; then
|
|
|
|
echo "QMAKE_LIBS_PSQL = $QMAKE_LIBS_PSQL"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
if [ -n "$QMAKE_CFLAGS_MYSQL" ]; then
|
|
|
|
echo "QMAKE_CFLAGS_MYSQL = $QMAKE_CFLAGS_MYSQL"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
if [ -n "$QMAKE_LIBS_MYSQL" ]; then
|
|
|
|
echo "QMAKE_LIBS_MYSQL = $QMAKE_LIBS_MYSQL"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
if [ -n "$QMAKE_CFLAGS_SQLITE" ]; then
|
|
|
|
echo "QMAKE_CFLAGS_SQLITE = $QMAKE_CFLAGS_SQLITE"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
if [ -n "$QMAKE_LIBS_SQLITE" ]; then
|
|
|
|
echo "QMAKE_LIBS_SQLITE = $QMAKE_LIBS_SQLITE"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
if [ -n "$QMAKE_LIBS_ODBC" ]; then
|
|
|
|
echo "QMAKE_LIBS_ODBC = $QMAKE_LIBS_ODBC"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2016-03-20 22:07:46 +00:00
|
|
|
if [ -n "$QMAKE_LIBS_TDS" ]; then
|
|
|
|
echo "QMAKE_LIBS_TDS = $QMAKE_LIBS_TDS"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#dump in the OPENSSL_LIBS info
|
|
|
|
if [ '!' -z "$OPENSSL_LIBS" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "OPENSSL_LIBS = $OPENSSL_LIBS"
|
2011-04-27 10:05:43 +00:00
|
|
|
elif [ "$CFG_OPENSSL" = "linked" ]; then
|
2015-09-18 05:04:44 +00:00
|
|
|
echo "OPENSSL_LIBS = -lssl -lcrypto"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# cmdline args
|
2015-09-18 05:04:44 +00:00
|
|
|
cat "$QMAKE_VARS_FILE"
|
2012-11-29 08:38:05 +00:00
|
|
|
# QMAKE_VARS_FILE will be still needed for a status message.
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2015-09-18 05:04:44 +00:00
|
|
|
# Close qmodule.pri.tmp (by restoring the original stdout)
|
|
|
|
exec >&3
|
|
|
|
|
2010-11-11 15:35:09 +00:00
|
|
|
# replace qmodule.pri if it differs from the newly created temp file
|
|
|
|
if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
|
|
|
|
rm -f "$QTMODULE.tmp"
|
|
|
|
else
|
|
|
|
mv -f "$QTMODULE.tmp" "$QTMODULE"
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# give feedback on configuration
|
|
|
|
#-------------------------------------------------------------------------------
|
2015-09-18 05:04:44 +00:00
|
|
|
exec 1>$outpath/config.summary # redirect output temporarily to config.summary
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support()
|
|
|
|
{
|
|
|
|
case "$#,$2" in
|
|
|
|
2,auto)
|
|
|
|
# 2 arguments and the result is "auto", so just say "yes"
|
|
|
|
# this is usually an error in the configure script, but oh well..
|
|
|
|
echo "$1 yes"
|
|
|
|
return
|
|
|
|
;;
|
|
|
|
[012],* | *,no*)
|
|
|
|
# 0, 1 or 2 arguments, or anything starting with "no"
|
|
|
|
# print just the first part of the argument (before the dash)
|
|
|
|
echo "$1 ${2%%-*}"
|
|
|
|
return
|
|
|
|
:;
|
|
|
|
esac
|
|
|
|
heading=$1
|
|
|
|
shift
|
|
|
|
|
|
|
|
value=$1
|
|
|
|
shift
|
|
|
|
|
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
if [ "$value" = "$1" ]; then
|
|
|
|
echo "$heading yes ($2)"
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
echo "$heading $value"
|
|
|
|
}
|
|
|
|
|
|
|
|
report_support_plugin()
|
|
|
|
{
|
|
|
|
report_support "$1" "$2-$3" \
|
|
|
|
yes-qt "in $4, using bundled copy" \
|
|
|
|
yes-system "in $4, using system library" \
|
|
|
|
plugin-qt "plugin, using bundled copy" \
|
|
|
|
plugin-system "plugin, using system library"
|
|
|
|
}
|
|
|
|
|
2013-02-26 23:37:14 +00:00
|
|
|
echo
|
|
|
|
echo " Configure summary"
|
2011-04-27 10:05:43 +00:00
|
|
|
echo
|
|
|
|
if [ "$XPLATFORM" = "$PLATFORM" ]; then
|
2013-02-26 23:37:14 +00:00
|
|
|
# the missing space before $CFG_FEATURES is intentional
|
2014-10-09 10:44:30 +00:00
|
|
|
echo "Build type: $PLATFORM ($CFG_ARCH, CPU features:${CFG_CPUFEATURES:- none detected})"
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
2014-10-09 10:44:30 +00:00
|
|
|
echo "Building on: $PLATFORM ($CFG_HOST_ARCH, CPU features:${CFG_HOST_CPUFEATURES:- none detected})"
|
|
|
|
echo "Building for: $XPLATFORM ($CFG_ARCH, CPU features:${CFG_CPUFEATURES:- none detected})"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ -n "$PLATFORM_NOTES" ]; then
|
|
|
|
echo "Platform notes:"
|
|
|
|
echo "$PLATFORM_NOTES"
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$OPT_VERBOSE" = "yes" ]; then
|
|
|
|
echo $ECHO_N "qmake vars .......... $ECHO_C"
|
|
|
|
cat "$QMAKE_VARS_FILE" | tr '\n' ' '
|
2013-02-26 23:37:14 +00:00
|
|
|
echo
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2013-02-26 23:37:14 +00:00
|
|
|
# Build configuration
|
|
|
|
echo "Build options:"
|
|
|
|
echo $ECHO_N " Configuration .......... $ECHO_C"
|
|
|
|
echo $QMAKE_CONFIG $QT_CONFIG | tr ' ' '\n' | sort | tr '\n' ' '
|
|
|
|
echo
|
|
|
|
echo " Build parts ............ $CFG_BUILD_PARTS"
|
|
|
|
release="release"
|
|
|
|
[ "$CFG_FORCEDEBUGINFO" = "yes" ] && release="release (with debug info)"
|
|
|
|
[ "$CFG_DEBUG" = "yes" ] && build_mode="debug" || build_mode=$release
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
|
2015-10-26 11:38:50 +00:00
|
|
|
build_mode="debug and $release; default link: $build_mode"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2015-10-26 11:38:50 +00:00
|
|
|
if [ "$CFG_RELEASE_TOOLS" = "yes" ]; then
|
|
|
|
build_mode="$build_mode; optimized tools"
|
|
|
|
fi
|
|
|
|
echo " Mode ................... $build_mode"
|
2013-02-26 23:37:14 +00:00
|
|
|
unset build_mode release
|
2014-09-30 07:50:22 +00:00
|
|
|
echo " Using sanitizer(s)...... $CFG_SANITIZERS"
|
2015-07-09 00:21:30 +00:00
|
|
|
echo " Using C++ standard ..... $CFG_STDCXX"
|
2014-07-01 09:46:50 +00:00
|
|
|
echo " Using gold linker....... $CFG_USE_GOLD_LINKER"
|
2015-04-22 11:09:36 +00:00
|
|
|
echo " Using new DTAGS ........ $CFG_ENABLE_NEW_DTAGS"
|
2013-02-26 23:37:14 +00:00
|
|
|
echo " Using PCH .............. $CFG_PRECOMPILE"
|
2015-10-29 13:59:59 +00:00
|
|
|
echo " Using LTCG ............. $CFG_LTCG"
|
2013-02-26 23:37:14 +00:00
|
|
|
echo " Target compiler supports:"
|
|
|
|
if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
|
2015-09-18 05:20:14 +00:00
|
|
|
echo " SSE .................. ${CFG_SSE_LIST:-<none>}"
|
|
|
|
echo " AVX .................. ${CFG_AVX_LIST:-<none>}"
|
2015-07-17 21:46:05 +00:00
|
|
|
echo " AVX512 ............... ${CFG_AVX512_UPPER:-<none>}"
|
2016-02-16 14:29:59 +00:00
|
|
|
elif [ "$CFG_ARCH" = "arm" -o "$CFG_ARCH" = "arm64" ]; then
|
2014-06-25 00:52:14 +00:00
|
|
|
echo " Neon ................. ${CFG_NEON}"
|
2013-02-26 23:37:14 +00:00
|
|
|
elif [ "$CFG_ARCH" = "mips" ]; then
|
|
|
|
echo " DSP/DSPr2 ............ ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
|
2012-08-07 20:22:38 +00:00
|
|
|
fi
|
2013-02-26 23:37:14 +00:00
|
|
|
|
|
|
|
# Qt modules
|
|
|
|
echo
|
|
|
|
echo "Qt modules and options:"
|
2014-12-09 13:42:50 +00:00
|
|
|
report_support " Qt D-Bus ..............." "$CFG_DBUS" runtime "loading dbus-1 at runtime" linked "linked to dbus-1"
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " Qt Concurrent .........." "$CFG_CONCURRENT"
|
|
|
|
report_support " Qt GUI ................." "$CFG_GUI"
|
|
|
|
report_support " Qt Widgets ............." "$CFG_WIDGETS"
|
|
|
|
report_support " QML debugging .........." "$CFG_QML_DEBUG"
|
|
|
|
report_support " Use system proxies ....." "$CFG_SYSTEM_PROXIES"
|
2013-02-26 23:37:14 +00:00
|
|
|
|
|
|
|
# Other things
|
|
|
|
# Please keep sorted and properly grouped! The output is quite long, so it's
|
|
|
|
# hard to find something you're searching for if it's not sorted.
|
|
|
|
echo
|
|
|
|
echo "Support enabled for:"
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " Accessibility .........." "$CFG_ACCESSIBILITY"
|
|
|
|
report_support " ALSA ..................." "$CFG_ALSA"
|
|
|
|
report_support " CUPS ..................." "$CFG_CUPS"
|
2013-02-26 23:37:14 +00:00
|
|
|
[ "$XPLATFORM_MINGW" = "yes" ] && \
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " DirectWrite ............" "$CFG_DIRECTWRITE"
|
2015-10-15 13:40:26 +00:00
|
|
|
report_support " DoubleConversion........" "$CFG_DOUBLECONVERSION" no "libc" system "system library" qt "bundled copy"
|
2014-04-02 09:54:36 +00:00
|
|
|
report_support " Evdev .................." "$CFG_EVDEV"
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " FontConfig ............." "$CFG_FONTCONFIG"
|
2014-02-14 22:51:36 +00:00
|
|
|
report_support " FreeType ..............." "$CFG_FREETYPE" system "system library" yes "bundled copy"
|
|
|
|
report_support " Glib ..................." "$CFG_GLIB"
|
2015-02-13 15:41:58 +00:00
|
|
|
report_support " GStreamer .............." "$CFG_GSTREAMER" yes "$CFG_GSTREAMER_VERSION"
|
2015-07-30 18:32:43 +00:00
|
|
|
report_support " GTK platformtheme ......" "$CFG_GTK"
|
2014-07-08 16:49:18 +00:00
|
|
|
report_support " HarfBuzz ..............." "$CFG_HARFBUZZ" system "system library" qt "bundled copy"
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " Iconv .................." "$CFG_ICONV"
|
|
|
|
report_support " ICU ...................." "$CFG_ICU"
|
|
|
|
report_support " Image formats:"
|
2013-10-09 11:28:59 +00:00
|
|
|
report_support_plugin " GIF .................." "$CFG_GIF" qt QtGui
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support_plugin " JPEG ................." "$CFG_JPEG" "$CFG_LIBJPEG" QtGui
|
|
|
|
report_support_plugin " PNG .................." "$CFG_PNG" "$CFG_LIBPNG" QtGui
|
2014-12-09 10:45:29 +00:00
|
|
|
report_support " libinput................" "$CFG_LIBINPUT"
|
2015-07-04 14:13:31 +00:00
|
|
|
report_support " Logging backends:"
|
|
|
|
report_support " journald ..............." "$CFG_JOURNALD"
|
|
|
|
report_support " syslog ..............." "$CFG_SYSLOG"
|
2014-01-04 00:14:36 +00:00
|
|
|
report_support " mtdev .................." "$CFG_MTDEV" yes "system library"
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " Networking:"
|
2013-11-12 21:01:44 +00:00
|
|
|
[ "$XPLATFORM_MAC" = "yes" ] && \
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " CoreWlan ............." "$CFG_COREWLAN"
|
|
|
|
report_support " getaddrinfo .........." "$CFG_GETADDRINFO"
|
|
|
|
report_support " getifaddrs ..........." "$CFG_GETIFADDRS"
|
|
|
|
report_support " IPv6 ifname .........." "$CFG_IPV6IFNAME"
|
2015-01-27 17:41:32 +00:00
|
|
|
report_support " libproxy.............." "$CFG_LIBPROXY"
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " OpenSSL .............." "$CFG_OPENSSL" yes "loading libraries at run-time" linked "linked to the libraries"
|
2014-08-22 15:20:49 +00:00
|
|
|
[ "$XPLATFORM_MAC" = "yes" ] && \
|
|
|
|
report_support " SecureTransport ......" "$CFG_SECURETRANSPORT"
|
2014-02-14 22:51:36 +00:00
|
|
|
report_support " OpenGL / OpenVG:"
|
|
|
|
report_support " EGL .................." "$CFG_EGL"
|
2014-04-23 09:53:38 +00:00
|
|
|
report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
|
2013-02-26 23:37:14 +00:00
|
|
|
if [ -n "$PKG_CONFIG" ]; then
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " pkg-config ............. yes"
|
2013-02-26 23:37:14 +00:00
|
|
|
else
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " pkg-config ............. no"
|
|
|
|
fi
|
|
|
|
report_support " PulseAudio ............." "$CFG_PULSEAUDIO"
|
|
|
|
report_support " QPA backends:"
|
|
|
|
report_support " DirectFB ............." "$CFG_DIRECTFB"
|
|
|
|
report_support " EGLFS ................" "$CFG_EGLFS"
|
2015-10-13 14:07:19 +00:00
|
|
|
report_support " EGLFS i.MX6 ........" "$CFG_EGLFS_VIV"
|
2015-10-29 13:11:29 +00:00
|
|
|
report_support " EGLFS i.MX6 Wayland." "$CFG_EGLFS_VIV_WL"
|
2015-10-13 14:07:19 +00:00
|
|
|
report_support " EGLFS EGLDevice ...." "$CFG_EGLFS_EGLDEVICE"
|
2015-10-13 14:09:51 +00:00
|
|
|
report_support " EGLFS GBM .........." "$CFG_EGLFS_GBM"
|
2015-03-02 15:09:22 +00:00
|
|
|
report_support " EGLFS Mali ........." "$CFG_EGLFS_MALI"
|
|
|
|
report_support " EGLFS Raspberry Pi ." "$CFG_EGLFS_BRCM"
|
|
|
|
report_support " EGLFS X11 .........." "$CFG_EGL_X"
|
2015-10-29 14:59:48 +00:00
|
|
|
if [ "$XPLATFORM_INTEGRITY" = "yes" ]; then
|
|
|
|
report_support " INTEGRITY Framebuffer " "$CFG_INTEGRITYFB"
|
|
|
|
fi
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " LinuxFB .............." "$CFG_LINUXFB"
|
2015-08-07 12:28:14 +00:00
|
|
|
report_support " Mir client............" "$CFG_MIRCLIENT"
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " XCB .................." "$CFG_XCB" system "system library" qt "bundled copy"
|
2013-02-26 23:37:14 +00:00
|
|
|
if [ "$CFG_XCB" != "no" ]; then
|
2014-02-14 22:51:36 +00:00
|
|
|
report_support " EGL on X ..........." "$CFG_EGL_X"
|
|
|
|
report_support " GLX ................" "$CFG_XCB_GLX"
|
2013-11-28 11:07:09 +00:00
|
|
|
report_support " Xcb-Xlib ..........." "$CFG_XCB_XLIB"
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " Xi2 ................" "$CFG_XINPUT2" runtime "loaded at runtime"
|
|
|
|
report_support " Xrender ............" "$CFG_XRENDER"
|
|
|
|
report_support " XKB ................" "$CFG_XKB"
|
|
|
|
fi
|
|
|
|
report_support " Session management ....." "$CFG_SM"
|
2013-10-16 15:38:32 +00:00
|
|
|
if [ "$XPLATFORM_QNX" = "yes" ]; then
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " SLOG2 .................." "$CFG_SLOG2"
|
2013-10-16 15:38:32 +00:00
|
|
|
report_support " IMF ...................." "$CFG_QNX_IMF"
|
2013-11-21 11:58:22 +00:00
|
|
|
report_support " PPS ...................." "$CFG_PPS"
|
2014-01-29 12:43:03 +00:00
|
|
|
report_support " LGMON .................." "$CFG_LGMON"
|
2013-10-16 15:38:32 +00:00
|
|
|
fi
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " SQL drivers:"
|
2016-03-18 12:35:40 +00:00
|
|
|
report_support " DB2 .................." "$CFG_SQL_db2"
|
|
|
|
report_support " InterBase ............" "$CFG_SQL_ibase"
|
|
|
|
report_support " MySQL ................" "$CFG_SQL_mysql"
|
|
|
|
report_support " OCI .................." "$CFG_SQL_oci"
|
|
|
|
report_support " ODBC ................." "$CFG_SQL_odbc"
|
|
|
|
report_support " PostgreSQL ..........." "$CFG_SQL_psql"
|
|
|
|
report_support " SQLite 2 ............." "$CFG_SQL_sqlite2"
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support_plugin " SQLite ..............." "$CFG_SQL_sqlite" "$CFG_SQLITE" QtSql
|
2016-03-18 12:35:40 +00:00
|
|
|
report_support " TDS .................." "$CFG_SQL_tds"
|
2014-10-13 13:47:26 +00:00
|
|
|
report_support " tslib .................." "$CFG_TSLIB"
|
2013-04-09 06:37:07 +00:00
|
|
|
report_support " udev ..................." "$CFG_LIBUDEV"
|
2014-12-09 10:45:29 +00:00
|
|
|
report_support " xkbcommon-x11..........." "$CFG_XKBCOMMON" system "system library" qt "bundled copy, XKB config root: $CFG_XKB_CONFIG_ROOT"
|
|
|
|
report_support " xkbcommon-evdev........." "$CFG_XKBCOMMON_EVDEV"
|
2016-02-19 14:18:47 +00:00
|
|
|
report_support " zlib ..................." "$CFG_SYSTEM_ZLIB" yes "system library" no "bundled copy"
|
2013-02-26 23:37:14 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
echo
|
|
|
|
|
|
|
|
# complain about not being able to use dynamic plugins if we are using a static build
|
|
|
|
if [ "$CFG_SHARED" = "no" ]; then
|
|
|
|
echo
|
|
|
|
echo "WARNING: Using static linking will disable the use of dynamically"
|
|
|
|
echo "loaded plugins. Make sure to import all needed static plugins,"
|
|
|
|
echo "or compile needed modules into the library."
|
|
|
|
fi
|
2016-05-04 19:18:01 +00:00
|
|
|
if [ "$CFG_FREETYPE" = "system" ]; then
|
|
|
|
if [ "$ORIG_CFG_FREETYPE" = "qt" ]; then
|
|
|
|
echo
|
|
|
|
echo "WARNING: Bundled FreeType can't be used. FontConfig use requires system FreeType."
|
|
|
|
elif [ "$ORIG_CFG_FREETYPE" = "no" ]; then
|
|
|
|
echo
|
|
|
|
echo "WARNING: FreeType can't be disabled. FontConfig use requires system FreeType."
|
|
|
|
fi
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
|
|
|
|
echo
|
|
|
|
echo "NOTE: When linking against OpenSSL, you can override the default"
|
|
|
|
echo "library names through OPENSSL_LIBS."
|
|
|
|
echo "For example:"
|
|
|
|
echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
|
2014-08-09 01:43:38 +00:00
|
|
|
fi
|
2015-07-04 14:13:31 +00:00
|
|
|
if [ "$CFG_JOURNALD" = "yes" ] || [ "$CFG_SYSLOG" = "yes" ] || [ "$CFG_SLOG2" = "yes" ]; then
|
2014-08-09 01:43:38 +00:00
|
|
|
echo
|
2015-07-04 14:13:31 +00:00
|
|
|
echo "NOTE: journald, syslog or slog2 integration is enabled."
|
2014-08-09 01:43:38 +00:00
|
|
|
echo "If your users intend on developing applications against this build,"
|
|
|
|
echo "ensure that the IDEs they use either set QT_LOGGING_TO_CONSOLE to 1"
|
2015-07-04 14:13:31 +00:00
|
|
|
echo "or the IDE is able to read the logged output from journald, syslog or slog2."
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2014-03-04 15:26:07 +00:00
|
|
|
if [ "$CFG_XKBCOMMON" = "qt" ] && [ "$CFG_XKB_CONFIG_ROOT" = "not found" ]; then
|
2014-08-09 20:35:14 +00:00
|
|
|
echo
|
2014-03-04 15:26:07 +00:00
|
|
|
echo "WARNING: Could not find XKB config root, use -xkb-config-root to set a path to "
|
|
|
|
echo "XKB configuration data. This is required for keyboard input support."
|
|
|
|
fi
|
2013-10-01 10:34:20 +00:00
|
|
|
if [ "$CFG_QREAL" = double ] && [ "$CFG_ARCH" = arm ]; then
|
2014-08-09 20:35:14 +00:00
|
|
|
echo
|
2013-10-01 10:34:20 +00:00
|
|
|
echo "NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1."
|
|
|
|
echo "Configure with '-qreal float' to create a build that is binary compatible with 5.1."
|
|
|
|
fi
|
2015-10-26 11:38:50 +00:00
|
|
|
if [ "$CFG_RELEASE_TOOLS" = "yes" -a \( "$CFG_DEBUG" = "no" -o "$CFG_DEBUG_RELEASE" = "yes" \) ]; then
|
|
|
|
echo
|
|
|
|
echo "NOTE: -optimized-tools is not useful in -release mode."
|
|
|
|
echo
|
|
|
|
fi
|
2016-04-19 14:39:28 +00:00
|
|
|
if [ "$CFG_GUI" = "yes" ] && [ "$XPLATFORM_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ] && [ "$XPLATFORM_ANDROID" = "no" ] && [ "$XPLATFORM_HAIKU" = "no" ] && [ "$XPLATFORM_INTEGRITY" = "no" ]; then
|
|
|
|
if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ] && [ "$CFG_LINUXFB" = "no" ] && [ "$CFG_MIRCLIENT" = "no" ]; then
|
|
|
|
echo
|
|
|
|
echo "No QPA platform plugin enabled! This will"
|
|
|
|
echo "produce a Qt that cannot run GUI applications."
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
fi
|
2012-04-06 08:05:45 +00:00
|
|
|
|
|
|
|
exec 1>&3 3>&- # restore stdout
|
|
|
|
cat $outpath/config.summary # display config feedback to user
|
|
|
|
|
2013-11-12 21:01:44 +00:00
|
|
|
if [ "$XPLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
echo
|
|
|
|
echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
|
|
|
|
echo "if you want a pure debug build."
|
|
|
|
echo
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
|
|
|
|
PROCS=1
|
|
|
|
EXEC=""
|
|
|
|
|
2012-11-29 08:38:05 +00:00
|
|
|
rm -f "$QMAKE_VARS_FILE" 2>/dev/null
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# build makefiles based on the configuration
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2013-06-18 13:11:11 +00:00
|
|
|
( # fork to make the cd stay local
|
|
|
|
|
|
|
|
relpathMangled=$relpath
|
|
|
|
if [ -n "$CFG_TOPLEVEL" ]; then
|
|
|
|
relpathMangled=`dirname "$relpath"`
|
|
|
|
cd ..
|
|
|
|
fi
|
2012-08-02 13:37:50 +00:00
|
|
|
|
2015-10-12 07:55:30 +00:00
|
|
|
"$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" "$relpathMangled"
|
2013-06-18 13:11:11 +00:00
|
|
|
|
2014-06-19 10:12:51 +00:00
|
|
|
) || exit
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# finally save the executed command to another script
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
if [ `basename $0` != "config.status" ]; then
|
2014-11-18 19:21:09 +00:00
|
|
|
CONFIG_STATUS="$relpath/$relconf$OPT_CMDLINE"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# add the system variables
|
|
|
|
for varname in $SYSTEM_VARIABLES; do
|
|
|
|
cmd=`echo \
|
|
|
|
'if [ -n "\$'${varname}'" ]; then
|
|
|
|
CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
|
|
|
|
fi'`
|
|
|
|
eval "$cmd"
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
|
|
|
|
|
|
|
|
[ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
|
|
|
|
echo "#!/bin/sh" > "$outpath/config.status"
|
2011-08-30 19:42:39 +00:00
|
|
|
[ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
|
|
|
|
echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
|
|
|
|
[ -n "$PKG_CONFIG_LIBDIR" ] && \
|
|
|
|
echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
|
2014-11-18 19:11:08 +00:00
|
|
|
echo "$CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
|
2011-04-27 10:05:43 +00:00
|
|
|
chmod +x "$outpath/config.status"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$RPATH_MESSAGE" ]; then
|
|
|
|
echo
|
|
|
|
echo "$RPATH_MESSAGE"
|
|
|
|
fi
|
|
|
|
|
2014-12-04 15:03:13 +00:00
|
|
|
if [ -n "$PREFIX_COMPLAINTS" ]; then
|
|
|
|
echo
|
|
|
|
echo "$PREFIX_COMPLAINTS"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
MAKE=`basename "$MAKE"`
|
|
|
|
echo
|
|
|
|
echo Qt is now configured for building. Just run \'$MAKE\'.
|
2013-06-14 15:37:56 +00:00
|
|
|
if [ "$outpath" = "$QT_INSTALL_PREFIX" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
echo Once everything is built, Qt is installed.
|
|
|
|
echo You should not run \'$MAKE install\'.
|
|
|
|
else
|
|
|
|
echo Once everything is built, you must run \'$MAKE install\'.
|
|
|
|
echo Qt will be installed into $QT_INSTALL_PREFIX
|
|
|
|
fi
|
|
|
|
echo
|
2013-04-17 22:05:05 +00:00
|
|
|
echo Prior to reconfiguration, make sure you remove any leftovers from
|
|
|
|
echo the previous build.
|
2011-04-27 10:05:43 +00:00
|
|
|
echo
|