2011-04-27 10:05:43 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#############################################################################
|
|
|
|
##
|
2012-01-05 04:03:39 +00:00
|
|
|
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
2012-01-20 03:06:31 +00:00
|
|
|
## Contact: http://www.qt-project.org/
|
2011-04-27 10:05:43 +00:00
|
|
|
##
|
|
|
|
## This file is the build configuration utility of the Qt Toolkit.
|
|
|
|
##
|
|
|
|
## $QT_BEGIN_LICENSE:LGPL$
|
|
|
|
## GNU Lesser General Public License Usage
|
2011-05-24 09:34:08 +00:00
|
|
|
## This file may be used under the terms of the GNU Lesser General Public
|
|
|
|
## License version 2.1 as published by the Free Software Foundation and
|
|
|
|
## appearing in the file LICENSE.LGPL included in the packaging of this
|
|
|
|
## file. Please review the following information to ensure the GNU Lesser
|
|
|
|
## General Public License version 2.1 requirements will be met:
|
|
|
|
## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2011-04-27 10:05:43 +00:00
|
|
|
##
|
|
|
|
## In addition, as a special exception, Nokia gives you certain additional
|
2011-05-24 09:34:08 +00:00
|
|
|
## rights. These rights are described in the Nokia Qt LGPL Exception
|
2011-04-27 10:05:43 +00:00
|
|
|
## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
##
|
2011-05-24 09:34:08 +00:00
|
|
|
## GNU General Public License Usage
|
|
|
|
## Alternatively, this file may be used under the terms of the GNU General
|
|
|
|
## Public License version 3.0 as published by the Free Software Foundation
|
|
|
|
## and appearing in the file LICENSE.GPL included in the packaging of this
|
|
|
|
## file. Please review the following information to ensure the GNU General
|
|
|
|
## Public License version 3.0 requirements will be met:
|
|
|
|
## http://www.gnu.org/copyleft/gpl.html.
|
|
|
|
##
|
|
|
|
## Other Usage
|
|
|
|
## Alternatively, this file may be used in accordance with the terms and
|
|
|
|
## conditions contained in a signed written agreement between you and Nokia.
|
2011-04-27 10:05:43 +00:00
|
|
|
##
|
|
|
|
##
|
|
|
|
##
|
|
|
|
##
|
|
|
|
##
|
2012-01-24 06:17:24 +00:00
|
|
|
##
|
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`
|
|
|
|
|
|
|
|
#license file location
|
|
|
|
LICENSE_FILE="$QT_LICENSE_FILE"
|
|
|
|
[ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
|
|
|
|
if [ -f "$LICENSE_FILE" ]; then
|
|
|
|
tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
|
|
|
|
diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# later cache the command line in config.status
|
|
|
|
OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
|
|
|
|
|
|
|
|
# initialize global variables
|
|
|
|
QMAKE_SWITCHES=
|
|
|
|
QMAKE_VARS=
|
|
|
|
QMAKE_CONFIG=
|
|
|
|
QTCONFIG_CONFIG=
|
|
|
|
QT_CONFIG=
|
|
|
|
SUPPORTED=
|
|
|
|
QMAKE_VARS_FILE=.qmake.vars
|
2012-03-20 21:02:21 +00:00
|
|
|
DEVICE_VARS_FILE=.device.vars
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
:> "$QMAKE_VARS_FILE"
|
2012-03-20 21:02:21 +00:00
|
|
|
:> "$DEVICE_VARS_FILE"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# utility functions
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
shellEscape()
|
|
|
|
{
|
|
|
|
echo "$@" | sed 's/ /\ /g'
|
|
|
|
}
|
|
|
|
|
|
|
|
# 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
|
|
|
|
getQMakeConf1()
|
|
|
|
{
|
|
|
|
while read line; do case "$line" in
|
|
|
|
include*)
|
|
|
|
inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
|
|
|
|
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
|
|
|
|
getQMakeConf1 "$conf_file"
|
|
|
|
;;
|
2012-05-31 06:13:10 +00:00
|
|
|
*load\(device_config\)*)
|
|
|
|
conf_file="$DEVICE_VARS_FILE"
|
|
|
|
if [ ! -f "$conf_file" ]; then
|
|
|
|
echo "WARNING: Unable to find file $conf_file" >&2
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
getQMakeConf1 "$conf_file"
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
*)
|
|
|
|
echo "$line"
|
|
|
|
;;
|
|
|
|
esac; done < "$1"
|
|
|
|
}
|
|
|
|
|
2012-01-31 11:49:53 +00:00
|
|
|
getQMakeConf2()
|
|
|
|
{
|
|
|
|
$AWK '
|
|
|
|
BEGIN {
|
|
|
|
values["LITERAL_WHITESPACE"] = " "
|
|
|
|
values["LITERAL_DOLLAR"] = "$"
|
|
|
|
}
|
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]
|
|
|
|
}
|
|
|
|
ovalue = ovalue value
|
|
|
|
|
|
|
|
combinedValue = values[variable]
|
|
|
|
if (append == 1 && length(combinedValue) > 0) {
|
|
|
|
combinedValue = combinedValue " " ovalue
|
|
|
|
} else {
|
|
|
|
combinedValue = ovalue
|
|
|
|
}
|
|
|
|
values[variable] = combinedValue
|
|
|
|
}
|
|
|
|
END {
|
|
|
|
for (var in values) {
|
|
|
|
print var "=" values[var]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
'
|
|
|
|
}
|
|
|
|
|
|
|
|
getQMakeConf3()
|
|
|
|
{
|
|
|
|
echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
|
|
|
|
}
|
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
|
|
|
|
specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-01-31 11:49:53 +00:00
|
|
|
getQMakeConf3 "$1" "$specvals"
|
|
|
|
}
|
|
|
|
|
|
|
|
getXQMakeConf()
|
|
|
|
{
|
|
|
|
if [ -z "$xspecvals" ]; then
|
|
|
|
xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
|
|
|
|
fi
|
|
|
|
getQMakeConf3 "$1" "$xspecvals"
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# relies on $TEST_COMPILER being set correctly
|
|
|
|
compilerSupportsFlag()
|
|
|
|
{
|
|
|
|
cat >conftest.cpp <<EOF
|
|
|
|
int main() { return 0; }
|
|
|
|
EOF
|
|
|
|
"$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
|
|
|
|
ret=$?
|
|
|
|
rm -f conftest.cpp conftest.o
|
|
|
|
return $ret
|
|
|
|
}
|
|
|
|
|
|
|
|
# relies on $TEST_COMPILER being set correctly
|
|
|
|
linkerSupportsFlag()
|
|
|
|
{
|
|
|
|
lflags=-Wl
|
|
|
|
for flag
|
|
|
|
do
|
|
|
|
safe_flag=`shellEscape "$flag"`
|
|
|
|
lflags=$lflags,$safe_flag
|
|
|
|
done
|
|
|
|
compilerSupportsFlag "$lflags" >/dev/null 2>&1
|
|
|
|
}
|
|
|
|
|
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`
|
|
|
|
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="="
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo >&2 "BUG: wrong command to QMakeVar: $1"
|
|
|
|
;;
|
|
|
|
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:"
|
2012-05-15 15:44:13 +00:00
|
|
|
tabbed_result=$(echo "$result" | sed "s,^, ,")
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
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
|
2011-08-09 11:40:15 +00:00
|
|
|
PLATFORM_MAC=no
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ -d /System/Library/Frameworks/Carbon.framework ]; then
|
|
|
|
BUILD_ON_MAC=yes
|
2012-01-25 15:12:53 +00:00
|
|
|
PLATFORM_MAC=maybe
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Qt version detection
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
|
|
|
|
QT_MAJOR_VERSION=
|
|
|
|
QT_MINOR_VERSION=0
|
|
|
|
QT_PATCH_VERSION=0
|
|
|
|
if [ -n "$QT_VERSION" ]; then
|
|
|
|
QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
|
|
|
|
MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
|
|
|
|
if [ -n "$MAJOR" ]; then
|
|
|
|
MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
|
|
|
|
PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
|
|
|
|
QT_MAJOR_VERSION="$MAJOR"
|
|
|
|
[ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
|
|
|
|
[ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ -z "$QT_MAJOR_VERSION" ]; then
|
|
|
|
echo "Cannot process version from qglobal.h: $QT_VERSION"
|
|
|
|
echo "Cannot proceed."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# check the license
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
COMMERCIAL_USER=ask
|
|
|
|
CFG_DEV=no
|
|
|
|
CFG_RTOS_ENABLED=yes
|
|
|
|
EditionString=Commercial
|
|
|
|
|
|
|
|
earlyArgParse()
|
|
|
|
{
|
|
|
|
# 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-*)
|
|
|
|
VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
|
|
|
|
VAL=yes
|
|
|
|
;;
|
|
|
|
--disable-*)
|
|
|
|
VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
|
|
|
|
VAL=no
|
|
|
|
;;
|
|
|
|
--*=*)
|
|
|
|
VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
|
|
|
|
VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
|
|
|
|
;;
|
|
|
|
--no-*)
|
|
|
|
VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
|
|
|
|
VAL=no
|
|
|
|
;;
|
|
|
|
-h|help|--help|-help)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
OPT_HELP="$VAL"
|
|
|
|
COMMERCIAL_USER="no" #doesn't matter we will display the help
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
COMMERCIAL_USER="no" #doesn't matter we will display the help
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
--*)
|
|
|
|
VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
|
|
|
|
VAL=yes
|
|
|
|
;;
|
|
|
|
-*)
|
|
|
|
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
|
|
|
|
VAL="unknown"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
UNKNOWN_ARG=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if [ "$UNKNOWN_ARG" = "yes" ]; then
|
|
|
|
shift
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
shift
|
|
|
|
|
|
|
|
UNKNOWN_OPT=no
|
|
|
|
case "$VAR" in
|
|
|
|
developer-build)
|
|
|
|
CFG_DEV="yes"
|
|
|
|
;;
|
|
|
|
commercial)
|
|
|
|
COMMERCIAL_USER="yes"
|
|
|
|
;;
|
|
|
|
opensource)
|
|
|
|
COMMERCIAL_USER="no"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
earlyArgParse "$@"
|
|
|
|
|
|
|
|
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
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2012-01-03 15:01:40 +00:00
|
|
|
if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
# Commercial preview release
|
|
|
|
[ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
|
|
|
|
Licensee="Preview"
|
|
|
|
Edition="Preview"
|
|
|
|
QT_EDITION="QT_EDITION_DESKTOP"
|
|
|
|
LicenseType="Technology Preview"
|
|
|
|
elif [ $COMMERCIAL_USER = "yes" ]; then
|
|
|
|
# one of commercial editions
|
|
|
|
[ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
|
|
|
|
|
|
|
|
# read in the license file
|
|
|
|
if [ -f "$LICENSE_FILE" ]; then
|
|
|
|
. "$LICENSE_FILE" >/dev/null 2>&1
|
|
|
|
if [ -z "$LicenseKeyExt" ]; then
|
|
|
|
echo
|
|
|
|
echo "You are using an old license file."
|
|
|
|
echo
|
|
|
|
echo "Please install the license file supplied by Nokia,"
|
|
|
|
echo "or install the Qt Open Source Edition if you intend to"
|
|
|
|
echo "develop free software."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -z "$Licensee" ]; then
|
|
|
|
echo
|
|
|
|
echo "Invalid license key. Please check the license key."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [ -z "$LicenseKeyExt" ]; then
|
|
|
|
echo
|
|
|
|
echo $ECHO_N "Please enter your license key: $ECHO_C"
|
|
|
|
read LicenseKeyExt
|
|
|
|
Licensee="Unknown user"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Key verification
|
|
|
|
echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
|
|
|
|
&& LicenseValid="yes" \
|
|
|
|
|| LicenseValid="no"
|
|
|
|
if [ "$LicenseValid" != "yes" ]; then
|
|
|
|
echo
|
|
|
|
echo "Invalid license key. Please check the license key."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
|
|
|
|
PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
|
|
|
|
LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
|
|
|
|
LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
|
|
|
|
|
|
|
|
# determine which edition we are licensed to use
|
|
|
|
case "$LicenseTypeCode" in
|
|
|
|
F4M)
|
|
|
|
LicenseType="Commercial"
|
|
|
|
case $ProductCode in
|
|
|
|
F)
|
|
|
|
Edition="Universal"
|
|
|
|
QT_EDITION="QT_EDITION_UNIVERSAL"
|
|
|
|
;;
|
|
|
|
B)
|
|
|
|
Edition="FullFramework"
|
|
|
|
EditionString="Full Framework"
|
|
|
|
QT_EDITION="QT_EDITION_DESKTOP"
|
|
|
|
;;
|
|
|
|
L)
|
|
|
|
Edition="GUIFramework"
|
|
|
|
EditionString="GUI Framework"
|
|
|
|
QT_EDITION="QT_EDITION_DESKTOPLIGHT"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
Z4M|R4M|Q4M)
|
|
|
|
LicenseType="Evaluation"
|
|
|
|
QMakeVar add DEFINES QT_EVAL
|
|
|
|
case $ProductCode in
|
|
|
|
B)
|
|
|
|
Edition="Evaluation"
|
|
|
|
QT_EDITION="QT_EDITION_EVALUATION"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
|
|
|
|
echo
|
|
|
|
echo "Invalid license key. Please check the license key."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# verify that we are licensed to use Qt on this platform
|
|
|
|
LICENSE_EXTENSION=
|
|
|
|
case "$PlatformCode" in
|
|
|
|
*L)
|
|
|
|
CFG_RTOS_ENABLED=yes
|
|
|
|
PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
CFG_RTOS_ENABLED=no
|
|
|
|
PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
### EMBEDDED_QPA logic missing ###
|
2012-03-26 17:02:13 +00:00
|
|
|
case "$PlatformCode,$PLATFORM_MAC" in
|
2011-04-27 10:05:43 +00:00
|
|
|
X9,* | XC,* | XU,* | XW,* | XM,*)
|
|
|
|
# Qt All-OS
|
|
|
|
LICENSE_EXTENSION="-ALLOS"
|
|
|
|
;;
|
|
|
|
8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
|
|
|
|
# Qt for Embedded Linux
|
|
|
|
LICENSE_EXTENSION="-EMBEDDED"
|
|
|
|
;;
|
2012-03-26 17:02:13 +00:00
|
|
|
6M,* | N7,* | N9,* | NX,*)
|
2011-04-27 10:05:43 +00:00
|
|
|
# Embedded no-deploy
|
|
|
|
LICENSE_EXTENSION="-EMBEDDED"
|
|
|
|
;;
|
2012-03-26 17:02:13 +00:00
|
|
|
FM,* | LM,yes | ZM,no)
|
2011-04-27 10:05:43 +00:00
|
|
|
# Desktop
|
|
|
|
LICENSE_EXTENSION="-DESKTOP"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
Platform=Linux/X11
|
|
|
|
[ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
|
|
|
|
echo
|
|
|
|
echo "You are not licensed for the $Platform platform."
|
|
|
|
echo
|
|
|
|
echo "Please contact qt-info@nokia.com to upgrade your license to"
|
|
|
|
echo "include the $Platform platform, or install the Qt Open Source Edition"
|
|
|
|
echo "if you intend to develop free software."
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if test -r "$relpath/.LICENSE"; then
|
|
|
|
# Generic, non-final license
|
|
|
|
LICENSE_EXTENSION=""
|
|
|
|
line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
|
|
|
|
case "$line" in
|
|
|
|
*BETA*)
|
|
|
|
Edition=Beta
|
|
|
|
;;
|
|
|
|
*TECHNOLOGY?PREVIEW*)
|
|
|
|
Edition=Preview
|
|
|
|
;;
|
|
|
|
*EVALUATION*)
|
|
|
|
Edition=Evaluation
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo >&2 "Invalid license files; cannot continue"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
Licensee="$Edition"
|
|
|
|
EditionString="$Edition"
|
|
|
|
QT_EDITION="QT_EDITION_DESKTOP"
|
|
|
|
fi
|
|
|
|
|
|
|
|
case "$LicenseFeatureCode" in
|
|
|
|
B|G|L|Y)
|
|
|
|
# US
|
|
|
|
case "$LicenseType" in
|
|
|
|
Commercial)
|
|
|
|
cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
|
|
|
|
;;
|
|
|
|
Evaluation)
|
|
|
|
cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
2|4|5|F)
|
|
|
|
# non-US
|
|
|
|
case "$LicenseType" in
|
|
|
|
Commercial)
|
|
|
|
cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
|
|
|
|
;;
|
|
|
|
Evaluation)
|
|
|
|
cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo
|
|
|
|
echo "Invalid license key. Please check the license key."
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
case "$LicenseFeatureCode" in
|
|
|
|
4|B|F|Y)
|
|
|
|
CFG_RTOS_ENABLED=yes
|
|
|
|
;;
|
|
|
|
2|5|G|L)
|
|
|
|
CFG_RTOS_ENABLED=no
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if [ '!' -f "$outpath/LICENSE" ]; then
|
|
|
|
echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
|
|
|
|
echo "this software has disappeared."
|
|
|
|
echo
|
|
|
|
echo "Sorry, you are not licensed to use this software."
|
|
|
|
echo "Try re-installing."
|
|
|
|
echo
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
elif [ $COMMERCIAL_USER = "no" ]; then
|
|
|
|
# Open Source edition - may only be used under the terms of the GPL or LGPL.
|
|
|
|
[ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
|
|
|
|
Licensee="Open Source"
|
|
|
|
Edition="OpenSource"
|
|
|
|
EditionString="Open Source"
|
|
|
|
QT_EDITION="QT_EDITION_OPENSOURCE"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# initalize variables
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
|
|
|
|
for varname in $SYSTEM_VARIABLES; do
|
|
|
|
qmakevarname="${varname}"
|
|
|
|
# use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
|
|
|
|
if [ "${varname}" = "LDFLAGS" ]; then
|
|
|
|
qmakevarname="LFLAGS"
|
|
|
|
elif [ "${varname}" = "LD" ]; then
|
|
|
|
qmakevarname="LINK"
|
|
|
|
fi
|
|
|
|
cmd=`echo \
|
|
|
|
'if [ -n "\$'${varname}'" ]; then
|
|
|
|
QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
|
|
|
|
fi'`
|
|
|
|
eval "$cmd"
|
|
|
|
done
|
|
|
|
# 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"
|
|
|
|
|
|
|
|
QMakeVar add styles "cde mac motif plastique cleanlooks windows"
|
|
|
|
|
|
|
|
# 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:
|
|
|
|
MIN_DBUS_1_VERSION=0.93
|
|
|
|
|
|
|
|
# initalize internal variables
|
|
|
|
CFG_CONFIGURE_EXIT_ON_ERROR=yes
|
|
|
|
CFG_PROFILE=no
|
|
|
|
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_QCONFIG=full
|
|
|
|
CFG_DEBUG=auto
|
|
|
|
CFG_MYSQL_CONFIG=
|
|
|
|
CFG_DEBUG_RELEASE=no
|
2012-08-07 20:22:38 +00:00
|
|
|
CFG_FORCEDEBUGINFO=no
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_SHARED=yes
|
|
|
|
CFG_SM=auto
|
|
|
|
CFG_XSHAPE=auto
|
|
|
|
CFG_XSYNC=auto
|
|
|
|
CFG_XVIDEO=auto
|
|
|
|
CFG_XINERAMA=runtime
|
|
|
|
CFG_XFIXES=runtime
|
|
|
|
CFG_ZLIB=auto
|
|
|
|
CFG_SQLITE=qt
|
|
|
|
CFG_GIF=auto
|
|
|
|
CFG_PNG=yes
|
|
|
|
CFG_LIBPNG=auto
|
|
|
|
CFG_JPEG=auto
|
|
|
|
CFG_LIBJPEG=auto
|
|
|
|
CFG_XCURSOR=runtime
|
|
|
|
CFG_XRANDR=runtime
|
|
|
|
CFG_XRENDER=auto
|
|
|
|
CFG_MITSHM=auto
|
|
|
|
CFG_OPENGL=auto
|
|
|
|
CFG_OPENVG=auto
|
|
|
|
CFG_OPENVG_LC_INCLUDES=no
|
|
|
|
CFG_OPENVG_SHIVA=auto
|
|
|
|
CFG_OPENVG_ON_OPENGL=auto
|
2012-03-07 14:07:07 +00:00
|
|
|
CFG_EGL=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_SSE=auto
|
|
|
|
CFG_FONTCONFIG=auto
|
|
|
|
CFG_LIBFREETYPE=auto
|
|
|
|
CFG_SQL_AVAILABLE=
|
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=""
|
|
|
|
CFG_RELEASE_QMAKE=no
|
|
|
|
CFG_AUDIO_BACKEND=auto
|
2011-11-18 08:48:54 +00:00
|
|
|
CFG_V8SNAPSHOT=auto
|
2012-03-30 11:43:10 +00:00
|
|
|
CFG_QML_DEBUG=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_JAVASCRIPTCORE_JIT=auto
|
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
|
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
|
|
|
# Set when the -arch or -host-arch arguments are used
|
|
|
|
OPT_OBSOLETE_HOST_ARG=no
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_USE_GNUMAKE=no
|
|
|
|
CFG_IM=yes
|
2011-10-14 13:55:35 +00:00
|
|
|
CFG_XINPUT2=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_XINPUT=runtime
|
|
|
|
CFG_XKB=auto
|
2011-06-10 14:05:03 +00:00
|
|
|
CFG_XCB=auto
|
2011-08-25 11:39:07 +00:00
|
|
|
CFG_XCB_LIMITED=yes
|
2012-03-07 14:07:07 +00:00
|
|
|
CFG_EGLFS=auto
|
2012-02-28 09:00:32 +00:00
|
|
|
CFG_DIRECTFB=auto
|
2012-07-02 21:30:41 +00:00
|
|
|
CFG_LINUXFB=auto
|
2012-07-16 13:13:18 +00:00
|
|
|
CFG_KMS=auto
|
2012-02-05 11:32:40 +00:00
|
|
|
CFG_LIBUDEV=auto
|
2012-03-12 11:04:54 +00:00
|
|
|
CFG_OBSOLETE_WAYLAND=no
|
2012-02-05 11:32:40 +00:00
|
|
|
CFG_EVDEV=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_NIS=auto
|
|
|
|
CFG_CUPS=auto
|
|
|
|
CFG_ICONV=auto
|
|
|
|
CFG_DBUS=auto
|
|
|
|
CFG_GLIB=auto
|
|
|
|
CFG_GSTREAMER=auto
|
|
|
|
CFG_QGTKSTYLE=auto
|
|
|
|
CFG_LARGEFILE=auto
|
|
|
|
CFG_OPENSSL=auto
|
|
|
|
CFG_PRECOMPILE=auto
|
|
|
|
CFG_SEPARATE_DEBUG_INFO=no
|
|
|
|
CFG_SEPARATE_DEBUG_INFO_NOCOPY=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
|
2011-12-07 08:20:16 +00:00
|
|
|
CFG_REDUCE_RELOCATIONS=auto
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_ACCESSIBILITY=auto
|
|
|
|
CFG_IWMMXT=no
|
|
|
|
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
|
|
|
|
CFG_MREMAP=auto
|
|
|
|
CFG_GETADDRINFO=auto
|
|
|
|
CFG_IPV6IFNAME=auto
|
|
|
|
CFG_GETIFADDRS=auto
|
|
|
|
CFG_INOTIFY=auto
|
|
|
|
CFG_RPATH=yes
|
|
|
|
CFG_FRAMEWORK=auto
|
2011-04-18 15:08:30 +00:00
|
|
|
CFG_MAC_HARFBUZZ=no
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_PREFIX_INSTALL=yes
|
|
|
|
CFG_SDK=
|
2012-05-30 23:44:53 +00:00
|
|
|
DEFINES=
|
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++"
|
2011-04-27 10:05:43 +00:00
|
|
|
XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
|
2011-10-14 13:55:35 +00:00
|
|
|
XPLATFORM_MAEMO=no
|
2012-06-07 08:34:33 +00:00
|
|
|
XPLATFORM_QNX=no
|
2011-04-27 10:05:43 +00:00
|
|
|
PLATFORM=$QMAKESPEC
|
|
|
|
QT_CROSS_COMPILE=no
|
|
|
|
OPT_CONFIRM_LICENSE=no
|
|
|
|
OPT_SHADOW=maybe
|
|
|
|
OPT_FAST=auto
|
|
|
|
OPT_VERBOSE=no
|
|
|
|
OPT_HELP=
|
|
|
|
CFG_SILENT=no
|
|
|
|
CFG_ALSA=auto
|
|
|
|
CFG_PULSEAUDIO=auto
|
|
|
|
CFG_COREWLAN=auto
|
2012-08-02 13:37:50 +00:00
|
|
|
CFG_PROCESS=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_ICU=auto
|
2011-11-11 10:21:52 +00:00
|
|
|
CFG_FORCE_ASSERTS=no
|
2012-01-23 22:31:13 +00:00
|
|
|
CFG_PCRE=auto
|
2012-03-09 00:22:27 +00:00
|
|
|
QPA_PLATFORM_GUARD=yes
|
2012-05-29 05:10:09 +00:00
|
|
|
CFG_CXX11=auto
|
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=
|
|
|
|
QT_INSTALL_PLUGINS=
|
|
|
|
QT_INSTALL_IMPORTS=
|
|
|
|
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=
|
|
|
|
QT_HOST_DATA=
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#flags for SQL drivers
|
|
|
|
QT_CFLAGS_PSQL=
|
|
|
|
QT_LFLAGS_PSQL=
|
|
|
|
QT_CFLAGS_MYSQL=
|
|
|
|
QT_LFLAGS_MYSQL=
|
|
|
|
QT_LFLAGS_MYSQL_R=
|
|
|
|
QT_CFLAGS_SQLITE=
|
|
|
|
QT_LFLAGS_SQLITE=
|
|
|
|
QT_LFLAGS_ODBC="-lodbc"
|
|
|
|
QT_LFLAGS_TDS=
|
|
|
|
|
|
|
|
# flags for libdbus-1
|
|
|
|
QT_CFLAGS_DBUS=
|
|
|
|
QT_LIBS_DBUS=
|
|
|
|
|
|
|
|
# flags for Glib (X11 only)
|
|
|
|
QT_CFLAGS_GLIB=
|
|
|
|
QT_LIBS_GLIB=
|
|
|
|
|
|
|
|
# flags for GStreamer (X11 only)
|
|
|
|
QT_CFLAGS_GSTREAMER=
|
|
|
|
QT_LIBS_GSTREAMER=
|
|
|
|
|
2012-04-18 22:57:00 +00:00
|
|
|
# default qpa platform
|
|
|
|
QT_QPA_DEFAULT_PLATFORM=
|
|
|
|
|
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
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# opensource version removes some drivers, so force them to be off
|
|
|
|
CFG_SQL_tds=no
|
|
|
|
CFG_SQL_oci=no
|
|
|
|
CFG_SQL_db2=no
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
|
|
|
|
if [ -d "$relpath/src/plugins/imageformats" ]; then
|
|
|
|
for a in "$relpath/src/plugins/imageformats/"*; do
|
|
|
|
if [ -d "$a" ]; then
|
|
|
|
base_a=`basename "$a"`
|
|
|
|
CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
|
|
|
|
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-*)
|
|
|
|
VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
|
|
|
|
VAL=yes
|
|
|
|
;;
|
|
|
|
--disable-*)
|
|
|
|
VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
|
|
|
|
VAL=no
|
|
|
|
;;
|
|
|
|
--*=*)
|
|
|
|
VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
|
|
|
|
VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
|
|
|
|
;;
|
|
|
|
--no-*)
|
|
|
|
VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
|
|
|
|
VAL=no
|
|
|
|
;;
|
|
|
|
--*)
|
|
|
|
VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
|
|
|
|
VAL=yes
|
|
|
|
;;
|
|
|
|
#Qt plugin options
|
|
|
|
-no-*-*|-plugin-*-*|-qt-*-*)
|
|
|
|
VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
|
|
|
|
VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
|
|
|
|
;;
|
|
|
|
#Qt style no options
|
|
|
|
-no-*)
|
|
|
|
VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
|
|
|
|
VAL=no
|
|
|
|
;;
|
|
|
|
#Qt style options that pass an argument
|
2012-04-02 17:20:11 +00:00
|
|
|
-prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig)
|
2011-04-27 10:05:43 +00:00
|
|
|
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
|
|
|
|
shift
|
|
|
|
VAL="$1"
|
|
|
|
;;
|
|
|
|
#Qt style complex options in one command
|
|
|
|
-enable-*|-disable-*)
|
|
|
|
VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
|
|
|
|
VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
|
|
|
|
;;
|
|
|
|
#Qt Builtin/System style options
|
|
|
|
-no-*|-system-*|-qt-*)
|
|
|
|
VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
|
|
|
|
VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
|
|
|
|
;;
|
|
|
|
#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
|
|
|
|
;;
|
|
|
|
-openvg)
|
|
|
|
VAR=openvg
|
|
|
|
# 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
|
|
|
|
;;
|
|
|
|
-hostprefix)
|
|
|
|
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
|
|
|
|
# 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
|
|
|
|
;;
|
|
|
|
-fpu)
|
|
|
|
VAR="fpu"
|
|
|
|
# this option may or may not be followed by an argument
|
|
|
|
if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
|
|
|
|
VAL=no
|
|
|
|
else
|
|
|
|
shift
|
|
|
|
VAL=$1
|
|
|
|
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
|
|
|
|
;;
|
2012-05-18 12:39:44 +00:00
|
|
|
-l?*|-l)
|
2011-04-27 10:05:43 +00:00
|
|
|
VAR="add_link"
|
2012-05-18 12:39:44 +00:00
|
|
|
if [ "$1" = "-l" ]; then
|
|
|
|
shift
|
|
|
|
VAL="$1"
|
|
|
|
else
|
|
|
|
VAL=`echo $1 | sed 's,-l,,'`
|
|
|
|
fi
|
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
|
|
|
|
;;
|
|
|
|
-fw?*|-fw)
|
|
|
|
VAR="add_framework"
|
|
|
|
if [ "$1" = "-fw" ]; then
|
|
|
|
shift
|
|
|
|
VAL="$1"
|
|
|
|
else
|
|
|
|
VAL=`echo $1 | sed 's,-fw,,'`
|
|
|
|
fi
|
|
|
|
;;
|
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
|
|
|
-*)
|
|
|
|
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"
|
|
|
|
OPT_HELP=yes
|
|
|
|
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
|
|
|
|
;;
|
|
|
|
license)
|
|
|
|
LICENSE_FILE="$VAL"
|
|
|
|
;;
|
|
|
|
gnumake)
|
|
|
|
CFG_USE_GNUMAKE="$VAL"
|
|
|
|
;;
|
|
|
|
mysql_config)
|
|
|
|
CFG_MYSQL_CONFIG="$VAL"
|
|
|
|
;;
|
|
|
|
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"
|
|
|
|
;;
|
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)
|
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="force"
|
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"
|
|
|
|
;;
|
|
|
|
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"
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
qconfig)
|
|
|
|
CFG_QCONFIG="$VAL"
|
|
|
|
;;
|
|
|
|
sysroot)
|
|
|
|
CFG_SYSROOT="$VAL"
|
|
|
|
;;
|
2012-07-12 11:03:16 +00:00
|
|
|
gcc-sysroot)
|
|
|
|
CFG_GCC_SYSROOT="$VAL"
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
bindir)
|
|
|
|
QT_INSTALL_BINS="$VAL"
|
|
|
|
;;
|
|
|
|
sse)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SSE="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
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
|
|
|
|
;;
|
|
|
|
openvg)
|
|
|
|
if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_OPENVG="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
nomake)
|
|
|
|
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
|
|
|
|
;;
|
|
|
|
make)
|
|
|
|
CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
|
|
|
|
;;
|
|
|
|
sdk)
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_SDK="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-02-14 09:01:17 +00:00
|
|
|
arch|host-arch)
|
|
|
|
OPT_OBSOLETE_HOST_ARG=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
2011-04-18 15:08:30 +00:00
|
|
|
harfbuzz)
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
|
2011-04-18 15:08:30 +00:00
|
|
|
CFG_MAC_HARFBUZZ="$VAL"
|
|
|
|
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
|
|
|
|
QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-06-23 08:48:33 +00:00
|
|
|
testcocoon)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
platform)
|
|
|
|
PLATFORM="$VAL"
|
|
|
|
# keep compatibility with old platform names
|
|
|
|
case $PLATFORM in
|
|
|
|
aix-64)
|
|
|
|
PLATFORM=aix-xlc-64
|
|
|
|
;;
|
|
|
|
hpux-o64)
|
|
|
|
PLATFORM=hpux-acc-o64
|
|
|
|
;;
|
|
|
|
hpux-n64)
|
|
|
|
PLATFORM=hpux-acc-64
|
|
|
|
;;
|
|
|
|
hpux-acc-n64)
|
|
|
|
PLATFORM=hpux-acc-64
|
|
|
|
;;
|
|
|
|
irix-n32)
|
|
|
|
PLATFORM=irix-cc
|
|
|
|
;;
|
|
|
|
irix-64)
|
|
|
|
PLATFORM=irix-cc-64
|
|
|
|
;;
|
|
|
|
irix-cc-n64)
|
|
|
|
PLATFORM=irix-cc-64
|
|
|
|
;;
|
|
|
|
reliant-64)
|
|
|
|
PLATFORM=reliant-cds-64
|
|
|
|
;;
|
|
|
|
solaris-64)
|
|
|
|
PLATFORM=solaris-cc-64
|
|
|
|
;;
|
|
|
|
openunix-cc)
|
|
|
|
PLATFORM=unixware-cc
|
|
|
|
;;
|
|
|
|
openunix-g++)
|
|
|
|
PLATFORM=unixware-g++
|
|
|
|
;;
|
|
|
|
unixware7-cc)
|
|
|
|
PLATFORM=unixware-cc
|
|
|
|
;;
|
|
|
|
unixware7-g++)
|
|
|
|
PLATFORM=unixware-g++
|
|
|
|
;;
|
|
|
|
macx-g++-64)
|
|
|
|
PLATFORM=macx-g++
|
|
|
|
NATIVE_64_ARCH=
|
|
|
|
case `uname -p` in
|
|
|
|
i386) NATIVE_64_ARCH="x86_64" ;;
|
|
|
|
powerpc) NATIVE_64_ARCH="ppc64" ;;
|
|
|
|
*) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
|
|
|
|
esac
|
|
|
|
if [ ! -z "$NATIVE_64_ARCH" ]; then
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
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
|
|
|
|
;;
|
|
|
|
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)
|
|
|
|
DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
|
|
|
|
DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
|
|
|
|
DeviceVar set $DEV_VAR $DEV_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
|
|
|
|
;;
|
|
|
|
optimized-qmake)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_RELEASE_QMAKE="$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
|
|
|
|
;;
|
|
|
|
prefix-install)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_PREFIX_INSTALL="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
debug)
|
|
|
|
CFG_DEBUG="$VAL"
|
|
|
|
;;
|
2012-08-07 20:22:38 +00:00
|
|
|
force-debug-info)
|
|
|
|
CFG_FORCEDEBUGINFO="$VAL"
|
|
|
|
;;
|
2012-01-03 15:01:40 +00:00
|
|
|
developer-build|commercial|opensource)
|
2011-04-27 10:05:43 +00:00
|
|
|
# These switches have been dealt with already
|
|
|
|
;;
|
|
|
|
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-*)
|
|
|
|
FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
|
|
|
|
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
|
|
|
|
;;
|
|
|
|
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
|
|
|
|
|
|
|
|
;;
|
|
|
|
xinerama)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
|
|
|
|
CFG_XINERAMA="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
xshape)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_XSHAPE="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
xvideo)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_XVIDEO="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
xsync)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_XSYNC="$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
|
|
|
xinput)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
|
|
|
|
CFG_XINPUT="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
egl)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_EGL="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
pch)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_PRECOMPILE="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
separate-debug-info)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_SEPARATE_DEBUG_INFO="$VAL"
|
|
|
|
elif [ "$VAL" = "nocopy" ] ; then
|
|
|
|
CFG_SEPARATE_DEBUG_INFO="yes"
|
|
|
|
CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
|
|
|
|
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
|
|
|
|
;;
|
2011-04-27 10:05:43 +00:00
|
|
|
iwmmxt)
|
|
|
|
CFG_IWMMXT="yes"
|
|
|
|
;;
|
|
|
|
neon)
|
|
|
|
if [ "$VAL" = "no" ]; then
|
|
|
|
CFG_NEON="$VAL"
|
|
|
|
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
|
|
|
|
;;
|
|
|
|
zlib)
|
|
|
|
[ "$VAL" = "qt" ] && VAL=yes
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
|
|
|
|
CFG_ZLIB="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
# No longer supported:
|
|
|
|
#[ "$VAL" = "no" ] && CFG_LIBPNG=no
|
|
|
|
;;
|
|
|
|
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
|
|
|
|
;;
|
|
|
|
xcursor)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
|
|
|
|
CFG_XCURSOR="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
xfixes)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
|
|
|
|
CFG_XFIXES="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
xrandr)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
|
|
|
|
CFG_XRANDR="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
xrender)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_XRENDER="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
mitshm)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_MITSHM="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
fontconfig)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_FONTCONFIG="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
xkb)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_XKB="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-05-18 14:35:04 +00:00
|
|
|
xcb)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_XCB="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2011-09-21 09:11:14 +00:00
|
|
|
wayland)
|
2012-03-12 11:04:54 +00:00
|
|
|
CFG_OBSOLETE_WAYLAND=yes
|
2011-09-21 09:11:14 +00:00
|
|
|
;;
|
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
|
|
|
|
;;
|
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
|
|
|
|
;;
|
2012-02-05 11:32:40 +00:00
|
|
|
libudev)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_LIBUDEV="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
evdev)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_EVDEV="$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
|
|
|
|
;;
|
|
|
|
gstreamer)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_GSTREAMER="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
gtkstyle)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_QGTKSTYLE="$VAL"
|
|
|
|
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
|
|
|
|
QPA_PLATFORM_GUARD="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
2012-01-26 17:43:06 +00:00
|
|
|
dbus)
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
|
|
|
|
CFG_DBUS="$VAL"
|
|
|
|
elif [ "$VAL" = "runtime" ]; then
|
|
|
|
CFG_DBUS="yes"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
dbus-linked)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
CFG_DBUS="linked"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
nis)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_NIS="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
largefile)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_LARGEFILE="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
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
|
|
|
|
;;
|
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
|
|
|
|
;;
|
|
|
|
javascript-jit)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_JAVASCRIPTCORE_JIT="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
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
|
|
|
|
;;
|
2012-03-09 09:17:16 +00:00
|
|
|
sql-*|imageformat-*)
|
2011-04-27 10:05:43 +00:00
|
|
|
# if Qt style options were used, $VAL can be "no", "qt", or "plugin"
|
|
|
|
# if autoconf style options were used, $VAL can be "yes" or "no"
|
|
|
|
[ "$VAL" = "yes" ] && VAL=qt
|
|
|
|
# now $VAL should be "no", "qt", or "plugin"... double-check
|
|
|
|
if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
# now $VAL is "no", "qt", or "plugin"
|
|
|
|
OPT="$VAL"
|
|
|
|
VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
|
|
|
|
VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
|
|
|
|
|
|
|
|
# Grab the available values
|
|
|
|
case "$VAR" in
|
|
|
|
sql)
|
|
|
|
avail="$CFG_SQL_AVAILABLE"
|
|
|
|
;;
|
|
|
|
imageformat)
|
|
|
|
avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
|
|
|
|
if [ "$OPT" != "plugin" ]; then
|
|
|
|
# png is always built in
|
|
|
|
avail="$avail png"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
avail=""
|
|
|
|
echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Check that that user's value is available.
|
|
|
|
found=no
|
|
|
|
for d in $avail; do
|
|
|
|
if [ "$VAL" = "$d" ]; then
|
|
|
|
found=yes
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
[ "$found" = yes ] || ERROR=yes
|
|
|
|
|
|
|
|
if [ "$VAR" = "sql" ]; then
|
|
|
|
# set the CFG_SQL_driver
|
|
|
|
eval "CFG_SQL_$VAL=\$OPT"
|
|
|
|
continue
|
|
|
|
elif [ "$VAR" = "imageformat" ]; then
|
|
|
|
[ "$OPT" = "qt" ] && OPT=yes
|
|
|
|
VAL="`echo $VAL |tr a-z A-Z`"
|
|
|
|
eval "CFG_$VAL=$OPT"
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
|
|
|
|
if [ "$OPT" = "plugin" ]; then
|
|
|
|
VAR="${VAR}-${OPT}"
|
|
|
|
fi
|
|
|
|
QMakeVar add "${VAR}s" "${VAL}"
|
|
|
|
elif [ "$OPT" = "no" ]; then
|
|
|
|
PLUG_VAR="${VAR}-plugin"
|
2012-03-09 09:17:16 +00:00
|
|
|
IN_VAR="${VAR}"
|
2011-04-27 10:05:43 +00:00
|
|
|
QMakeVar del "${IN_VAR}s" "$VAL"
|
|
|
|
QMakeVar del "${PLUG_VAR}s" "$VAL"
|
|
|
|
fi
|
|
|
|
if [ "$ERROR" = "yes" ]; then
|
|
|
|
echo "$CURRENT_OPT: unknown argument"
|
|
|
|
OPT_HELP=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
v|verbose)
|
|
|
|
if [ "$VAL" = "yes" ]; then
|
|
|
|
if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
|
|
|
|
QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
|
|
|
|
else
|
|
|
|
OPT_VERBOSE=yes
|
|
|
|
fi
|
|
|
|
elif [ "$VAL" = "no" ]; then
|
|
|
|
if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
|
|
|
|
QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
|
|
|
|
else
|
|
|
|
OPT_VERBOSE=no
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
fast)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
OPT_FAST="$VAL"
|
|
|
|
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)
|
|
|
|
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"
|
|
|
|
;;
|
|
|
|
dont-process)
|
2012-08-02 13:37:50 +00:00
|
|
|
CFG_PROCESS=no
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
process)
|
2012-08-02 13:37:50 +00:00
|
|
|
CFG_PROCESS=partial
|
|
|
|
;;
|
|
|
|
fully-process)
|
|
|
|
CFG_PROCESS=full
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
audio-backend)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_AUDIO_BACKEND="$VAL"
|
|
|
|
else
|
|
|
|
UNKNOWN_OPT=yes
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
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
|
|
|
|
;;
|
2012-05-29 05:10:09 +00:00
|
|
|
c++11)
|
|
|
|
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
|
|
|
CFG_CXX11="$VAL"
|
|
|
|
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"
|
|
|
|
OPT_HELP=yes
|
|
|
|
ERROR=yes
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# update QT_CONFIG to show our current predefined configuration
|
|
|
|
case "$CFG_QCONFIG" in
|
|
|
|
minimal|small|medium|large|full)
|
|
|
|
# these are a sequence of increasing functionality
|
|
|
|
for c in minimal small medium large full; do
|
|
|
|
QT_CONFIG="$QT_CONFIG $c-config"
|
|
|
|
[ "$CFG_QCONFIG" = $c ] && break
|
|
|
|
done
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# not known to be sufficient for anything
|
|
|
|
if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
|
|
|
|
echo >&2 "Error: configuration file not found:"
|
|
|
|
echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
|
|
|
|
echo >&2 " or"
|
|
|
|
echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
|
|
|
|
OPT_HELP=yes
|
|
|
|
fi
|
|
|
|
esac
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# build tree initialization
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# 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 perl
|
|
|
|
PERL="/usr/bin/perl"
|
|
|
|
if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
|
|
|
|
PERL=`$WHICH perl`
|
|
|
|
fi
|
|
|
|
|
|
|
|
### skip this if the user just needs help...
|
|
|
|
if [ "$OPT_HELP" != "yes" ]; then
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
echo
|
2012-03-26 20:13:58 +00:00
|
|
|
echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "Qt can be built in release mode with separate debug information, so"
|
|
|
|
echo "-debug-and-release is not necessary anymore"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_SILENT" = "yes" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG silent"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# 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..."
|
|
|
|
|
|
|
|
if [ -z "$PERL" ]; then
|
|
|
|
echo
|
|
|
|
echo "You need perl in your PATH to make a shadow build."
|
|
|
|
echo "Cannot proceed."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
[ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
|
|
|
|
|
|
|
|
# make a syncqt script that can be used in the shadow
|
|
|
|
rm -f "$outpath/bin/syncqt"
|
|
|
|
if [ -x "$relpath/bin/syncqt" ]; then
|
|
|
|
mkdir -p "$outpath/bin"
|
|
|
|
echo "#!/bin/sh" >"$outpath/bin/syncqt"
|
2012-01-23 07:27:06 +00:00
|
|
|
echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
|
2011-04-27 10:05:43 +00:00
|
|
|
chmod 755 "$outpath/bin/syncqt"
|
|
|
|
fi
|
|
|
|
|
2011-07-25 12:07:54 +00:00
|
|
|
for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
|
2011-04-27 10:05:43 +00:00
|
|
|
rm -f "$outpath/bin/$i"
|
|
|
|
if [ -x "$relpath/bin/$i" ]; then
|
|
|
|
mkdir -p "$outpath/bin"
|
|
|
|
echo "#!/bin/sh" >"$outpath/bin/$i"
|
|
|
|
echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
|
|
|
|
echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
|
|
|
|
chmod 755 "$outpath/bin/$i"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2012-03-26 19:11:30 +00:00
|
|
|
# save a pre-existing mkspecs/modules dir
|
|
|
|
test -d "$outpath/mkspecs/modules" && \
|
|
|
|
mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
|
2012-07-03 17:32:42 +00:00
|
|
|
# ditto for mkspecs/modules-inst
|
|
|
|
test -d "$outpath/mkspecs/modules-inst" && \
|
|
|
|
mv "$outpath/mkspecs/modules-inst" "$outpath/mkspecs-modules-inst"
|
2012-03-26 19:11:30 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# symlink the mkspecs directory
|
|
|
|
mkdir -p "$outpath/mkspecs"
|
|
|
|
rm -rf "$outpath"/mkspecs/*
|
|
|
|
ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
|
|
|
|
rm -f "$outpath/mkspecs/default"
|
|
|
|
|
|
|
|
ShadowMkspecs()
|
|
|
|
{
|
|
|
|
rm -rf "$outpath/mkspecs/$1"
|
|
|
|
find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
|
|
|
|
find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
|
|
|
|
}
|
|
|
|
|
|
|
|
# Special case for mkspecs/features directory.
|
|
|
|
# To be able to place .prf files into a shadow build directory,
|
|
|
|
# we're creating links for files only. The directory structure is reproduced.
|
|
|
|
ShadowMkspecs features
|
|
|
|
|
|
|
|
# The modules dir is special, too.
|
2012-03-26 19:11:30 +00:00
|
|
|
if test -d "$outpath/mkspecs-modules"; then
|
|
|
|
rm -rf "$outpath/mkspecs/modules"
|
|
|
|
mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
|
|
|
|
else
|
|
|
|
ShadowMkspecs modules
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-07-03 17:32:42 +00:00
|
|
|
# The modules-inst dir is not quite as special, but still.
|
|
|
|
if test -d "$outpath/mkspecs-modules-inst"; then
|
|
|
|
rm -rf "$outpath/mkspecs/modules-inst"
|
|
|
|
mv "$outpath/mkspecs-modules-inst" "$outpath/mkspecs/modules-inst"
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# symlink the doc directory
|
|
|
|
rm -rf "$outpath/doc"
|
|
|
|
ln -s "$relpath/doc" "$outpath/doc"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# symlink fonts to be able to run application from build directory
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ ! -d "${outpath}/lib/fonts" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$PLATFORM" = "$XPLATFORM" ]; then
|
|
|
|
mkdir -p "${outpath}/lib"
|
|
|
|
ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$OPT_FAST" = "auto" ]; then
|
|
|
|
if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
|
|
|
|
OPT_FAST=yes
|
|
|
|
else
|
|
|
|
OPT_FAST=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# 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
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi ### help
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# auto-detect all that hasn't been specified in the arguments
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if [ -z "$PLATFORM" ]; then
|
|
|
|
PLATFORM_NOTES=
|
|
|
|
case "$UNAME_SYSTEM:$UNAME_RELEASE" in
|
|
|
|
Darwin:*)
|
2012-03-26 20:13:58 +00:00
|
|
|
OSX_VERSION=`uname -r | cut -d. -f1`
|
2012-03-28 11:27:14 +00:00
|
|
|
# Select compiler. Use g++ unless we find a usable Clang version
|
|
|
|
PLATFORM=macx-g++
|
|
|
|
if [ "$OSX_VERSION" -ge 12 ]; then
|
|
|
|
# We're on Mountain Lion or above. Use Clang. Don't advertise gcc.
|
|
|
|
PLATFORM=macx-clang
|
|
|
|
elif [ "$OSX_VERSION" -eq 11 ]; then
|
|
|
|
# We're on Lion. Check if we have a supported Clang version
|
2012-03-26 20:13:58 +00:00
|
|
|
case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
|
|
|
|
3.*)
|
|
|
|
PLATFORM=macx-clang
|
|
|
|
PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
;;
|
2011-04-27 10:05:43 +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:*)
|
|
|
|
PLATFORM=freebsd-g++
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for FreeBSD: freebsd-icc
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
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:*)
|
|
|
|
case "$UNAME_MACHINE" in
|
|
|
|
x86_64|s390x|ppc64)
|
|
|
|
PLATFORM=linux-g++-64
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
PLATFORM=linux-g++
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
PLATFORM_NOTES="
|
|
|
|
- Also available for Linux: linux-kcc linux-icc linux-cxx
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
SunOS:5*)
|
|
|
|
if [ "$XPLATFORM_MINGW" = "yes" ]; then
|
|
|
|
PLATFORM="solaris-g++"
|
|
|
|
else
|
|
|
|
#PLATFORM=solaris-g++
|
|
|
|
PLATFORM=solaris-cc
|
|
|
|
#PLATFORM=solaris-cc64
|
|
|
|
fi
|
|
|
|
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++
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if [ "$OPT_HELP" != "yes" ]; then
|
|
|
|
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
|
|
|
|
fi
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
[ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
|
|
|
|
|
|
|
|
case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
|
2011-10-14 13:55:35 +00:00
|
|
|
case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
|
2012-06-10 17:23:28 +00:00
|
|
|
case "$XPLATFORM" in *qnx-*|*blackberry-*) XPLATFORM_QNX=yes;; esac
|
2011-04-27 10:05:43 +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"
|
2012-02-29 23:55:13 +00:00
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
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-g++', then if you would like to" >&2
|
|
|
|
echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
|
|
|
|
echo " built with 'macx-g++'" >&2
|
|
|
|
echo >&2
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# 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
|
2011-07-26 06:11:03 +00:00
|
|
|
echo " Please contact qt-info@nokia.com."
|
2011-04-27 10:05:43 +00:00
|
|
|
echo
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$UNAME_SYSTEM" = "SunOS" ]; then
|
|
|
|
# Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
|
|
|
|
if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
|
|
|
|
sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
|
|
|
|
mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_RTOS_ENABLED" = "no" ]; then
|
|
|
|
case `basename "$XPLATFORM"` in
|
|
|
|
qnx-* | vxworks-*)
|
|
|
|
echo ""
|
|
|
|
echo "You are not licensed for Qt for `basename $XPLATFORM`."
|
|
|
|
echo ""
|
|
|
|
echo "Please contact qt-info@nokia.com to upgrade your license to"
|
|
|
|
echo "include this platform, or install the Qt Open Source Edition"
|
|
|
|
echo "if you intend to develop free software."
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# tests that don't need qmake (must be run before displaying help)
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2011-08-10 01:49:46 +00:00
|
|
|
# detect build style
|
|
|
|
if [ "$CFG_DEBUG" = "auto" ]; then
|
2012-01-25 15:12:53 +00:00
|
|
|
if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
|
2011-08-10 01:49:46 +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
|
2012-06-12 11:30:13 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG build_all debug_and_release"
|
2011-08-10 01:49:46 +00:00
|
|
|
fi
|
|
|
|
|
2012-08-07 20:22:38 +00:00
|
|
|
if [ "$CFG_FORCEDEBUGINFO" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG force_debug_info"
|
|
|
|
fi
|
|
|
|
|
2012-07-24 15:05:08 +00:00
|
|
|
# pass on $CFG_SDK to the arch/configure tests.
|
|
|
|
if [ -n "$CFG_SDK" ]; then
|
|
|
|
MAC_SDK_FLAG="-sdk $CFG_SDK"
|
|
|
|
else
|
|
|
|
MAC_SDK_FLAG=
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# find the default framework value
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
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
|
|
|
|
|
2012-01-31 11:49:53 +00:00
|
|
|
QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-01-30 21:11:43 +00:00
|
|
|
TEST_COMPILER=$QMAKE_CONF_COMPILER
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
|
|
|
|
if [ -z "$TEST_COMPILER" ]; then
|
|
|
|
echo "ERROR: Cannot set the compiler for the configuration tests"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
2012-08-14 20:09:33 +00:00
|
|
|
TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-05-31 21:58:32 +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
|
|
|
|
|
2012-07-12 11:03:16 +00:00
|
|
|
if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then
|
2012-03-28 01:59:30 +00:00
|
|
|
SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
|
|
|
|
else
|
|
|
|
SYSROOT_FLAG=
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-07-20 13:26:07 +00:00
|
|
|
export SYSROOT_FLAG # used by config.tests/unix/{compile.test,arch.test}
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# auto-detect precompiled header support
|
|
|
|
if [ "$CFG_PRECOMPILE" = "auto" ]; then
|
2011-09-27 12:39:48 +00:00
|
|
|
if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_PRECOMPILE=no
|
|
|
|
else
|
|
|
|
CFG_PRECOMPILE=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# auto-detect support for separate debug info in objcopy
|
|
|
|
if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
|
2012-01-31 11:49:53 +00:00
|
|
|
TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
|
2011-04-27 10:05:43 +00:00
|
|
|
COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
|
|
|
|
if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
|
|
|
|
CFG_SEPARATE_DEBUG_INFO=no
|
|
|
|
else
|
|
|
|
case "$PLATFORM" in
|
|
|
|
hpux-*)
|
|
|
|
# binutils on HP-UX is buggy; default to no.
|
|
|
|
CFG_SEPARATE_DEBUG_INFO=no
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
CFG_SEPARATE_DEBUG_INFO=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# auto-detect -fvisibility support
|
2012-01-03 14:10:36 +00:00
|
|
|
if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
|
2012-01-03 14:10:36 +00:00
|
|
|
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
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_REDUCE_EXPORTS=no
|
|
|
|
else
|
|
|
|
CFG_REDUCE_EXPORTS=yes
|
|
|
|
fi
|
|
|
|
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
|
2012-01-03 14:10:36 +00:00
|
|
|
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
|
2011-04-27 10:05:43 +00:00
|
|
|
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
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
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
|
|
|
|
|
2012-08-14 20:09:33 +00:00
|
|
|
# auto-detect default include and library search paths
|
|
|
|
gccout=`$TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null`
|
|
|
|
libdirs=`echo "$gccout" | sed -n -e 's/^LIBRARY_PATH=\(.*\)/\1/p'`
|
|
|
|
DEFAULT_LIBDIRS=`IFS=:; for i in $libdirs; do test -d "$i" && cd "$i" && pwd; done | sort -u`
|
|
|
|
DEFAULT_INCDIRS=`echo "$gccout" | awk '
|
|
|
|
/^End of search/ { yup=0 }
|
|
|
|
yup { print substr($0, 2) }
|
|
|
|
/^\#include </ { yup=1 }
|
|
|
|
' | sort -u`
|
|
|
|
test -z "$DEFAULT_LIBDIRS" && DEFAULT_LIBDIRS="/lib
|
|
|
|
/usr/lib"
|
|
|
|
test -z "$DEFAULT_INCDIRS" && DEFAULT_INCDIRS="/usr/include
|
|
|
|
/usr/local/include"
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#setup the build parts
|
|
|
|
if [ -z "$CFG_BUILD_PARTS" ]; then
|
|
|
|
CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
|
|
|
|
|
2012-03-21 10:15:22 +00:00
|
|
|
# build tests by default, if a developer build
|
|
|
|
if [ "$CFG_DEV" = "yes" ]; then
|
|
|
|
CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# don't build tools by default when cross-compiling
|
|
|
|
if [ "$PLATFORM" != "$XPLATFORM" ]; then
|
|
|
|
CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
|
|
|
|
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"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# post process QT_INSTALL_* variables
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if [ -z "$QT_INSTALL_PREFIX" ]; then
|
|
|
|
if [ "$CFG_DEV" = "yes" ]; then
|
|
|
|
QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
|
|
|
|
else
|
2011-09-15 12:41:25 +00:00
|
|
|
QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
|
|
|
|
|
2011-11-07 09:16:21 +00:00
|
|
|
if [ -z "$QT_INSTALL_DOCS" ]; then #default
|
|
|
|
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-11-17 23:22:20 +00:00
|
|
|
QT_INSTALL_DOCS="/Developer/Documentation/Qt"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
2011-11-07 09:16:21 +00:00
|
|
|
[ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2011-11-07 09:16:21 +00:00
|
|
|
fi
|
|
|
|
QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
|
|
|
|
|
|
|
|
if [ -z "$QT_INSTALL_HEADERS" ]; then #default
|
|
|
|
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-11-17 23:22:20 +00:00
|
|
|
if [ "$CFG_FRAMEWORK" = "yes" ]; then
|
|
|
|
QT_INSTALL_HEADERS=
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2011-11-07 09:16:21 +00:00
|
|
|
[ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2011-11-07 09:16:21 +00:00
|
|
|
fi
|
|
|
|
QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
|
|
|
|
|
|
|
|
if [ -z "$QT_INSTALL_LIBS" ]; then #default
|
|
|
|
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-11-07 09:16:21 +00:00
|
|
|
if [ "$CFG_FRAMEWORK" = "yes" ]; then
|
2012-07-18 08:29:07 +00:00
|
|
|
QT_INSTALL_LIBS="/Library/Frameworks"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2011-11-07 09:16:21 +00:00
|
|
|
[ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
|
|
|
|
fi
|
|
|
|
QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2011-11-07 09:16:21 +00:00
|
|
|
if [ -z "$QT_INSTALL_BINS" ]; then #default
|
|
|
|
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-11-07 09:16:21 +00:00
|
|
|
QT_INSTALL_BINS="/Developer/Applications/Qt"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
2011-11-07 09:16:21 +00:00
|
|
|
[ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
|
|
|
|
fi
|
|
|
|
QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2011-11-07 09:16:21 +00:00
|
|
|
if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
|
|
|
|
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-11-17 23:22:20 +00:00
|
|
|
QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
2011-11-07 09:16:21 +00:00
|
|
|
[ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
|
|
|
|
fi
|
|
|
|
QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2011-11-07 09:16:21 +00:00
|
|
|
if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
|
|
|
|
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-11-17 23:22:20 +00:00
|
|
|
QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
2011-11-07 09:16:21 +00:00
|
|
|
[ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
|
|
|
|
fi
|
|
|
|
QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2011-11-07 09:16:21 +00:00
|
|
|
if [ -z "$QT_INSTALL_DATA" ]; then #default
|
|
|
|
QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
|
|
|
|
fi
|
|
|
|
QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2011-11-07 09:16:21 +00:00
|
|
|
if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
|
|
|
|
QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
|
|
|
|
fi
|
|
|
|
QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2011-11-07 09:16:21 +00:00
|
|
|
if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-11-17 23:22:20 +00:00
|
|
|
QT_INSTALL_SETTINGS=/Library/Preferences/Qt
|
2011-11-07 09:16:21 +00:00
|
|
|
else
|
2011-11-17 23:22:20 +00:00
|
|
|
QT_INSTALL_SETTINGS=/etc/xdg
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2011-11-07 09:16:21 +00:00
|
|
|
fi
|
|
|
|
QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2011-11-07 09:16:21 +00:00
|
|
|
if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
|
|
|
|
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-11-17 23:22:20 +00:00
|
|
|
QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
2011-11-07 09:16:21 +00:00
|
|
|
[ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2011-11-07 09:16:21 +00:00
|
|
|
QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2011-11-17 05:39:19 +00:00
|
|
|
#tests
|
|
|
|
if [ -z "$QT_INSTALL_TESTS" ]; then #default
|
|
|
|
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-11-17 05:39:19 +00:00
|
|
|
QT_INSTALL_TESTS="/Developer/Tests/Qt"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
[ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
|
|
|
|
fi
|
|
|
|
QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
|
|
|
|
|
2012-02-28 19:57:38 +00:00
|
|
|
#------- host paths --------
|
|
|
|
|
|
|
|
if [ -z "$QT_HOST_PREFIX" ]; then
|
|
|
|
QT_HOST_PREFIX=$QT_INSTALL_PREFIX
|
|
|
|
haveHpx=false
|
|
|
|
else
|
|
|
|
QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
|
|
|
|
haveHpx=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$QT_HOST_BINS" ]; then #default
|
|
|
|
if $haveHpx; then
|
|
|
|
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
|
|
|
QT_HOST_BINS="/Developer/Applications/Qt"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
[ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
|
|
|
|
else
|
|
|
|
QT_HOST_BINS="$QT_INSTALL_BINS"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
|
|
|
|
|
|
|
|
if [ -z "$QT_HOST_DATA" ]; then #default
|
|
|
|
if $haveHpx; then
|
|
|
|
QT_HOST_DATA="$QT_HOST_PREFIX"
|
|
|
|
else
|
|
|
|
QT_HOST_DATA="$QT_INSTALL_DATA"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# help - interactive parts of the script _after_ this section please
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# next, emit a usage message if something failed.
|
|
|
|
if [ "$OPT_HELP" = "yes" ]; then
|
|
|
|
[ "x$ERROR" = "xyes" ] && echo
|
|
|
|
if [ "$CFG_NIS" = "no" ]; then
|
|
|
|
NSY=" "
|
|
|
|
NSN="*"
|
|
|
|
else
|
|
|
|
NSY="*"
|
|
|
|
NSN=" "
|
|
|
|
fi
|
|
|
|
if [ "$CFG_CUPS" = "no" ]; then
|
|
|
|
CUY=" "
|
|
|
|
CUN="*"
|
|
|
|
else
|
|
|
|
CUY="*"
|
|
|
|
CUN=" "
|
|
|
|
fi
|
|
|
|
if [ "$CFG_ICONV" = "no" ]; then
|
|
|
|
CIY=" "
|
|
|
|
CIN="*"
|
|
|
|
else
|
|
|
|
CIY="*"
|
|
|
|
CIN=" "
|
|
|
|
fi
|
|
|
|
if [ "$CFG_LARGEFILE" = "no" ]; then
|
|
|
|
LFSY=" "
|
|
|
|
LFSN="*"
|
|
|
|
else
|
|
|
|
LFSY="*"
|
|
|
|
LFSN=" "
|
|
|
|
fi
|
|
|
|
if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
|
|
|
|
PHY=" "
|
|
|
|
PHN="*"
|
|
|
|
else
|
|
|
|
PHY="*"
|
|
|
|
PHN=" "
|
|
|
|
fi
|
|
|
|
|
2011-05-18 14:35:04 +00:00
|
|
|
if [ "$CFG_XCB" = "no" ]; then
|
2011-10-05 03:18:59 +00:00
|
|
|
XCBY=" "
|
|
|
|
XCBN="*"
|
2011-05-18 14:35:04 +00:00
|
|
|
else
|
2011-10-05 03:18:59 +00:00
|
|
|
XCBY="*"
|
|
|
|
XCBN=" "
|
2011-05-18 14:35:04 +00:00
|
|
|
fi
|
|
|
|
|
2012-03-07 14:07:07 +00:00
|
|
|
if [ "$CFG_EGLFS" = "no" ]; then
|
|
|
|
EGLFSY=" "
|
|
|
|
EGLFSN="*"
|
|
|
|
else
|
|
|
|
EGLFSY="*"
|
|
|
|
EGLFSN=" "
|
|
|
|
fi
|
|
|
|
|
2012-04-18 22:48:29 +00:00
|
|
|
if [ "$CFG_DIRECTFB" = "no" ]; then
|
2012-02-28 09:00:32 +00:00
|
|
|
DFBY=" "
|
|
|
|
DFBN="*"
|
|
|
|
else
|
|
|
|
DFBY="*"
|
|
|
|
DFBN=" "
|
|
|
|
fi
|
2012-07-02 21:30:41 +00:00
|
|
|
|
|
|
|
if [ "$CFG_LINUXFB" = "no" ]; then
|
|
|
|
LFBY=" "
|
|
|
|
LFBN="*"
|
|
|
|
else
|
|
|
|
LFBY="*"
|
|
|
|
LFBN=" "
|
|
|
|
fi
|
|
|
|
|
2012-07-16 13:13:18 +00:00
|
|
|
if [ "$CFG_KMS" = "no" ]; then
|
|
|
|
KMSY=" "
|
|
|
|
KMSN="*"
|
|
|
|
else
|
|
|
|
KMSY="*"
|
|
|
|
KMSN=" "
|
|
|
|
fi
|
|
|
|
|
2011-10-14 13:55:35 +00:00
|
|
|
if [ "$CFG_XINPUT2" = "no" ]; then
|
|
|
|
X2Y=" "
|
|
|
|
X2N="*"
|
|
|
|
else
|
|
|
|
X2Y="*"
|
|
|
|
X2N=" "
|
|
|
|
fi
|
2011-09-21 09:11:14 +00:00
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$CFG_DBUS" = "no" ]; then
|
|
|
|
DBY=" "
|
|
|
|
DBN="+"
|
|
|
|
else
|
|
|
|
DBY="+"
|
|
|
|
DBN=" "
|
|
|
|
fi
|
|
|
|
|
2012-03-30 18:20:34 +00:00
|
|
|
if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then
|
2012-03-26 20:13:58 +00:00
|
|
|
SBY=" "
|
|
|
|
SBN="*"
|
2012-03-30 18:20:34 +00:00
|
|
|
else
|
|
|
|
SBY="*"
|
|
|
|
SBN=" "
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_GLIB" = "no" ]; then
|
|
|
|
GBY=" "
|
|
|
|
GBN="+"
|
|
|
|
else
|
|
|
|
GBY="+"
|
|
|
|
GBN=" "
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
cat <<EOF
|
2012-08-02 12:54:26 +00:00
|
|
|
Usage: $relconf [options]
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
Installation options:
|
|
|
|
|
|
|
|
These are optional, but you may specify install directories.
|
|
|
|
|
|
|
|
-prefix <dir> ...... This will install everything relative to <dir>
|
|
|
|
(default $QT_INSTALL_PREFIX)
|
|
|
|
|
|
|
|
-hostprefix [dir] .. Tools and libraries needed when developing
|
|
|
|
applications are installed in [dir]. If [dir] is
|
|
|
|
not given, the current build directory will be used.
|
2012-02-28 19:57:38 +00:00
|
|
|
(default PREFIX)
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
* -prefix-install .... Force a sandboxed "local" installation of
|
|
|
|
Qt. This will install into
|
|
|
|
$QT_INSTALL_PREFIX, if this option is
|
|
|
|
disabled then some platforms will attempt a
|
2012-09-13 13:54:11 +00:00
|
|
|
"system" install by placing default values
|
|
|
|
in a system location other than PREFIX.
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
You may use these to separate different parts of the install:
|
|
|
|
|
|
|
|
-bindir <dir> ......... Executables will be installed to <dir>
|
|
|
|
(default PREFIX/bin)
|
|
|
|
-libdir <dir> ......... Libraries will be installed to <dir>
|
|
|
|
(default PREFIX/lib)
|
|
|
|
-docdir <dir> ......... Documentation will be installed to <dir>
|
|
|
|
(default PREFIX/doc)
|
|
|
|
-headerdir <dir> ...... Headers will be installed to <dir>
|
|
|
|
(default PREFIX/include)
|
|
|
|
-plugindir <dir> ...... Plugins will be installed to <dir>
|
|
|
|
(default PREFIX/plugins)
|
|
|
|
-importdir <dir> ...... Imports for QML will be installed to <dir>
|
|
|
|
(default PREFIX/imports)
|
|
|
|
-datadir <dir> ........ Data used by Qt programs will be installed to <dir>
|
|
|
|
(default PREFIX)
|
|
|
|
-translationdir <dir> . Translations of Qt programs will be installed to <dir>
|
|
|
|
(default PREFIX/translations)
|
|
|
|
-sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
|
|
|
|
(default PREFIX/etc/settings)
|
|
|
|
-examplesdir <dir> .... Examples will be installed to <dir>
|
|
|
|
(default PREFIX/examples)
|
2011-11-17 05:39:19 +00:00
|
|
|
-testsdir <dir> ....... Tests will be installed to <dir>
|
|
|
|
(default PREFIX/tests)
|
2012-02-28 19:57:38 +00:00
|
|
|
|
|
|
|
-hostbindir <dir> .. Host executables will be installed to <dir>
|
|
|
|
(default HOSTPREFIX/bin)
|
|
|
|
-hostdatadir <dir> . Data used by qmake will be installed to <dir>
|
|
|
|
(default HOSTPREFIX)
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
Configure options:
|
|
|
|
|
|
|
|
The defaults (*) are usually acceptable. A plus (+) denotes a default value
|
|
|
|
that needs to be evaluated. If the evaluation succeeds, the feature is
|
|
|
|
included. Here is a short explanation of each option:
|
|
|
|
|
|
|
|
* -release ........... Compile and link Qt with debugging turned off.
|
|
|
|
-debug ............. Compile and link Qt with debugging turned on.
|
|
|
|
-debug-and-release . Compile and link two versions of Qt, with and without
|
|
|
|
debugging turned on (Mac only).
|
|
|
|
|
2012-08-07 20:22:38 +00:00
|
|
|
-force-debug-info .. Create symbol files for release builds.
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
-developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
|
|
|
|
|
|
|
|
-opensource ........ Compile and link the Open-Source Edition of Qt.
|
|
|
|
-commercial ........ Compile and link the Commercial Edition of Qt.
|
|
|
|
|
2012-05-29 05:10:09 +00:00
|
|
|
-no-c++11 .......... Do not compile Qt with C++11 support enabled.
|
|
|
|
+ -c++11 ............. Compile Qt with C++11 support enabled.
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
* -shared ............ Create and use shared Qt libraries.
|
|
|
|
-static ............ Create and use static Qt libraries.
|
|
|
|
|
2012-08-02 13:37:50 +00:00
|
|
|
* -process ........... Generate only a top-level Makefile.
|
|
|
|
-fully-process ..... Generate Makefiles for the entire Qt tree.
|
|
|
|
-dont-process ...... Do not generate any Makefiles.
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
* -no-fast ........... Configure Qt normally by generating Makefiles for all
|
|
|
|
project files.
|
|
|
|
-fast .............. Configure Qt quickly by generating Makefiles only for
|
|
|
|
library and subdirectory targets. All other Makefiles
|
|
|
|
are created as wrappers, which will in turn run qmake.
|
|
|
|
|
|
|
|
-no-largefile ...... Disables large file support.
|
|
|
|
+ -largefile ......... Enables Qt to access files larger than 4 GB.
|
|
|
|
|
|
|
|
-no-accessibility .. Do not compile Accessibility support.
|
2012-05-10 21:52:05 +00:00
|
|
|
+ -accessibility ..... Compile Accessibility support.
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
-no-sql-<driver> ... Disable SQL <driver> entirely.
|
|
|
|
-qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
|
|
|
|
none are turned on.
|
|
|
|
-plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
|
|
|
|
at run time.
|
|
|
|
|
|
|
|
Possible values for <driver>:
|
|
|
|
[ $CFG_SQL_AVAILABLE ]
|
|
|
|
|
|
|
|
-system-sqlite ..... Use sqlite from the operating system.
|
|
|
|
|
|
|
|
-no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
|
|
|
|
+ -javascript-jit .... Build the JavaScriptCore JIT compiler.
|
|
|
|
|
2012-03-30 11:43:10 +00:00
|
|
|
-no-qml-debug ...... Do not build the in-process QML debugging support.
|
|
|
|
+ -qml-debug ......... Build the QML debugging support.
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
-platform target ... The operating system and compiler you are building
|
|
|
|
on ($PLATFORM).
|
|
|
|
|
|
|
|
See the README file for a list of supported
|
|
|
|
operating systems and compilers.
|
|
|
|
|
|
|
|
-no-sse2 ........... Do not compile with use of SSE2 instructions.
|
|
|
|
-no-sse3 ........... Do not compile with use of SSE3 instructions.
|
|
|
|
-no-ssse3 .......... Do not compile with use of SSSE3 instructions.
|
|
|
|
-no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
|
|
|
|
-no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
|
|
|
|
-no-avx ............ Do not compile with use of AVX instructions.
|
2011-12-30 00:44:16 +00:00
|
|
|
-no-avx2 ........... Do not compile with use of AVX2 instructions.
|
2011-04-27 10:05:43 +00:00
|
|
|
-no-neon ........... Do not compile with use of NEON instructions.
|
2012-03-02 16:43:52 +00:00
|
|
|
-no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
|
|
|
|
-no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
-qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
|
|
|
|
-qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
|
|
|
|
|
2011-06-23 08:48:33 +00:00
|
|
|
-testcocoon Instrument Qt with the TestCocoon code coverage tool.
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
-D <string> ........ Add an explicit define to the preprocessor.
|
|
|
|
-I <string> ........ Add an explicit include path.
|
|
|
|
-L <string> ........ Add an explicit library 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
|
|
|
+ -pkg-config ........ Use pkg-config to detect include and library paths. By default,
|
|
|
|
configure determines whether to use pkg-config or not with
|
|
|
|
some heuristics such as checking the environment variables.
|
|
|
|
-no-pkg-config ..... Disable use of pkg-config.
|
|
|
|
-force-pkg-config .. Force usage of pkg-config (skips pkg-config usability
|
|
|
|
detection heuristic).
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
-help, -h .......... Display this information.
|
|
|
|
|
|
|
|
Third Party Libraries:
|
|
|
|
|
|
|
|
-qt-zlib ........... Use the zlib bundled with Qt.
|
|
|
|
+ -system-zlib ....... Use zlib from the operating system.
|
|
|
|
See http://www.gzip.org/zlib
|
|
|
|
|
|
|
|
-no-gif ............ Do not compile GIF reading support.
|
|
|
|
|
|
|
|
-no-libpng ......... Do not compile PNG support.
|
|
|
|
-qt-libpng ......... Use the libpng bundled with Qt.
|
|
|
|
+ -system-libpng ..... Use libpng from the operating system.
|
|
|
|
See http://www.libpng.org/pub/png
|
|
|
|
|
|
|
|
-no-libjpeg ........ Do not compile JPEG support.
|
|
|
|
-qt-libjpeg ........ Use the libjpeg bundled with Qt.
|
|
|
|
+ -system-libjpeg .... Use libjpeg from the operating system.
|
|
|
|
See http://www.ijg.org
|
|
|
|
|
|
|
|
-no-openssl ........ Do not compile support for OpenSSL.
|
|
|
|
+ -openssl ........... Enable run-time OpenSSL support.
|
|
|
|
-openssl-linked .... Enabled linked OpenSSL support.
|
|
|
|
|
2012-01-23 22:31:13 +00:00
|
|
|
-qt-pcre ........... Use the PCRE library bundled with Qt.
|
|
|
|
+ -system-pcre ....... Use the PCRE library from the operating system.
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
Additional options:
|
|
|
|
|
|
|
|
-make <part> ....... Add part to the list of parts to be built at make time.
|
|
|
|
($QT_DEFAULT_BUILD_PARTS)
|
|
|
|
-nomake <part> ..... Exclude part from the list of parts to be built.
|
|
|
|
|
|
|
|
-R <string> ........ Add an explicit runtime library path to the Qt
|
|
|
|
libraries.
|
|
|
|
-l <string> ........ Add an explicit library.
|
|
|
|
|
|
|
|
-no-rpath .......... Do not use the library install path as a runtime
|
|
|
|
library path.
|
|
|
|
+ -rpath ............. Link Qt libraries and executables using the library
|
|
|
|
install path as a runtime library path. Equivalent
|
|
|
|
to -R install_libpath
|
|
|
|
|
|
|
|
-continue .......... Continue as far as possible if an error occurs.
|
|
|
|
|
|
|
|
-verbose, -v ....... Print verbose information about each step of the
|
|
|
|
configure process.
|
|
|
|
|
|
|
|
-silent ............ Reduce the build output so that warnings and errors
|
|
|
|
can be seen more easily.
|
|
|
|
|
|
|
|
* -no-optimized-qmake ... Do not build qmake optimized.
|
|
|
|
-optimized-qmake ...... Build qmake optimized.
|
|
|
|
|
|
|
|
-no-gui ............ Don't build the Qt GUI library
|
|
|
|
|
|
|
|
$NSN -no-nis ............ Do not compile NIS support.
|
|
|
|
$NSY -nis ............... Compile NIS support.
|
|
|
|
|
|
|
|
$CUN -no-cups ........... Do not compile CUPS support.
|
|
|
|
$CUY -cups .............. Compile CUPS support.
|
|
|
|
Requires cups/cups.h and libcups.so.2.
|
|
|
|
|
|
|
|
$CIN -no-iconv .......... Do not compile support for iconv(3).
|
|
|
|
$CIY -iconv ............. Compile support for iconv(3).
|
|
|
|
|
2012-09-10 15:39:44 +00:00
|
|
|
-no-icu ............ Do not compile support for ICU libraries.
|
|
|
|
+ -icu ............... Compile support for ICU libraries.
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
$PHN -no-pch ............ Do not use precompiled header support.
|
|
|
|
$PHY -pch ............... Use precompiled header support.
|
|
|
|
|
|
|
|
$DBN -no-dbus ........... Do not compile the QtDBus module.
|
|
|
|
$DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
|
|
|
|
-dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
|
|
|
|
|
|
|
|
-reduce-relocations ..... Reduce relocations in the libraries through extra
|
|
|
|
linker optimizations (Qt/X11 and Qt for Embedded Linux only;
|
|
|
|
experimental; needs GNU ld >= 2.18).
|
2011-12-08 14:51:37 +00:00
|
|
|
|
|
|
|
-force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
|
|
|
|
|
2012-03-20 21:02:21 +00:00
|
|
|
-device <name> ............... Cross-compile for device <name> (experimental)
|
|
|
|
-device-option <key=value> ... Add device specific options for the device mkspec
|
|
|
|
(experimental)
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
$SBN -no-separate-debug-info . Do not store debug information in a separate file.
|
|
|
|
$SBY -separate-debug-info .... Strip debug information into a separate .debug file.
|
|
|
|
|
2011-10-05 03:18:59 +00:00
|
|
|
$XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
|
|
|
|
$XCBY -xcb ............... Compile Xcb support.
|
2011-05-18 14:35:04 +00:00
|
|
|
|
2012-03-07 14:07:07 +00:00
|
|
|
$EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
|
2012-04-16 05:04:33 +00:00
|
|
|
$EGLFSY -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support).
|
2012-03-07 14:07:07 +00:00
|
|
|
|
2012-02-28 09:00:32 +00:00
|
|
|
$DFBN -no-directfb ....... Do not compile DirectFB support.
|
|
|
|
$DFBY -directfb .......... Compile DirectFB support.
|
|
|
|
|
2012-07-02 21:30:41 +00:00
|
|
|
$LFBN -no-linuxfb ........ Do not compile Linux Framebuffer support.
|
|
|
|
$LFBY -linuxfb ........... Compile Linux Framebuffer support.
|
|
|
|
|
2012-07-16 13:13:18 +00:00
|
|
|
$KMSN -no-kms ............ Do not compile KMS support.
|
|
|
|
$KMSY -kms ............... Compile KMS support (Requires EGL and OpenGL ES 2 support).
|
|
|
|
|
2012-04-18 22:57:00 +00:00
|
|
|
-qpa <name> ......... Sets the default QPA platform (e.g xcb, cocoa, windows).
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
-xplatform target ... The target platform when cross-compiling.
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-07-12 11:03:16 +00:00
|
|
|
-sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot and also sets pkg-config paths.
|
|
|
|
-no-gcc-sysroot ..... When using -sysroot, it disables the passing of --sysroot to the compiler
|
2012-03-28 03:38:00 +00:00
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
-no-feature-<feature> Do not compile in <feature>.
|
|
|
|
-feature-<feature> .. Compile in <feature>. The available features
|
|
|
|
are described in src/corelib/global/qfeatures.txt
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
-no-freetype ........ Do not compile in Freetype2 support.
|
|
|
|
-qt-freetype ........ Use the libfreetype bundled with Qt.
|
|
|
|
* -system-freetype .... Use libfreetype from the operating system.
|
|
|
|
See http://www.freetype.org/
|
2011-10-14 13:55:35 +00:00
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
-qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
|
|
|
|
default ($CFG_QCONFIG).
|
2011-10-14 13:55:35 +00:00
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
-no-opengl .......... Do not support OpenGL.
|
|
|
|
-opengl <api> ....... Enable OpenGL support
|
|
|
|
With no parameter, this will attempt to auto-detect
|
|
|
|
OpenGL ES 2, or regular desktop OpenGL.
|
|
|
|
Use es2 for <api> to override auto-detection.
|
2011-10-14 13:55:35 +00:00
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
$GBN -no-glib ........... Do not compile Glib support.
|
|
|
|
$GBY -glib .............. Compile Glib support.
|
2011-10-14 13:55:35 +00:00
|
|
|
EOF
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$XPLATFORM_MAEMO" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
cat << EOF
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
$X2N -no-xinput2......... Do not compile XInput2 support.
|
|
|
|
$X2Y -xinput2............ Compile XInput2 support.
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
EOF
|
2012-03-26 20:13:58 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2011-09-27 12:39:48 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
cat << EOF
|
|
|
|
|
|
|
|
Qt/Mac only:
|
|
|
|
|
|
|
|
-Fstring ........... Add an explicit framework path.
|
|
|
|
-fw string ......... Add an explicit framework.
|
|
|
|
|
|
|
|
* -framework ......... Build Qt as a series of frameworks and
|
|
|
|
link tools against those frameworks.
|
|
|
|
-no-framework ...... Do not build Qt as a series of frameworks.
|
|
|
|
|
|
|
|
-sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
|
|
|
|
To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
|
|
|
|
|
2011-04-18 15:08:30 +00:00
|
|
|
-harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
|
|
|
|
* -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
|
|
|
|
QT_ENABLE_HARFBUZZ environment variable.
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
[ "x$ERROR" = "xyes" ] && exit 1
|
|
|
|
exit 0
|
|
|
|
fi # Help
|
|
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# LICENSING, INTERACTIVE PART
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
echo
|
2012-03-26 20:13:58 +00:00
|
|
|
echo "This is the Qt ${EditionString} Edition."
|
2011-04-27 10:05:43 +00:00
|
|
|
echo
|
|
|
|
|
2012-01-03 15:01:40 +00:00
|
|
|
if [ "$Edition" = "OpenSource" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
while true; do
|
|
|
|
echo "You are licensed to use this software under the terms of"
|
|
|
|
echo "the Lesser GNU General Public License (LGPL) versions 2.1."
|
|
|
|
if [ -f "$relpath/LICENSE.GPL3" ]; then
|
|
|
|
echo "You are also licensed to use this software under the terms of"
|
|
|
|
echo "the GNU General Public License (GPL) versions 3."
|
|
|
|
affix="either"
|
|
|
|
else
|
|
|
|
affix="the"
|
|
|
|
fi
|
|
|
|
echo
|
|
|
|
if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
|
|
|
|
echo "You have already accepted the terms of the $LicenseType license."
|
|
|
|
acceptance=yes
|
|
|
|
else
|
|
|
|
if [ -f "$relpath/LICENSE.GPL3" ]; then
|
|
|
|
echo "Type '3' to view the GNU General Public License version 3."
|
|
|
|
fi
|
|
|
|
echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
|
|
|
|
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
|
|
|
|
elif [ "$acceptance" = "3" ]; then
|
|
|
|
more "$relpath/LICENSE.GPL3"
|
|
|
|
elif [ "$acceptance" = "L" ]; then
|
|
|
|
more "$relpath/LICENSE.LGPL"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
elif [ "$Edition" = "Preview" ]; then
|
|
|
|
TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
|
|
|
|
while true; do
|
|
|
|
|
|
|
|
if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
|
|
|
|
echo "You have already accepted the terms of the $LicenseType license."
|
|
|
|
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
|
|
|
|
elif [ "$Edition" != "OpenSource" ]; then
|
|
|
|
if [ -n "$ExpiryDate" ]; then
|
|
|
|
ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
|
|
|
|
[ -z "$ExpiryDate" ] && ExpiryDate="0"
|
|
|
|
Today=`date +%Y%m%d`
|
|
|
|
if [ "$Today" -gt "$ExpiryDate" ]; then
|
|
|
|
case "$LicenseType" in
|
|
|
|
Commercial|Academic|Educational)
|
2012-08-28 14:47:56 +00:00
|
|
|
echo
|
|
|
|
echo "WARNING WARNING WARNING WARNING"
|
|
|
|
echo
|
|
|
|
echo " Your support and upgrade period has expired."
|
|
|
|
echo
|
|
|
|
echo " You may continue to use your last licensed release"
|
|
|
|
echo " of Qt under the terms of your existing license"
|
|
|
|
echo " agreement. But you are not entitled to technical"
|
|
|
|
echo " support, nor are you entitled to use any more recent"
|
|
|
|
echo " Qt releases."
|
|
|
|
echo
|
|
|
|
echo " Please contact qt-info@nokia.com to renew your"
|
|
|
|
echo " support and upgrades for this license."
|
|
|
|
echo
|
|
|
|
echo "WARNING WARNING WARNING WARNING"
|
|
|
|
echo
|
|
|
|
sleep 3
|
2011-04-27 10:05:43 +00:00
|
|
|
;;
|
|
|
|
Evaluation|*)
|
|
|
|
echo
|
|
|
|
echo "NOTICE NOTICE NOTICE NOTICE"
|
|
|
|
echo
|
|
|
|
echo " Your Evaluation license has expired."
|
|
|
|
echo
|
|
|
|
echo " You are no longer licensed to use this software. Please"
|
|
|
|
echo " contact qt-info@nokia.com to purchase license, or install"
|
|
|
|
echo " the Qt Open Source Edition if you intend to develop free"
|
|
|
|
echo " software."
|
|
|
|
echo
|
|
|
|
echo "NOTICE NOTICE NOTICE NOTICE"
|
|
|
|
echo
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
TheLicense=`head -n 1 "$outpath/LICENSE"`
|
|
|
|
while true; do
|
|
|
|
if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
|
|
|
|
echo "You have already accepted the terms of the $TheLicense."
|
|
|
|
acceptance=yes
|
|
|
|
else
|
|
|
|
echo "You are licensed to use this software under the terms of"
|
|
|
|
echo "the $TheLicense."
|
|
|
|
echo
|
|
|
|
echo "Type '?' to view the $TheLicense."
|
|
|
|
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 $TheLicense? $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 1
|
|
|
|
else [ "$acceptance" = "?" ]
|
|
|
|
more "$outpath/LICENSE"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
# this should be moved somewhere else
|
|
|
|
case "$PLATFORM" in
|
|
|
|
aix-*)
|
|
|
|
AIX_VERSION=`uname -v`
|
|
|
|
if [ "$AIX_VERSION" -lt "5" ]; then
|
|
|
|
QMakeVar add QMAKE_LIBS_X11 -lbind
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# generate qconfig.cpp
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
[ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
|
|
|
|
|
|
|
|
cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
|
|
|
|
/* License Info */
|
2012-02-28 09:20:34 +00:00
|
|
|
static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
|
|
|
|
static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
/* Installation date */
|
2012-02-28 09:20:34 +00:00
|
|
|
static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
/* Installation Info */
|
2012-02-28 10:01:52 +00:00
|
|
|
static const char qt_configure_prefix_path_strs[][256 + 12] = {
|
|
|
|
"qt_prfxpath=$QT_INSTALL_PREFIX",
|
|
|
|
"qt_docspath=$QT_INSTALL_DOCS",
|
|
|
|
"qt_hdrspath=$QT_INSTALL_HEADERS",
|
|
|
|
"qt_libspath=$QT_INSTALL_LIBS",
|
|
|
|
"qt_binspath=$QT_INSTALL_BINS",
|
|
|
|
"qt_plugpath=$QT_INSTALL_PLUGINS",
|
|
|
|
"qt_impspath=$QT_INSTALL_IMPORTS",
|
|
|
|
"qt_datapath=$QT_INSTALL_DATA",
|
|
|
|
"qt_trnspath=$QT_INSTALL_TRANSLATIONS",
|
|
|
|
"qt_xmplpath=$QT_INSTALL_EXAMPLES",
|
|
|
|
"qt_tstspath=$QT_INSTALL_TESTS",
|
2012-02-28 19:57:38 +00:00
|
|
|
#ifdef QT_BUILD_QMAKE
|
|
|
|
"qt_ssrtpath=$CFG_SYSROOT",
|
|
|
|
"qt_hpfxpath=$QT_HOST_PREFIX",
|
|
|
|
"qt_hbinpath=$QT_HOST_BINS",
|
|
|
|
"qt_hdatpath=$QT_HOST_DATA",
|
|
|
|
#endif
|
2012-02-28 10:01:52 +00:00
|
|
|
};
|
|
|
|
static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
|
2011-04-27 10:05:43 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
|
|
|
|
|
|
|
|
/* strlen( "qt_lcnsxxxx" ) == 12 */
|
|
|
|
#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
|
|
|
|
#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
|
2012-02-28 10:01:52 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
|
|
|
|
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
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
if [ "$LicenseType" = "Evaluation" ]; then
|
2012-02-28 09:20:34 +00:00
|
|
|
EVALKEY=qt_qevalkey=$LicenseKeyExt
|
2012-05-30 23:44:53 +00:00
|
|
|
elif echo "$DEFINES" | grep QT_EVAL >/dev/null 2>&1; then
|
2012-02-28 09:20:34 +00:00
|
|
|
EVALKEY=qt_qevalkey=
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$EVALKEY" ]; then
|
|
|
|
rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
|
|
|
|
cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
|
|
|
|
/* Evaluation license key */
|
|
|
|
static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
|
|
|
|
EOF
|
|
|
|
chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# build qmake
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# symlink includes
|
|
|
|
if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
|
2012-08-31 14:33:33 +00:00
|
|
|
"$outpath/bin/syncqt" -minimal "$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" ];
|
|
|
|
echo "Creating qmake. Please wait..."
|
|
|
|
|
|
|
|
#mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
|
2012-01-31 17:36:18 +00:00
|
|
|
rm -rf mkspecs/default mkspecs/default-host
|
2011-04-27 10:05:43 +00:00
|
|
|
ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
|
2012-01-31 17:36:18 +00:00
|
|
|
ln -s `echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default-host
|
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=
|
|
|
|
EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
|
|
|
|
EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
|
|
|
|
EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
|
|
|
|
|
|
|
|
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
|
2012-01-31 11:49:53 +00:00
|
|
|
setBootstrapVariable QMAKE_CXXFLAGS
|
2011-04-27 10:05:43 +00:00
|
|
|
setBootstrapVariable QMAKE_LFLAGS
|
|
|
|
|
|
|
|
if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
|
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
|
|
|
|
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
|
|
|
|
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)"
|
|
|
|
elif [ "$CFG_DEBUG" = "yes" ]; then
|
|
|
|
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
|
|
|
|
|
2012-01-31 11:49:53 +00:00
|
|
|
if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
|
|
|
|
setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
|
2011-04-27 10:05:43 +00:00
|
|
|
for rpath in $RPATH_FLAGS; do
|
|
|
|
EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-09-27 12:39:48 +00:00
|
|
|
echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
|
|
|
|
echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
|
|
|
|
EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
|
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
|
|
|
|
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
|
|
|
|
EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
|
|
|
|
EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
|
|
|
|
if [ '!' -z "$CFG_SDK" ]; then
|
|
|
|
echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
|
|
|
|
echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
|
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
|
|
|
|
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
|
|
|
|
EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ '!' -z "$D_FLAGS" ]; then
|
2012-05-30 23:44:53 +00:00
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS $D_FLAGS"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
QMAKE_BIN_DIR="$QT_INSTALL_BINS"
|
|
|
|
[ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
|
|
|
|
QMAKE_DATA_DIR="$QT_INSTALL_DATA"
|
|
|
|
[ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
|
|
|
|
echo >>"$mkfile"
|
|
|
|
adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
|
|
|
|
adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
|
|
|
|
adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
|
|
|
|
sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
|
|
|
|
-e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
|
|
|
|
-e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
|
|
|
|
-e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
|
|
|
|
-e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
|
|
|
|
-e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
|
2011-04-20 18:57:51 +00:00
|
|
|
-e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
done
|
|
|
|
|
2012-09-11 13:22:29 +00:00
|
|
|
(cd "$outpath/qmake"; "$MAKE") || exit 2
|
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=..
|
|
|
|
EOF
|
|
|
|
|
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:
|
|
|
|
PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
|
|
|
|
fi
|
|
|
|
if [ -z "$PKG_CONFIG" ]; then
|
|
|
|
PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_PKGCONFIG" = "no" ]; then
|
|
|
|
PKG_CONFIG=
|
|
|
|
elif [ "$CFG_PKGCONFIG" = "force" ]; then
|
|
|
|
echo >&2 ""
|
|
|
|
echo >&2 "You have asked to use pkg-config. Please make sure you have"
|
|
|
|
echo >&2 "a correctly setup pkg-config environment!"
|
|
|
|
echo >&2 ""
|
|
|
|
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"
|
|
|
|
elif [ "$CFG_PKGCONFIG" = "yes" ]; then
|
|
|
|
echo >&2 "Error: PKG_CONFIG_LIBDIR has not been set. This could mean"
|
|
|
|
echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
|
|
|
|
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"
|
|
|
|
echo >&2 "use -force-pkg-config to override this test."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
PKG_CONFIG=
|
|
|
|
echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set."
|
|
|
|
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"
|
|
|
|
elif [ "$CFG_PKGCONFIG" = "yes" ]; then
|
|
|
|
echo >&2 "Error: PKG_CONFIG_SYSROOT_DIR has not been set. Set this variable"
|
|
|
|
echo >&2 "to your sysroot for pkg-config to function correctly when cross-compiling"
|
|
|
|
echo >&2 "or use -force-pkg-config to override this test."
|
|
|
|
exit 101
|
|
|
|
else
|
|
|
|
PKG_CONFIG=
|
|
|
|
echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set."
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
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
|
|
|
|
|
2012-04-18 22:35:24 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# write out device config before we run the test.
|
|
|
|
#-------------------------------------------------------------------------------
|
2012-05-31 06:13:10 +00:00
|
|
|
DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
|
|
|
|
if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
|
2012-04-18 22:35:24 +00:00
|
|
|
rm -f "$DEVICE_VARS_FILE"
|
|
|
|
else
|
2012-05-31 06:13:10 +00:00
|
|
|
mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
|
|
|
|
DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
|
2012-04-18 22:35:24 +00:00
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# tests that need qmake
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2012-08-12 08:14:59 +00:00
|
|
|
# parameters: path, name, extra args
|
|
|
|
compileTest()
|
|
|
|
{
|
|
|
|
path=config.tests/$1
|
|
|
|
name=$2
|
|
|
|
shift 2
|
2012-07-24 15:05:08 +00:00
|
|
|
"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "$path" "$name" $I_FLAGS $D_FLAGS $L_FLAGS $MAC_SDK_FLAG "$@"
|
2012-08-12 08:14:59 +00:00
|
|
|
}
|
|
|
|
|
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
|
2012-07-24 15:05:08 +00:00
|
|
|
"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG" $MAC_SDK_FLAG
|
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
|
2012-07-24 15:05:08 +00:00
|
|
|
SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG_HOST" $MAC_SDK_FLAG
|
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
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2012-05-29 05:10:09 +00:00
|
|
|
# Detect C++11 support
|
|
|
|
if [ "$CFG_CXX11" != "no" ]; then
|
2012-09-05 08:31:49 +00:00
|
|
|
if compileTest common/c++11 "C++11"; then
|
2012-05-29 05:10:09 +00:00
|
|
|
CFG_CXX11="yes"
|
|
|
|
elif [ "$CFG_CXX11" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "C++11 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_CXX11="no"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# detect availability of float math.h functions
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/floatmath "floatmath"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_USE_FLOATMATH=yes
|
|
|
|
else
|
|
|
|
CFG_USE_FLOATMATH=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect sse2 support
|
|
|
|
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
|
|
|
|
else
|
|
|
|
CFG_SSE2=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect sse3 support
|
|
|
|
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
|
|
|
|
else
|
|
|
|
CFG_SSE3=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect ssse3 support
|
|
|
|
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
|
|
|
|
else
|
|
|
|
CFG_SSSE3=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect sse4.1 support
|
|
|
|
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
|
|
|
|
else
|
|
|
|
CFG_SSE4_1=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect sse4.2 support
|
|
|
|
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
|
|
|
|
else
|
|
|
|
CFG_SSE4_2=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect avx support
|
|
|
|
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
|
|
|
|
Apple\ clang\ version\ 2*|Apple\ clang\ version\ 3.0*)
|
|
|
|
CFG_AVX=no
|
|
|
|
if [ "$OPT_VERBOSE" = "yes" ]; then
|
|
|
|
echo 'AVX support disabled for blacklisted clang compiler'
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
CFG_AVX=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
CFG_AVX=yes
|
|
|
|
;;
|
|
|
|
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
|
|
|
|
else
|
|
|
|
CFG_AVX2=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# check iWMMXt support
|
|
|
|
if [ "$CFG_IWMMXT" = "yes" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
compileTest unix/iwmmxt "iwmmxt"
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ $? != "0" ]; then
|
|
|
|
echo "The iWMMXt functionality test failed!"
|
|
|
|
echo " Please make sure your compiler supports iWMMXt intrinsics!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# detect neon support
|
|
|
|
if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/neon "neon"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_NEON=yes
|
|
|
|
else
|
|
|
|
CFG_NEON=no
|
|
|
|
fi
|
2012-02-14 09:01:17 +00:00
|
|
|
elif [ "$CFG_ARCH" != "arm" ]; then
|
|
|
|
CFG_NEON=no
|
2011-04-27 10:05:43 +00:00
|
|
|
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
|
|
|
|
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dsp "mips_dsp" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
|
|
|
|
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
|
|
|
|
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dspr2 "mips_dspr2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
|
|
|
|
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"
|
|
|
|
|
|
|
|
# detect zlib
|
|
|
|
if [ "$CFG_ZLIB" = "no" ]; then
|
|
|
|
# Note: Qt no longer support builds without zlib
|
|
|
|
# So we force a "no" to be "auto" here.
|
|
|
|
# If you REALLY really need no zlib support, you can still disable
|
|
|
|
# it by doing the following:
|
|
|
|
# add "no-zlib" to mkspecs/qconfig.pri
|
|
|
|
# #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
|
|
|
|
#
|
|
|
|
# There's no guarantee that Qt will build under those conditions
|
|
|
|
|
|
|
|
CFG_ZLIB=auto
|
|
|
|
ZLIB_FORCED=yes
|
|
|
|
fi
|
|
|
|
if [ "$CFG_ZLIB" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/zlib "zlib"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_ZLIB=system
|
|
|
|
else
|
|
|
|
CFG_ZLIB=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_LARGEFILE" = "auto" ]; then
|
|
|
|
#Large files should be enabled for all Linux systems
|
|
|
|
CFG_LARGEFILE=yes
|
|
|
|
fi
|
|
|
|
|
2012-03-09 00:22:27 +00:00
|
|
|
if [ "$CFG_GUI" = "no" ]; then
|
|
|
|
QPA_PLATFORM_GUARD=no
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# detect how jpeg should be built
|
|
|
|
if [ "$CFG_JPEG" = "auto" ]; then
|
|
|
|
if [ "$CFG_SHARED" = "yes" ]; then
|
|
|
|
CFG_JPEG=plugin
|
|
|
|
else
|
|
|
|
CFG_JPEG=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
# 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 how gif should be built
|
|
|
|
if [ "$CFG_GIF" = "auto" ]; then
|
|
|
|
if [ "$CFG_SHARED" = "yes" ]; then
|
|
|
|
CFG_GIF=plugin
|
|
|
|
else
|
|
|
|
CFG_GIF=yes
|
|
|
|
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
|
|
|
|
|
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
|
2012-04-16 05:04:33 +00:00
|
|
|
if [ "$CFG_OPENGL" != "es2" ]; then
|
|
|
|
echo "The EGLFS plugin requires OpenGL ES 2 support and cannot be built"
|
|
|
|
exit 101
|
|
|
|
fi
|
|
|
|
CFG_OPENGL="es2"
|
2012-03-07 14:07:07 +00:00
|
|
|
CFG_EGL=yes
|
|
|
|
fi
|
|
|
|
|
2012-07-16 13:13:18 +00:00
|
|
|
if [ "$CFG_KMS" = "yes" ]; then
|
|
|
|
if [ "$CFG_EGL" = "no" ]; then
|
|
|
|
echo "The KMS plugin requires EGL support and cannot be built"
|
|
|
|
exit 101
|
|
|
|
fi
|
|
|
|
if [ "$CFG_OPENGL" != "es2" ]; then
|
|
|
|
echo "The KMS plugin requires OpenGL ES 2 support and cannot be built"
|
|
|
|
exit 101
|
|
|
|
fi
|
|
|
|
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
|
2012-08-24 11:28:36 +00:00
|
|
|
QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null | filterIncludeOptions`
|
|
|
|
QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null | filterLibraryOptions`
|
|
|
|
QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null | filterLibraryOptions`
|
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"
|
|
|
|
QT_LFLAGS_MYSQL=""
|
|
|
|
QT_LFLAGS_MYSQL_R=""
|
|
|
|
QT_CFLAGS_MYSQL=""
|
|
|
|
fi
|
|
|
|
else
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/mysql_r "MySQL (thread-safe)" $QT_LFLAGS_MYSQL_R $QT_CFLAGS_MYSQL; then
|
2011-04-27 10:05:43 +00:00
|
|
|
QMakeVar add CONFIG use_libmysqlclient_r
|
|
|
|
if [ "$CFG_SQL_mysql" = "auto" ]; then
|
|
|
|
CFG_SQL_mysql=plugin
|
|
|
|
fi
|
|
|
|
QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
|
2012-08-12 08:14:59 +00:00
|
|
|
elif compileTest unix/mysql "MySQL (thread-unsafe)" $QT_LFLAGS_MYSQL $QT_CFLAGS_MYSQL; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_SQL_mysql" = "auto" ]; then
|
|
|
|
CFG_SQL_mysql=plugin
|
|
|
|
fi
|
|
|
|
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
|
|
|
|
QT_LFLAGS_MYSQL=""
|
|
|
|
QT_LFLAGS_MYSQL_R=""
|
|
|
|
QT_CFLAGS_MYSQL=""
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
psql)
|
|
|
|
if [ "$CFG_SQL_psql" != "no" ]; then
|
|
|
|
# Be careful not to use native pg_config when cross building.
|
|
|
|
if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
|
2012-08-24 11:28:36 +00:00
|
|
|
QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null | filterIncludePath`
|
|
|
|
QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null | filterLibraryPath`
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
[ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
|
|
|
|
[ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
|
|
|
|
# But, respect PSQL_LIBS if set
|
|
|
|
[ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $QT_CFLAGS_PSQL; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_SQL_psql" = "auto" ]; then
|
|
|
|
CFG_SQL_psql=plugin
|
|
|
|
fi
|
|
|
|
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
|
|
|
|
QT_CFLAGS_PSQL=""
|
|
|
|
QT_LFLAGS_PSQL=""
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
odbc)
|
|
|
|
if [ "$CFG_SQL_odbc" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if ( [ "$BUILD_ON_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && compileTest unix/odbc "ODBC"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_SQL_odbc" = "auto" ]; then
|
|
|
|
CFG_SQL_odbc=plugin
|
|
|
|
fi
|
|
|
|
else
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/iodbc "iODBC"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_LFLAGS_ODBC="-liodbc"
|
|
|
|
if [ "$CFG_SQL_odbc" = "auto" ]; then
|
|
|
|
CFG_SQL_odbc=plugin
|
|
|
|
fi
|
|
|
|
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
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_SQL_oci" = "auto" ]; then
|
|
|
|
CFG_SQL_oci=plugin
|
|
|
|
fi
|
|
|
|
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
|
|
|
|
[ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
|
|
|
|
[ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/tds "TDS" $QT_LFLAGS_TDS; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_SQL_tds" = "auto" ]; then
|
|
|
|
CFG_SQL_tds=plugin
|
|
|
|
fi
|
|
|
|
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
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_SQL_db2" = "auto" ]; then
|
|
|
|
CFG_SQL_db2=plugin
|
|
|
|
fi
|
|
|
|
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
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_SQL_ibase" = "auto" ]; then
|
|
|
|
CFG_SQL_ibase=plugin
|
|
|
|
fi
|
|
|
|
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
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_SQL_sqlite2" = "auto" ]; then
|
|
|
|
CFG_SQL_sqlite2=plugin
|
|
|
|
fi
|
|
|
|
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
|
|
|
|
if [ -n "$PKG_CONFIG" ]; then
|
|
|
|
QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
|
|
|
|
QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
|
2012-07-17 09:52:10 +00:00
|
|
|
else
|
|
|
|
QT_CFLAGS_SQLITE=
|
|
|
|
QT_LFLAGS_SQLITE="-lsqlite3 -lz"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/sqlite "SQLite" $QT_LFLAGS_SQLITE $QT_CFLAGS_SQLITE; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_SQL_sqlite" = "auto" ]; then
|
|
|
|
CFG_SQL_sqlite=plugin
|
|
|
|
fi
|
|
|
|
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
|
|
|
|
if [ "$CFG_SQL_sqlite" = "auto" ]; then
|
|
|
|
CFG_SQL_sqlite=plugin
|
|
|
|
fi
|
|
|
|
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 NIS support
|
|
|
|
if [ "$CFG_NIS" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/nis "NIS"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_NIS=yes
|
|
|
|
else
|
|
|
|
if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "NIS 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_NIS=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# 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
|
|
|
|
if [ "$CFG_DBUS" != "no" ]; then
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
|
|
|
|
QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
|
|
|
|
QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
|
|
|
|
fi
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/dbus "D-Bus" $QT_CFLAGS_DBUS $QT_LIBS_DBUS; then
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
|
|
|
|
QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
|
|
|
|
QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
|
|
|
|
else
|
|
|
|
if [ "$CFG_DBUS" = "auto" ]; then
|
|
|
|
CFG_DBUS=no
|
|
|
|
elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
# CFG_DBUS is "yes" or "linked" here
|
|
|
|
|
|
|
|
echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION 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
|
|
|
|
QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
|
|
|
|
QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/glib "Glib" $QT_CFLAGS_GLIB $QT_LIBS_GLIB; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_GLIB=yes
|
|
|
|
QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
|
|
|
|
QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
|
|
|
|
else
|
|
|
|
if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "Glib 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-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
|
|
|
|
if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
|
|
|
|
if [ -n "$PKG_CONFIG" ]; then
|
|
|
|
QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
|
|
|
|
QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
|
|
|
|
fi
|
|
|
|
if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
|
|
|
|
CFG_QGTKSTYLE=yes
|
|
|
|
QT_CONFIG="$QT_CONFIG gtkstyle"
|
|
|
|
QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
|
|
|
|
QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
|
|
|
|
else
|
|
|
|
if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "Gtk theme support cannot be enabled due to functionality tests!"
|
|
|
|
echo " Turn on verbose messaging (-v) to $0 to see the fin al 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_QGTKSTYLE=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
elif [ "$CFG_GLIB" = "no" ]; then
|
|
|
|
CFG_QGTKSTYLE=no
|
|
|
|
fi
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
# ### Vestige
|
|
|
|
if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
|
|
|
|
if [ -n "$PKG_CONFIG" ]; then
|
|
|
|
QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
|
|
|
|
QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
|
|
|
|
fi
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/gstreamer "GStreamer" $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_GSTREAMER=yes
|
|
|
|
QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
|
|
|
|
QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
|
|
|
|
else
|
|
|
|
if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "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."
|
|
|
|
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
|
|
|
else
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_GSTREAMER=no
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
elif [ "$CFG_GLIB" = "no" ]; then
|
|
|
|
CFG_GSTREAMER=no
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
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
|
|
|
|
QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
|
|
|
|
QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/pulseaudio "PulseAudio" $QT_CFLAGS_PULSEAUDIO $QT_LIBS_PULSEAUDIO; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_PULSEAUDIO=yes
|
|
|
|
QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
|
|
|
|
QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
|
|
|
|
else
|
|
|
|
if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "PulseAudio 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_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
|
2011-08-16 10:53:04 +00:00
|
|
|
# auto-detect OpenGL support (es2 = OpenGL ES 2.x)
|
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
|
2012-08-12 08:14:59 +00:00
|
|
|
elif compileTest unix/opengles2 "OpenGL ES 2.x"; 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
|
|
|
|
case "$PLATFORM" in
|
|
|
|
hpux*)
|
|
|
|
# HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
|
|
|
|
if [ "$CFG_OPENGL" = "desktop" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
compileTest x11/glxfbconfig "OpenGL"
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ $? != "0" ]; then
|
|
|
|
QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
elif [ "$CFG_OPENGL" = "es2" ]; then
|
|
|
|
#OpenGL ES 2.x
|
2012-08-12 08:14:59 +00:00
|
|
|
compileTest unix/opengles2 "OpenGL ES 2.x"
|
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
|
|
|
|
case "$PLATFORM" in
|
|
|
|
hpux*)
|
|
|
|
# HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
|
2012-08-12 08:14:59 +00:00
|
|
|
compileTest x11/glxfbconfig "OpenGL"
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ $? != "0" ]; then
|
|
|
|
QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
fi # X11/MINGW OpenGL
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
|
|
|
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
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
# auto-detect OpenGL support (es2 = OpenGL ES 2.x)
|
|
|
|
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/opengldesktop "OpenGL"; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_OPENGL=desktop
|
2012-08-12 08:14:59 +00:00
|
|
|
elif compileTest unix/opengles2 "OpenGL ES 2.x"; 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
|
|
|
|
#OpenGL ES 2.x
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
|
|
|
|
QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
|
|
|
|
QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
|
|
|
|
QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
|
|
|
|
QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
|
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
|
|
|
QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "`shellArgumentListToQMakeList "$QMAKE_INCDIR_OPENGL_ES2"`"
|
|
|
|
QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "`shellArgumentListToQMakeList "$QMAKE_LIBDIR_OPENGL_ES2"`"
|
|
|
|
QMakeVar set QMAKE_LIBS_OPENGL_ES2 "`shellArgumentListToQMakeList "$QMAKE_LIBS_OPENGL_ES2"`"
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
|
|
|
|
2012-08-12 08:14:59 +00:00
|
|
|
compileTest unix/opengles2 "OpenGL ES 2.x" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2
|
2012-03-26 20:13:58 +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
|
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
|
2012-08-12 08:14:59 +00:00
|
|
|
compileTest unix/opengldesktop "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
|
|
|
|
2011-09-22 11:18:11 +00:00
|
|
|
# auto-detect FontConfig support
|
|
|
|
if [ "$CFG_FONTCONFIG" != "no" ]; then
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
|
|
|
|
QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
|
|
|
|
QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
|
|
|
|
else
|
|
|
|
QT_CFLAGS_FONTCONFIG=
|
|
|
|
QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
|
|
|
|
fi
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/fontconfig "FontConfig" $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
|
2012-03-26 20:13:58 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG fontconfig"
|
|
|
|
QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
|
|
|
|
QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
|
2012-06-04 17:15:57 +00:00
|
|
|
CFG_FONTCONFIG=yes
|
2011-09-22 11:18:11 +00:00
|
|
|
CFG_LIBFREETYPE=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
|
|
|
# Save these for a check later
|
|
|
|
ORIG_CFG_XCB="$CFG_XCB"
|
|
|
|
ORIG_CFG_EGLFS="$CFG_EGLFS"
|
2012-02-28 09:00:32 +00:00
|
|
|
ORIG_CFG_DIRECTFB="$CFG_DIRECTFB"
|
2012-07-02 21:30:41 +00:00
|
|
|
ORIG_CFG_LINUXFB="$CFG_LINUXFB"
|
2012-07-16 13:13:18 +00:00
|
|
|
ORIG_CFG_KMS="$CFG_KMS"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
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`
|
|
|
|
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
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/libudev "libudev" $QMAKE_INCDIR_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!"
|
|
|
|
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
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
# Check we actually have X11 :-)
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest x11/xlib "XLib"; then
|
2012-03-26 20:13:58 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG xlib"
|
|
|
|
fi
|
2012-02-05 11:32:40 +00:00
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
# auto-detect Xrender support
|
|
|
|
if [ "$CFG_XRENDER" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest x11/xrender "Xrender"; then
|
2012-03-26 20:13:58 +00:00
|
|
|
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
|
2012-02-05 11:32:40 +00:00
|
|
|
else
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_XRENDER=no
|
2012-02-05 11:32:40 +00:00
|
|
|
fi
|
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2012-02-05 11:32:40 +00:00
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$CFG_XCB" != "no" ]; then
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
|
2012-08-30 20:25:52 +00:00
|
|
|
QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb xcb-image xcb-keysyms xcb-icccm xcb-sync xcb-xfixes xcb-randr 2>/dev/null`"
|
|
|
|
QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb xcb-image xcb-keysyms xcb-icccm xcb-sync xcb-xfixes xcb-randr 2>/dev/null`"
|
2011-06-09 13:56:55 +00:00
|
|
|
fi
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest qpa/xcb "xcb" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_XCB=yes
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest qpa/xcb-render "xcb-render" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
2012-03-26 20:13:58 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG xcb-render"
|
2012-01-04 13:57:38 +00:00
|
|
|
fi
|
|
|
|
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest qpa/xcb-poll-for-queued-event "xcb-poll-for-queued-event" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_XCB_LIMITED=no
|
|
|
|
QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
|
2012-02-14 15:38:32 +00:00
|
|
|
fi
|
2011-06-10 14:05:03 +00:00
|
|
|
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest qpa/xcb-xlib "xcb-xlib" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
2012-03-26 20:13:58 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG xcb-xlib"
|
|
|
|
fi
|
2011-10-14 13:55:35 +00:00
|
|
|
|
2012-06-05 13:04:02 +00:00
|
|
|
# auto-detect XInput2 support. Needed by xcb too.
|
|
|
|
if [ "$CFG_XINPUT2" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest x11/xinput2 "XInput2"; then
|
2012-06-05 13:04:02 +00:00
|
|
|
CFG_XINPUT2=yes
|
|
|
|
CFG_XINPUT=no
|
|
|
|
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
|
2012-03-26 20:13:58 +00:00
|
|
|
else
|
2012-06-05 13:04:02 +00:00
|
|
|
CFG_XINPUT2=no
|
2011-10-14 13:55:35 +00:00
|
|
|
fi
|
|
|
|
fi
|
2011-06-10 14:05:03 +00:00
|
|
|
fi
|
2011-06-01 09:00:58 +00:00
|
|
|
else
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$CFG_XCB" = "yes" ]; then
|
|
|
|
echo "The XCB test failed!"
|
|
|
|
echo " You might need to install dependency packages."
|
|
|
|
echo " See src/plugins/platforms/xcb/README."
|
2012-03-07 14:07:07 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
CFG_XCB=no
|
2012-03-07 14:07:07 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2012-08-08 07:36:23 +00:00
|
|
|
if [ "$CFG_XCB" = "no" ]; then
|
|
|
|
QMakeVar add DEFINES QT_NO_XCB
|
|
|
|
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!"
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
# Detect libxkbcommon
|
|
|
|
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
|
|
|
|
QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
|
|
|
|
QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
|
|
|
|
QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
|
|
|
|
QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
|
|
|
|
else
|
|
|
|
QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
|
|
|
|
fi
|
|
|
|
|
|
|
|
# EGL Support
|
2012-09-07 14:36:49 +00:00
|
|
|
if [ "$CFG_EGL" != "no" ]; then
|
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"
|
|
|
|
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
|
|
|
|
elif [ "$CFG_EGL" = "yes" ]; then
|
|
|
|
echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
|
|
|
|
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
|
2012-03-07 14:07:07 +00:00
|
|
|
fi
|
2012-03-25 23:22:18 +00:00
|
|
|
elif [ "$CFG_OPENGL" = "desktop" ]; then
|
|
|
|
if [ "$CFG_EGL" = "yes" ]; then
|
|
|
|
echo "EGL support was requested but Qt is being configured for desktop OpenGL."
|
|
|
|
echo "Either disable EGL support or enable OpenGL ES support."
|
|
|
|
exit 101
|
|
|
|
fi
|
|
|
|
CFG_EGL=no
|
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
|
2012-06-07 22:05:19 +00:00
|
|
|
if [ "$CFG_OPENGL" = "es2" ] && [ "$CFG_EVDEV" = "yes" ]; then
|
2012-04-16 05:04:33 +00:00
|
|
|
CFG_EGLFS="$CFG_EGL"
|
|
|
|
else
|
|
|
|
CFG_EGLFS="no"
|
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2011-06-01 09:00:58 +00:00
|
|
|
|
2012-07-16 13:13:18 +00:00
|
|
|
if [ "$CFG_KMS" = "yes" ]; then
|
|
|
|
if [ "$CFG_OPENGL" = "es2" ] && [ "$CFG_EGL" = "yes" ]; then
|
|
|
|
CFG_KMS="yes"
|
|
|
|
else
|
|
|
|
CFG_KMS="no"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-05-10 21:52:05 +00:00
|
|
|
# Detect accessibility support
|
|
|
|
if [ "$CFG_ACCESSIBILITY" != "no" ]; then
|
|
|
|
if [ "$CFG_XCB" = "no" ]; then
|
|
|
|
CFG_ACCESSIBILITY=yes
|
|
|
|
else
|
|
|
|
# linux/xcb accessibility needs dbus and atspi-2
|
|
|
|
if [ "$CFG_DBUS" != "no" ] && [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "atspi-2" 2>/dev/null; then
|
|
|
|
CFG_ACCESSIBILITY=yes
|
|
|
|
else
|
|
|
|
if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
|
|
|
|
CFG_ACCESSIBILITY=no
|
|
|
|
else
|
|
|
|
echo "Accessibility support needs pkg-config and libatspi2."
|
|
|
|
exit 101
|
|
|
|
fi
|
|
|
|
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"
|
|
|
|
elif [ "$BUILD_ON_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"
|
|
|
|
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"
|
|
|
|
QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
|
|
|
|
fi
|
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
|
2012-07-02 21:30:41 +00:00
|
|
|
if [ "$CFG_LINUXFB" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG linuxfb"
|
|
|
|
fi
|
2012-07-16 13:13:18 +00:00
|
|
|
if [ "$CFG_KMS" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG kms"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest mac/coreservices "CoreServices"; then
|
2012-03-26 20:13:58 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG coreservices"
|
|
|
|
else
|
|
|
|
QMakeVar add DEFINES QT_NO_CORESERVICES
|
2011-10-05 03:32:01 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2011-10-05 03:32:01 +00:00
|
|
|
|
2012-04-18 12:21:10 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ]; then
|
2012-07-16 13:13:18 +00:00
|
|
|
if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ] && [ "$CFG_LINUXFB" = "no" ] && [ "$CFG_KMS" = "no" ]; then
|
2012-03-26 20:13:58 +00:00
|
|
|
if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
|
2012-07-16 13:13:18 +00:00
|
|
|
( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] || [ "$ORIG_CFG_LINUXFB" = "auto" ] || [ "$ORIG_CFG_KMS" = "auto" ] ); then
|
2012-03-26 20:13:58 +00:00
|
|
|
echo "No QPA platform plugin enabled!"
|
|
|
|
echo " If you really want to build without a QPA platform plugin you must pass"
|
2012-04-16 06:47:39 +00:00
|
|
|
echo " -no-qpa-platform-guard to configure. Doing this will"
|
|
|
|
echo " produce a Qt that can not run GUI applications."
|
2012-03-26 20:13:58 +00:00
|
|
|
echo " The dependencies needed for xcb to build are listed in"
|
|
|
|
echo " src/plugins/platforms/xcb/README"
|
|
|
|
exit 1
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
# freetype support
|
|
|
|
[ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
|
|
|
|
if [ "$CFG_LIBFREETYPE" = "auto" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/freetype "FreeType"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_LIBFREETYPE=system
|
|
|
|
else
|
|
|
|
CFG_LIBFREETYPE=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# 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
|
|
|
|
if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
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
|
|
|
|
|
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-04-27 10:05:43 +00:00
|
|
|
# detect OpenVG support
|
2011-11-07 09:16:21 +00:00
|
|
|
if [ "$CFG_OPENVG" != "no" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
if compileTest unix/openvg "OpenVG"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_OPENVG" = "auto" ]; then
|
|
|
|
CFG_OPENVG=yes
|
|
|
|
fi
|
2012-08-12 08:14:59 +00:00
|
|
|
elif compileTest unix/openvg "OpenVG" -config openvg_on_opengl; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_OPENVG" = "auto" ]; then
|
|
|
|
CFG_OPENVG=yes
|
|
|
|
fi
|
|
|
|
CFG_OPENVG_ON_OPENGL=yes
|
2012-08-12 08:14:59 +00:00
|
|
|
elif compileTest unix/openvg "OpenVG (lc includes)" -config lower_case_includes; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_OPENVG" = "auto" ]; then
|
|
|
|
CFG_OPENVG=yes
|
|
|
|
fi
|
|
|
|
CFG_OPENVG_LC_INCLUDES=yes
|
2012-08-12 08:14:59 +00:00
|
|
|
elif compileTest unix/openvg "OpenVG (lc includes)" -config "openvg_on_opengl lower_case_includes"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_OPENVG" = "auto" ]; then
|
|
|
|
CFG_OPENVG=yes
|
|
|
|
fi
|
|
|
|
CFG_OPENVG_LC_INCLUDES=yes
|
|
|
|
CFG_OPENVG_ON_OPENGL=yes
|
|
|
|
else
|
|
|
|
if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
|
|
|
echo "$CFG_OPENVG was specified for OpenVG but 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_OPENVG=no
|
|
|
|
fi
|
|
|
|
fi
|
2012-08-12 08:14:59 +00:00
|
|
|
if [ "$CFG_OPENVG" = "yes" ] && compileTest unix/shivavg "ShivaVG"; then
|
2011-04-27 10:05:43 +00:00
|
|
|
CFG_OPENVG_SHIVA=yes
|
|
|
|
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
|
|
|
|
|
|
|
|
if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
|
|
|
|
if [ "$CFG_ARCH" = "arm" ]; then
|
2012-08-12 08:14:59 +00:00
|
|
|
compileTest unix/javascriptcore-jit "javascriptcore-jit"
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ $? != "0" ]; then
|
|
|
|
CFG_JAVASCRIPTCORE_JIT=no
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
case "$XPLATFORM" in
|
|
|
|
linux-icc*)
|
|
|
|
CFG_JAVASCRIPTCORE_JIT=no
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
|
|
|
|
QMakeVar set JAVASCRIPTCORE_JIT yes
|
|
|
|
elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
|
|
|
|
QMakeVar set JAVASCRIPTCORE_JIT no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
|
2011-11-07 09:16:21 +00:00
|
|
|
CFG_AUDIO_BACKEND=yes
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
|
|
|
|
echo "Warning: largefile support cannot be disabled for win32."
|
|
|
|
CFG_LARGEFILE="yes"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# ask for all that hasn't been auto-detected or specified in the arguments
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2012-05-29 05:10:09 +00:00
|
|
|
[ "$CFG_CXX11" = "yes" ] && QT_CONFIG="$QT_CONFIG c++11"
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# enable openvg
|
|
|
|
if [ "$CFG_OPENVG" = "no" ]; then
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
|
|
|
|
else
|
|
|
|
QT_CONFIG="$QT_CONFIG openvg"
|
|
|
|
if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG openvg_on_opengl"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG shivavg"
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# 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
|
2011-04-27 10:05:43 +00:00
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_OPENGL" = "es2" ]; then
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
|
|
|
|
QT_CONFIG="$QT_CONFIG opengles2"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# build up the variables for output
|
|
|
|
if [ "$CFG_DEBUG" = "yes" ]; then
|
|
|
|
QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
|
|
|
|
elif [ "$CFG_DEBUG" = "no" ]; then
|
|
|
|
QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_SHARED" = "yes" ]; then
|
|
|
|
QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
|
2012-05-30 10:09:00 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG shared"
|
2011-04-27 10:05:43 +00:00
|
|
|
elif [ "$CFG_SHARED" = "no" ]; then
|
|
|
|
QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
|
2012-05-30 10:09:00 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG static"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
|
|
|
|
#FIXME: qpa is implicit this should all be removed
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG qpa"
|
|
|
|
QT_CONFIG="$QT_CONFIG qpa"
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
|
|
|
|
rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
if [ "$XPLATFORM_MINGW" != "yes" ]; then
|
|
|
|
# Do not set this here for Windows. Let qmake do it so
|
|
|
|
# debug and release precompiled headers are kept separate.
|
|
|
|
QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
|
|
|
|
fi
|
|
|
|
QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
|
|
|
|
QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
|
|
|
|
QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
|
|
|
|
QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
|
|
|
|
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"
|
|
|
|
[ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
|
|
|
|
[ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
|
|
|
|
if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
|
|
|
|
QMakeVar add QMAKE_CFLAGS -g
|
|
|
|
QMakeVar add QMAKE_CXXFLAGS -g
|
2011-08-15 13:36:08 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG separate_debug_info"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
|
2011-08-15 13:36:08 +00:00
|
|
|
QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
|
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"
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
|
|
|
|
[ "$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
|
|
|
|
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
|
|
|
|
if [ "$CFG_LIBJPEG" = "no" ]; then
|
|
|
|
CFG_JPEG="no"
|
|
|
|
elif [ "$CFG_LIBJPEG" = "system" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG system-jpeg"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_JPEG" = "no" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG no-jpeg"
|
|
|
|
elif [ "$CFG_JPEG" = "yes" ]; then
|
|
|
|
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
|
|
|
|
if [ "$CFG_PNG" = "no" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG no-png"
|
|
|
|
elif [ "$CFG_PNG" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG png"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_GIF" = "no" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG no-gif"
|
|
|
|
elif [ "$CFG_GIF" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG gif"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_LIBFREETYPE" = "no" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG no-freetype"
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
|
|
|
|
elif [ "$CFG_LIBFREETYPE" = "system" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG system-freetype"
|
|
|
|
else
|
|
|
|
QT_CONFIG="$QT_CONFIG freetype"
|
|
|
|
fi
|
|
|
|
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
|
|
|
|
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
#On Mac we implicitly link against libz, so we
|
|
|
|
#never use the 3rdparty stuff.
|
|
|
|
[ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_ZLIB" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG zlib"
|
|
|
|
elif [ "$CFG_ZLIB" = "system" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG system-zlib"
|
|
|
|
fi
|
|
|
|
|
|
|
|
[ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
|
|
|
|
[ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
|
|
|
|
[ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
|
|
|
|
[ "$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"
|
|
|
|
[ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
|
|
|
|
[ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
|
|
|
|
[ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
|
|
|
|
[ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
|
|
|
|
[ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
|
2011-04-18 15:08:30 +00:00
|
|
|
[ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
|
2011-05-18 14:35:04 +00:00
|
|
|
[ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
|
2011-10-14 13:55:35 +00:00
|
|
|
[ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-05-30 23:44:53 +00:00
|
|
|
[ '!' -z "$DEFINES" ] && QMakeVar add DEFINES "$DEFINES"
|
2012-08-11 19:55:20 +00:00
|
|
|
[ '!' -z "$L_FLAGS" ] && QMakeVar add LIBS "$L_FLAGS"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-03-12 19:51:52 +00:00
|
|
|
if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_RPATH" = "yes" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
|
|
|
|
fi
|
2012-01-31 11:49:53 +00:00
|
|
|
elif [ -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
|
|
|
|
QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
|
|
|
|
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
|
|
|
|
|
|
|
if [ '!' -z "$I_FLAGS" ]; then
|
|
|
|
# add the user define include paths
|
|
|
|
QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
|
|
|
|
QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
|
|
|
|
fi
|
|
|
|
|
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"
|
|
|
|
QMakeVar add QMAKE_OBJECTIVE_CFLAGS_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
|
|
|
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
#
|
|
|
|
# Some Qt modules are too advanced in C++ for some old compilers
|
|
|
|
# Detect here the platforms where they are known to work.
|
|
|
|
#
|
|
|
|
# See Qt documentation for more information on which features are
|
|
|
|
# supported and on which compilers.
|
|
|
|
#
|
|
|
|
canBuildQtConcurrent="yes"
|
2011-11-18 08:48:54 +00:00
|
|
|
canUseV8Snapshot="yes"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
case "$XPLATFORM" in
|
|
|
|
hpux-g++*)
|
|
|
|
# PA-RISC's assembly is too limited
|
|
|
|
# gcc 3.4 on that platform can't build QtXmlPatterns
|
|
|
|
# the assembly it generates cannot be compiled
|
|
|
|
|
|
|
|
# Check gcc's version
|
|
|
|
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
|
|
|
|
4*)
|
|
|
|
;;
|
|
|
|
3.4*)
|
|
|
|
canBuildQtXmlPatterns="no"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
canBuildWebKit="no"
|
|
|
|
canBuildQtXmlPatterns="no"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
unsupported/vxworks-*-g++*)
|
|
|
|
canBuildWebKit="no"
|
|
|
|
;;
|
|
|
|
unsupported/vxworks-*-dcc*)
|
|
|
|
canBuildWebKit="no"
|
|
|
|
canBuildQtXmlPatterns="no"
|
|
|
|
;;
|
|
|
|
*-g++*)
|
|
|
|
# Check gcc's version
|
|
|
|
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
|
|
|
|
4*|3.4*)
|
|
|
|
;;
|
|
|
|
3.3*)
|
|
|
|
canBuildWebKit="no"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
canBuildWebKit="no"
|
|
|
|
canBuildQtXmlPatterns="no"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
solaris-cc*)
|
|
|
|
# Check the compiler version
|
|
|
|
case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
|
|
|
|
5.[012345678])
|
|
|
|
canBuildWebKit="no"
|
|
|
|
canBuildQtXmlPatterns="no"
|
|
|
|
canBuildQtConcurrent="no"
|
|
|
|
;;
|
|
|
|
5.*)
|
|
|
|
canBuildWebKit="no"
|
|
|
|
canBuildQtConcurrent="no"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
hpux-acc*)
|
|
|
|
canBuildWebKit="no"
|
|
|
|
canBuildQtXmlPatterns="no"
|
|
|
|
canBuildQtConcurrent="no"
|
|
|
|
;;
|
|
|
|
hpuxi-acc*)
|
|
|
|
canBuildWebKit="no"
|
|
|
|
;;
|
|
|
|
aix-xlc*)
|
|
|
|
# Get the xlC version
|
|
|
|
cat > xlcver.c <<EOF
|
|
|
|
#include <stdio.h>
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
xlcver=
|
|
|
|
if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
|
|
|
|
xlcver=`./xlcver 2>/dev/null`
|
|
|
|
rm -f ./xlcver
|
|
|
|
fi
|
|
|
|
if [ "$OPT_VERBOSE" = "yes" ]; then
|
|
|
|
if [ -n "$xlcver" ]; then
|
|
|
|
echo Found IBM xlC version: $xlcver.
|
|
|
|
else
|
|
|
|
echo Could not determine IBM xlC version, assuming oldest supported.
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
case "$xlcver" in
|
|
|
|
[123456].*)
|
|
|
|
canBuildWebKit="no"
|
|
|
|
canBuildQtXmlPatterns="no"
|
|
|
|
canBuildQtConcurrent="no"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
canBuildWebKit="no"
|
|
|
|
canBuildQtConcurrent="no"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
irix-cc*)
|
|
|
|
canBuildWebKit="no"
|
|
|
|
canBuildQtConcurrent="no"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [ "$CFG_GUI" = "no" ]; then
|
|
|
|
# WebKit requires QtGui
|
|
|
|
canBuildWebKit="no"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_SHARED" = "no" ]; then
|
|
|
|
echo
|
|
|
|
echo "WARNING: Using static linking will disable the WebKit module."
|
|
|
|
echo
|
|
|
|
canBuildWebKit="no"
|
|
|
|
fi
|
|
|
|
|
|
|
|
CFG_CONCURRENT="yes"
|
|
|
|
if [ "$canBuildQtConcurrent" = "no" ]; then
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
|
|
|
|
CFG_CONCURRENT="no"
|
2011-10-11 04:15:52 +00:00
|
|
|
else
|
|
|
|
QT_CONFIG="$QT_CONFIG concurrent"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2012-01-26 17:43:06 +00:00
|
|
|
# ### Vestige
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG audio-backend"
|
|
|
|
fi
|
|
|
|
|
2012-01-26 17:43:06 +00:00
|
|
|
# ### Vestige
|
|
|
|
if [ "$CFG_WEBKIT" = "debug" ]; then
|
|
|
|
QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
2012-01-26 17:43:06 +00:00
|
|
|
# ### Vestige
|
|
|
|
QT_CONFIG="$QT_CONFIG v8"
|
|
|
|
# Detect snapshot support
|
|
|
|
if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
|
|
|
|
case "$CFG_HOST_ARCH,$CFG_ARCH" in
|
|
|
|
i386,arm)
|
|
|
|
;;
|
|
|
|
*) canUseV8Snapshot="no"
|
|
|
|
;;
|
|
|
|
esac
|
2011-04-27 10:05:43 +00:00
|
|
|
else
|
2012-01-26 18:50:15 +00:00
|
|
|
if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
|
2012-01-26 17:43:06 +00:00
|
|
|
# QEMU crashes when building inside Scratchbox with an ARM target
|
|
|
|
canUseV8Snapshot="no"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
2012-01-26 17:43:06 +00:00
|
|
|
if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
|
|
|
|
CFG_V8SNAPSHOT="$canUseV8Snapshot"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-01-26 17:43:06 +00:00
|
|
|
if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
|
|
|
|
echo "Error: V8 snapshot was requested, but is not supported on this platform."
|
configure should detect whether v8 can be built
First of all, the -v8 option was missing from the set
of "Qt style yes options", so it wasn't even recognized.
Second, when the value is "auto" (the default), v8
should only be enabled if we are building for a supported
architecture. Currently that's i386, x86_64, and arm.
(When cross-compiling, CFG_ARCH will contain the target
architecture, which is what we want to check.)
Third, if -v8 is passed but the architecture isn't
supported, configure should issue an error.
Change-Id: I579597bc0d81c3097ee96a29493f5f8112be7edd
Reviewed-on: http://codereview.qt.nokia.com/4193
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-09-05 10:47:17 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2012-01-26 17:43:06 +00:00
|
|
|
if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
|
|
|
|
QT_CONFIG="$QT_CONFIG v8snapshot"
|
2011-08-16 08:50:00 +00:00
|
|
|
fi
|
|
|
|
|
2012-01-26 17:43:06 +00:00
|
|
|
# ### Vestige
|
2012-03-30 11:43:10 +00:00
|
|
|
if [ "$CFG_QML_DEBUG" = "no" ]; then
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
|
2011-05-09 05:34:25 +00:00
|
|
|
fi
|
|
|
|
|
2012-05-21 12:17:43 +00:00
|
|
|
case "$QMAKE_CONF_COMPILER" in
|
|
|
|
*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
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
#
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# part of configuration information goes into qconfig.h
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
case "$CFG_QCONFIG" in
|
|
|
|
full)
|
|
|
|
echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
|
|
|
|
if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
|
|
|
|
cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
|
|
|
|
elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
|
|
|
|
cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
|
|
|
|
fi
|
|
|
|
echo "#endif" >>"$tmpconfig"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
|
|
|
|
|
|
|
|
/* Qt Edition */
|
|
|
|
#ifndef QT_EDITION
|
|
|
|
# define QT_EDITION $QT_EDITION
|
|
|
|
#endif
|
|
|
|
EOF
|
|
|
|
|
|
|
|
echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
[ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
|
2012-05-30 10:09:00 +00:00
|
|
|
if [ "$CFG_SHARED" = "no" ]; then
|
|
|
|
cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
|
|
|
|
/* 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
|
|
|
|
echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_FRAMEWORK" = "yes" ]; then
|
|
|
|
echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
fi
|
|
|
|
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
|
|
|
|
#if defined(__LP64__)
|
|
|
|
# define QT_POINTER_SIZE 8
|
|
|
|
#else
|
|
|
|
# define QT_POINTER_SIZE 4
|
|
|
|
#endif
|
|
|
|
EOF
|
|
|
|
else
|
|
|
|
"$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
|
|
|
|
echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
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
|
|
|
|
echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
fi
|
|
|
|
|
2012-08-11 20:55:04 +00:00
|
|
|
# Add compiler sub-architecture support
|
|
|
|
echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
echo "// Compiler sub-arch support" >>"$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
for SUBARCH in SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2 \
|
|
|
|
IWMMXT NEON \
|
|
|
|
MIPS_DSP MIPS_DSPR2; do
|
|
|
|
eval "VAL=\$CFG_$SUBARCH"
|
|
|
|
case "$VAL" in
|
|
|
|
yes)
|
|
|
|
echo "#define QT_COMPILER_SUPPORTS_$SUBARCH" \
|
|
|
|
>>"$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
|
|
|
|
if [ "$CFG_DEV" = "yes" ]; then
|
|
|
|
echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
fi
|
|
|
|
|
2012-03-26 20:13:58 +00:00
|
|
|
# Add QPA to config.h
|
2012-07-26 07:51:15 +00:00
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
|
|
|
|
QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Add turned on SQL drivers
|
|
|
|
for DRIVER in $CFG_SQL_AVAILABLE; do
|
|
|
|
eval "VAL=\$CFG_SQL_$DRIVER"
|
|
|
|
case "$VAL" in
|
|
|
|
qt)
|
|
|
|
ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
|
|
|
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
|
|
|
|
SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
|
|
|
|
;;
|
|
|
|
plugin)
|
|
|
|
SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
QMakeVar set sql-drivers "$SQL_DRIVERS"
|
|
|
|
QMakeVar set sql-plugins "$SQL_PLUGINS"
|
|
|
|
|
|
|
|
# Add other configuration options to the qconfig.h file
|
|
|
|
[ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
|
|
|
|
[ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
|
|
|
|
[ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
|
|
|
|
[ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
|
|
|
|
[ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
|
|
|
|
|
|
|
|
# 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"
|
|
|
|
[ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
|
|
|
|
[ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
|
|
|
|
[ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
|
|
|
|
[ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
|
|
|
|
[ "$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"
|
|
|
|
[ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
|
2012-01-03 14:08:03 +00:00
|
|
|
[ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
|
|
|
|
|
|
|
|
[ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
|
|
|
|
[ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
|
|
|
|
[ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
|
|
|
|
[ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
|
|
|
|
[ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
|
|
|
|
[ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
|
|
|
|
[ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
|
|
|
|
[ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
|
|
|
|
[ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
|
|
|
|
[ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
|
|
|
|
[ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
|
|
|
|
[ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
|
|
|
|
[ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
|
|
|
|
|
|
|
|
[ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
|
|
|
|
[ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
|
|
|
|
[ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
|
|
|
|
[ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
|
|
|
|
[ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
|
|
|
|
[ "$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
|
|
|
|
cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
|
|
|
|
#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
|
|
|
|
cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
|
|
|
|
elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
|
|
|
|
# QT_option can be forcefully turned off by QT_NO_option
|
|
|
|
cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z $cfgdNeg ]; then
|
|
|
|
cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
|
|
|
|
#ifndef $cfgd
|
|
|
|
# define $cfg
|
|
|
|
#endif
|
|
|
|
|
|
|
|
EOF
|
|
|
|
else
|
|
|
|
cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
|
|
|
|
#if defined($cfgd) && defined($cfgdNeg)
|
|
|
|
# undef $cfgd
|
|
|
|
#elif !defined($cfgd) && !defined($cfgdNeg)
|
|
|
|
# define $cfg
|
|
|
|
#endif
|
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
|
|
|
|
#endif // QT_BOOTSTRAPPED
|
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
|
|
|
|
cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
|
|
|
|
#define QT_VISIBILITY_AVAILABLE
|
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$QT_LIBINFIX" ]; then
|
|
|
|
cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
|
|
|
|
#define QT_LIBINFIX "$QT_LIBINFIX"
|
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2012-04-18 22:57:00 +00:00
|
|
|
echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\"" >>"$outpath/src/corelib/global/qconfig.h.new"
|
|
|
|
|
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
|
|
|
|
[ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
|
|
|
|
mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
|
|
|
|
chmod -w "$outpath/src/corelib/global/qconfig.h"
|
2012-02-28 05:02:01 +00:00
|
|
|
if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
|
|
|
|
ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
|
|
|
|
fi
|
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
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
QTCONFIG="$outpath/mkspecs/qconfig.pri"
|
|
|
|
QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
|
|
|
|
[ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
|
|
|
|
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"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cat >>"$QTCONFIG.tmp" <<EOF
|
|
|
|
#configuration
|
|
|
|
CONFIG += $QTCONFIG_CONFIG
|
|
|
|
QT_ARCH = $CFG_ARCH
|
2012-02-14 09:01:17 +00:00
|
|
|
QT_HOST_ARCH = $CFG_HOST_ARCH
|
2011-12-31 22:40:49 +00:00
|
|
|
QT_CPU_FEATURES = $CFG_CPUFEATURES
|
|
|
|
QT_HOST_CPU_FEATURES = $CFG_HOST_CPUFEATURES
|
2012-08-14 20:09:33 +00:00
|
|
|
QMAKE_DEFAULT_LIBDIRS = `echo "$DEFAULT_LIBDIRS" | sed 's,^,",;s,$,",' | tr '\n' ' '`
|
|
|
|
QMAKE_DEFAULT_INCDIRS = `echo "$DEFAULT_INCDIRS" | sed 's,^,",;s,$,",' | tr '\n' ' '`
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_EDITION = $Edition
|
|
|
|
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
|
|
|
|
|
|
|
|
EOF
|
2012-05-12 00:54:30 +00:00
|
|
|
|
|
|
|
if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then
|
|
|
|
echo "# pkgconfig" >> "$QTCONFIG.tmp"
|
|
|
|
echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" >> "$QTCONFIG.tmp"
|
|
|
|
echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR" >> "$QTCONFIG.tmp"
|
2012-05-30 05:15:38 +00:00
|
|
|
echo >> "$QTCONFIG.tmp"
|
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
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "# sysroot" >>"$QTCONFIG.tmp"
|
2012-07-03 14:19:28 +00:00
|
|
|
echo "!host_build {" >>"$QTCONFIG.tmp"
|
2012-02-28 19:57:38 +00:00
|
|
|
echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
|
|
|
|
echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
|
|
|
|
echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "}" >> "$QTCONFIG.tmp"
|
|
|
|
echo >> "$QTCONFIG.tmp"
|
|
|
|
fi
|
2012-03-16 14:14:53 +00:00
|
|
|
if [ -n "$RPATH_FLAGS" ]; then
|
|
|
|
echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
|
|
|
|
echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
|
|
|
|
echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
|
|
|
|
echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
|
2011-05-11 10:32:46 +00:00
|
|
|
echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
|
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
|
|
|
echo "QMAKE_INCDIR_OPENGL_ES2 = `shellArgumentListToQMakeList "$QMAKE_INCDIR_OPENGL_ES2"`" >> "$QTCONFIG.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# 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
|
|
|
#-------------------------------------------------------------------------------
|
2010-11-11 15:35:09 +00:00
|
|
|
QTMODULE="$outpath/mkspecs/qmodule.pri"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-05-30 12:44:39 +00:00
|
|
|
echo "CONFIG += $QMAKE_CONFIG create_prl link_prl" >> "$QTMODULE.tmp"
|
2012-07-06 17:39:26 +00:00
|
|
|
echo "QT_BUILD_PARTS += $CFG_BUILD_PARTS" >> "$QTMODULE.tmp"
|
2011-12-14 01:33:15 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ -n "$QT_CFLAGS_PSQL" ]; then
|
2010-11-11 15:35:09 +00:00
|
|
|
echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
if [ -n "$QT_LFLAGS_PSQL" ]; then
|
2010-11-11 15:35:09 +00:00
|
|
|
echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
if [ -n "$QT_CFLAGS_MYSQL" ]; then
|
2010-11-11 15:35:09 +00:00
|
|
|
echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
if [ -n "$QT_LFLAGS_MYSQL" ]; then
|
2010-11-11 15:35:09 +00:00
|
|
|
echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
if [ -n "$QT_CFLAGS_SQLITE" ]; then
|
2010-11-11 15:35:09 +00:00
|
|
|
echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
if [ -n "$QT_LFLAGS_SQLITE" ]; then
|
2010-11-11 15:35:09 +00:00
|
|
|
echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
if [ -n "$QT_LFLAGS_ODBC" ]; then
|
2010-11-11 15:35:09 +00:00
|
|
|
echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
if [ -n "$QT_LFLAGS_TDS" ]; then
|
2010-11-11 15:35:09 +00:00
|
|
|
echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
|
2010-11-11 15:35:09 +00:00
|
|
|
echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#dump in the OPENSSL_LIBS info
|
|
|
|
if [ '!' -z "$OPENSSL_LIBS" ]; then
|
2010-11-11 15:35:09 +00:00
|
|
|
echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
elif [ "$CFG_OPENSSL" = "linked" ]; then
|
2010-11-11 15:35:09 +00:00
|
|
|
echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#dump in the SDK info
|
|
|
|
if [ '!' -z "$CFG_SDK" ]; then
|
2010-11-11 15:35:09 +00:00
|
|
|
echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# cmdline args
|
2010-11-11 15:35:09 +00:00
|
|
|
cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
|
2011-04-27 10:05:43 +00:00
|
|
|
rm -f "$QMAKE_VARS_FILE" 2>/dev/null
|
|
|
|
|
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
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# save configuration into .qmake.cache
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
CACHEFILE="$outpath/.qmake.cache"
|
|
|
|
[ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
|
|
|
|
cat >>"$CACHEFILE.tmp" <<EOF
|
2011-05-27 13:36:22 +00:00
|
|
|
#paths
|
|
|
|
QT_SOURCE_TREE = \$\$quote($relpath)
|
|
|
|
QT_BUILD_TREE = \$\$quote($outpath)
|
|
|
|
|
2010-11-11 15:35:09 +00:00
|
|
|
include(\$\$PWD/mkspecs/qmodule.pri)
|
2012-09-03 09:31:55 +00:00
|
|
|
CONFIG += dylib fix_output_dirs no_private_qt_headers_warning QTDIR_build
|
2010-11-11 15:35:09 +00:00
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
# replace .qmake.cache if it differs from the newly created temp file
|
|
|
|
if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
|
|
|
|
rm -f "$CACHEFILE.tmp"
|
|
|
|
else
|
|
|
|
mv -f "$CACHEFILE.tmp" "$CACHEFILE"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# give feedback on configuration
|
|
|
|
#-------------------------------------------------------------------------------
|
2012-04-06 08:05:45 +00:00
|
|
|
exec 3>&1 1>$outpath/config.summary # redirect output temporarily to config.summary
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
echo
|
|
|
|
if [ "$XPLATFORM" = "$PLATFORM" ]; then
|
|
|
|
echo "Build type: $PLATFORM"
|
|
|
|
else
|
|
|
|
echo "Building on: $PLATFORM"
|
|
|
|
echo "Building for: $XPLATFORM"
|
|
|
|
fi
|
|
|
|
|
2011-12-31 22:40:49 +00:00
|
|
|
# the missing space before $CFG_FEATURES is intentional
|
|
|
|
echo "Architecture: $CFG_ARCH, features:$CFG_CPUFEATURES"
|
|
|
|
echo "Host architecture: $CFG_HOST_ARCH, features:$CFG_HOST_CPUFEATURES"
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
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' ' '
|
|
|
|
echo "qmake switches ......... $QMAKE_SWITCHES"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Build .................. $CFG_BUILD_PARTS"
|
|
|
|
echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
|
|
|
|
if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
|
|
|
|
echo "Debug .................. yes (combined)"
|
|
|
|
if [ "$CFG_DEBUG" = "yes" ]; then
|
|
|
|
echo "Default Link ........... debug"
|
|
|
|
else
|
|
|
|
echo "Default Link ........... release"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "Debug .................. $CFG_DEBUG"
|
|
|
|
fi
|
2012-08-07 20:22:38 +00:00
|
|
|
if [ "$CFG_RELEASE" = "yes" ] || [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
|
|
|
|
echo "Force debug info ....... $CFG_FORCEDEBUGINFO"
|
|
|
|
fi
|
2012-05-29 05:10:09 +00:00
|
|
|
echo "C++11 support .......... $CFG_CXX11"
|
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
|
|
|
if [ -n "$PKG_CONFIG" ]; then
|
|
|
|
echo "pkg-config ............. yes"
|
|
|
|
else
|
|
|
|
echo "pkg-config ............. no"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
|
|
|
|
[ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
|
|
|
|
[ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
|
|
|
|
echo "QtConcurrent code ...... $CFG_CONCURRENT"
|
|
|
|
echo "QtGui module ........... $CFG_GUI"
|
2012-03-07 00:11:44 +00:00
|
|
|
echo "QtWidgets module ....... $CFG_WIDGETS"
|
2012-01-26 17:43:06 +00:00
|
|
|
if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
|
|
|
|
echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
|
|
|
|
else
|
|
|
|
echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
|
2011-04-27 10:05:43 +00:00
|
|
|
fi
|
2012-03-30 11:43:10 +00:00
|
|
|
echo "QML debugging .......... $CFG_QML_DEBUG"
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "PCH support ............ $CFG_PRECOMPILE"
|
2012-02-14 09:01:17 +00:00
|
|
|
if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
|
2011-12-29 21:24:54 +00:00
|
|
|
echo "SSE2/SSE3/SSSE3......... ${CFG_SSE2}/${CFG_SSE3}/${CFG_SSSE3}"
|
|
|
|
echo "SSE4.1/SSE4.2........... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
|
2011-12-30 00:44:16 +00:00
|
|
|
echo "AVX/AVX2................ ${CFG_AVX}/${CFG_AVX2}"
|
2012-02-14 09:01:17 +00:00
|
|
|
elif [ "$CFG_ARCH" = "arm" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "iWMMXt support ......... ${CFG_IWMMXT}"
|
|
|
|
echo "NEON support ........... ${CFG_NEON}"
|
|
|
|
fi
|
2012-03-02 16:43:52 +00:00
|
|
|
if [ "$CFG_ARCH" = "mips" ]; then
|
|
|
|
echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
|
|
|
|
echo "getaddrinfo support .... $CFG_GETADDRINFO"
|
|
|
|
echo "getifaddrs support ..... $CFG_GETIFADDRS"
|
|
|
|
echo "Accessibility .......... $CFG_ACCESSIBILITY"
|
|
|
|
echo "NIS support ............ $CFG_NIS"
|
|
|
|
echo "CUPS support ........... $CFG_CUPS"
|
|
|
|
echo "Iconv support .......... $CFG_ICONV"
|
|
|
|
echo "Glib support ........... $CFG_GLIB"
|
|
|
|
echo "GStreamer support ...... $CFG_GSTREAMER"
|
|
|
|
echo "PulseAudio support ..... $CFG_PULSEAUDIO"
|
|
|
|
echo "Large File support ..... $CFG_LARGEFILE"
|
|
|
|
echo "GIF support ............ $CFG_GIF"
|
|
|
|
if [ "$CFG_JPEG" = "no" ]; then
|
|
|
|
echo "JPEG support ........... $CFG_JPEG"
|
|
|
|
else
|
|
|
|
echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
|
|
|
|
fi
|
|
|
|
if [ "$CFG_PNG" = "no" ]; then
|
|
|
|
echo "PNG support ............ $CFG_PNG"
|
|
|
|
else
|
|
|
|
echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
|
|
|
|
fi
|
|
|
|
echo "zlib support ........... $CFG_ZLIB"
|
|
|
|
echo "Session management ..... $CFG_SM"
|
2012-03-02 04:58:33 +00:00
|
|
|
echo "libudev support ........ $CFG_LIBUDEV"
|
2012-02-23 19:33:48 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_OPENGL" = "desktop" ]; then
|
|
|
|
echo "OpenGL support ......... yes (Desktop OpenGL)"
|
|
|
|
elif [ "$CFG_OPENGL" = "es2" ]; then
|
|
|
|
echo "OpenGL support ......... yes (OpenGL ES 2.x)"
|
|
|
|
else
|
|
|
|
echo "OpenGL support ......... no"
|
|
|
|
fi
|
2012-03-07 14:07:07 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
if [ "$CFG_OPENVG" ]; then
|
|
|
|
if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
|
|
|
|
echo "OpenVG support ......... ShivaVG"
|
|
|
|
else
|
|
|
|
echo "OpenVG support ......... $CFG_OPENVG"
|
|
|
|
fi
|
|
|
|
fi
|
2012-03-26 20:13:58 +00:00
|
|
|
|
|
|
|
echo "XShape support ......... $CFG_XSHAPE"
|
|
|
|
echo "XVideo support ......... $CFG_XVIDEO"
|
|
|
|
echo "XSync support .......... $CFG_XSYNC"
|
|
|
|
echo "Xinerama support ....... $CFG_XINERAMA"
|
|
|
|
echo "Xcursor support ........ $CFG_XCURSOR"
|
|
|
|
echo "Xfixes support ......... $CFG_XFIXES"
|
|
|
|
echo "Xrandr support ......... $CFG_XRANDR"
|
|
|
|
echo "Xi support ............. $CFG_XINPUT"
|
2012-06-05 13:04:02 +00:00
|
|
|
echo "Xi2 support ............ $CFG_XINPUT2"
|
2012-03-26 20:13:58 +00:00
|
|
|
echo "MIT-SHM support ........ $CFG_MITSHM"
|
|
|
|
echo "FontConfig support ..... $CFG_FONTCONFIG"
|
|
|
|
echo "XKB Support ............ $CFG_XKB"
|
|
|
|
echo "immodule support ....... $CFG_IM"
|
|
|
|
echo "GTK theme support ...... $CFG_QGTKSTYLE"
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
[ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
|
|
|
|
[ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
|
|
|
|
[ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
|
|
|
|
[ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
|
|
|
|
[ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
|
|
|
|
[ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
|
|
|
|
[ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
|
|
|
|
[ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
|
|
|
|
[ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
|
|
|
|
|
|
|
|
OPENSSL_LINKAGE=""
|
|
|
|
if [ "$CFG_OPENSSL" = "yes" ]; then
|
|
|
|
OPENSSL_LINKAGE="(run-time)"
|
|
|
|
elif [ "$CFG_OPENSSL" = "linked" ]; then
|
|
|
|
OPENSSL_LINKAGE="(linked)"
|
|
|
|
fi
|
|
|
|
echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
|
|
|
|
echo "Alsa support ........... $CFG_ALSA"
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "CoreWlan support ....... $CFG_COREWLAN"
|
|
|
|
fi
|
|
|
|
echo "libICU support ......... $CFG_ICU"
|
2012-01-23 22:31:13 +00:00
|
|
|
echo "PCRE support ........... $CFG_PCRE"
|
2011-08-25 11:39:07 +00:00
|
|
|
if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
|
|
|
|
echo "Xcb support ............ limited (old version)"
|
|
|
|
else
|
|
|
|
echo "Xcb support ............ $CFG_XCB"
|
|
|
|
fi
|
2012-01-04 13:57:38 +00:00
|
|
|
echo "Xrender support ........ $CFG_XRENDER"
|
2011-10-14 13:55:35 +00:00
|
|
|
if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
|
|
|
|
echo "XInput2 support ........ $CFG_XINPUT2"
|
|
|
|
fi
|
2012-03-07 14:07:07 +00:00
|
|
|
echo "EGLFS support .......... $CFG_EGLFS"
|
2012-02-28 09:00:32 +00:00
|
|
|
echo "DirectFB support ....... $CFG_DIRECTFB"
|
2012-07-02 21:30:41 +00:00
|
|
|
echo "LinuxFB support ........ $CFG_LINUXFB"
|
2012-07-16 13:13:18 +00:00
|
|
|
echo "KMS support ............ $CFG_KMS"
|
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."
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
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"
|
|
|
|
echo
|
|
|
|
fi
|
2012-04-06 08:05:45 +00:00
|
|
|
|
|
|
|
exec 1>&3 3>&- # restore stdout
|
|
|
|
cat $outpath/config.summary # display config feedback to user
|
|
|
|
|
2012-01-03 19:54:57 +00:00
|
|
|
if [ "$BUILD_ON_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=""
|
|
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# build makefiles based on the configuration
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2012-08-02 13:37:50 +00:00
|
|
|
if [ "$CFG_PROCESS" != "no" ]; then
|
|
|
|
|
|
|
|
if [ "$CFG_PROCESS" = "full" ]; then
|
|
|
|
echo "Creating makefiles. Please wait..."
|
|
|
|
"$outpath/bin/qmake" -r "$relpath"
|
|
|
|
echo "Done"
|
|
|
|
else
|
|
|
|
"$outpath/bin/qmake" "$relpath"
|
|
|
|
fi
|
2012-02-24 13:35:56 +00:00
|
|
|
|
|
|
|
if [ "$OPT_FAST" = "yes" ]; then
|
|
|
|
PART_ROOTS=
|
|
|
|
for part in $CFG_BUILD_PARTS; do
|
|
|
|
case "$part" in
|
|
|
|
examples|tests) PART_ROOTS="$PART_ROOTS $part" ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
if [ "x$PART_ROOTS" != "x" ]; then
|
|
|
|
echo
|
|
|
|
echo "Creating stub makefiles. Please wait..."
|
|
|
|
QMAKE="$outpath/bin/qmake"
|
|
|
|
[ "$CFG_DEBUG_RELEASE" = "no" ] && first_tgt="first_target: first" || first_tgt=
|
|
|
|
(cd "$relpath" && find $PART_ROOTS -name '*.pro') | grep -v /testdata/ | while read p; do
|
|
|
|
d=${p%/*}
|
|
|
|
test -f "$outpath/$d/Makefile" && continue
|
|
|
|
echo " for $relpath/$p"
|
|
|
|
|
|
|
|
mkdir -p "$outpath/$d" || exit
|
|
|
|
cat > "$outpath/$d/Makefile" <<EOF || exit
|
|
|
|
# $outpath/$d/Makefile: generated by configure
|
2011-04-27 10:05:43 +00:00
|
|
|
#
|
|
|
|
# WARNING: This makefile will be replaced with a real makefile.
|
|
|
|
# All changes made to this file will be lost.
|
|
|
|
|
|
|
|
QMAKE = "$QMAKE"
|
2012-02-24 13:35:56 +00:00
|
|
|
|
|
|
|
$first_tgt
|
2011-04-27 10:05:43 +00:00
|
|
|
all clean install qmake first Makefile: FORCE
|
2012-02-24 13:35:56 +00:00
|
|
|
\$(QMAKE) $QMAKE_SWITCHES "$relpath/$p"
|
2011-04-27 10:05:43 +00:00
|
|
|
\$(MAKE) \$@
|
|
|
|
FORCE:
|
|
|
|
EOF
|
2012-02-24 13:35:56 +00:00
|
|
|
done || exit
|
|
|
|
echo "Done"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# check for platforms that we don't yet know about
|
|
|
|
#-------------------------------------------------------------------------------
|
2012-02-14 09:01:17 +00:00
|
|
|
if [ "$CFG_ARCH" = "unknown" ]; then
|
2011-04-27 10:05:43 +00:00
|
|
|
cat <<EOF
|
|
|
|
|
2012-02-14 09:01:17 +00:00
|
|
|
NOTICE: configure was unable to determine the architecture
|
|
|
|
for the $XQMAKESPEC target.
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2012-02-14 09:01:17 +00:00
|
|
|
Qt will not use a specialized implementation for any atomic
|
|
|
|
operations. Instead a generic implemention based on either GCC
|
|
|
|
intrinsics or C++11 std::atomic<T> will be used (when
|
|
|
|
available). The generic implementations are generally as fast
|
|
|
|
as and always as safe as a specialized implementation.
|
|
|
|
|
|
|
|
If no generic implementation is available, Qt will use a
|
|
|
|
fallback UNIX implementation which uses a single
|
|
|
|
pthread_mutex_t to protect all atomic operations. This
|
2011-04-27 10:05:43 +00:00
|
|
|
implementation is the slow (but safe) fallback implementation
|
|
|
|
for architectures Qt does not yet support.
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# check if the user passed the -no-zlib option, which is no longer supported
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
if [ -n "$ZLIB_FORCED" ]; then
|
|
|
|
which_zlib="supplied"
|
|
|
|
if [ "$CFG_ZLIB" = "system" ]; then
|
|
|
|
which_zlib="system"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cat <<EOF
|
|
|
|
|
|
|
|
NOTICE: The -no-zlib option was supplied but is no longer
|
|
|
|
supported.
|
|
|
|
|
|
|
|
Qt now requires zlib support in all builds, so the -no-zlib
|
|
|
|
option was ignored. Qt will be built using the $which_zlib
|
|
|
|
zlib.
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2012-03-12 11:04:54 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# check if the user passed the obsoleted -wayland or -no-wayland flag
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
|
|
|
|
cat <<EOF
|
|
|
|
|
|
|
|
NOTICE: The -wayland and -no-wayland flags are now obsolete
|
|
|
|
|
|
|
|
All configuring of QtWayland plugin and QtCompositor happens in the module
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2012-02-14 09:01:17 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# check if the user passed the obsoleted -arch or -host-arch options
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
|
|
|
|
cat <<EOF
|
|
|
|
|
|
|
|
NOTICE: The -arch and -host-arch options are obsolete.
|
|
|
|
|
|
|
|
Qt now detects the target and host architectures based on compiler
|
|
|
|
output. Qt will be built using $CFG_ARCH for the target architecture
|
|
|
|
and $CFG_HOST_ARCH for the host architecture (note that these two
|
|
|
|
will be the same unless you are cross-compiling).
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# finally save the executed command to another script
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
if [ `basename $0` != "config.status" ]; then
|
|
|
|
CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
|
|
|
|
|
|
|
|
# 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"
|
2011-04-27 10:05:43 +00:00
|
|
|
echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
|
|
|
|
echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
|
|
|
|
echo "else" >> "$outpath/config.status"
|
|
|
|
echo " $CONFIG_STATUS" >> "$outpath/config.status"
|
|
|
|
echo "fi" >> "$outpath/config.status"
|
|
|
|
chmod +x "$outpath/config.status"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$RPATH_MESSAGE" ]; then
|
|
|
|
echo
|
|
|
|
echo "$RPATH_MESSAGE"
|
|
|
|
fi
|
|
|
|
|
|
|
|
MAKE=`basename "$MAKE"`
|
|
|
|
echo
|
|
|
|
echo Qt is now configured for building. Just run \'$MAKE\'.
|
|
|
|
if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
|
|
|
|
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
|
|
|
|
echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.
|
|
|
|
echo
|