summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure47
1 files changed, 44 insertions, 3 deletions
diff --git a/configure b/configure
index 32caa653a9..fbd6b35b6d 100755
--- a/configure
+++ b/configure
@@ -71,8 +71,10 @@ QTCONFIG_CONFIG=
QT_CONFIG=
SUPPORTED=
QMAKE_VARS_FILE=.qmake.vars
+DEVICE_VARS_FILE=.device.vars
:> "$QMAKE_VARS_FILE"
+:> "$DEVICE_VARS_FILE"
#-------------------------------------------------------------------------------
# utility functions
@@ -224,6 +226,23 @@ linkerSupportsFlag()
}
#-------------------------------------------------------------------------------
+# device options
+#-------------------------------------------------------------------------------
+DeviceVar()
+{
+ case "$1" in
+ set)
+ eq="="
+ ;;
+ *)
+ echo >&2 "BUG: wrong command to QMakeVar: $1"
+ ;;
+ esac
+
+ echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
+}
+
+#-------------------------------------------------------------------------------
# operating system detection
#-------------------------------------------------------------------------------
@@ -910,7 +929,7 @@ while [ "$#" -gt 0 ]; do
shift
VAL=$1
;;
- -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir)
+ -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)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
shift
VAL="$1"
@@ -1306,6 +1325,14 @@ while [ "$#" -gt 0 ]; do
XPLATFORM="$VAL"
case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
;;
+ device)
+ XPLATFORM="devices/$VAL"
+ ;;
+ device-option)
+ DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
+ DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
+ DeviceVar set $DEV_VAR $DEV_VAL
+ ;;
debug-and-release)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_DEBUG_RELEASE="$VAL"
@@ -2457,6 +2484,15 @@ if [ "$CFG_RTOS_ENABLED" = "no" ]; then
fi
#-------------------------------------------------------------------------------
+# write out device config before we run the test.
+#-------------------------------------------------------------------------------
+if cmp -s "$DEVICE_VARS_FILE" "$outpath/mkspecs/qdevice.pri"; then
+ rm -f "$DEVICE_VARS_FILE"
+else
+ mv -f $DEVICE_VARS_FILE "$outpath/mkspecs/qdevice.pri"
+fi
+
+#-------------------------------------------------------------------------------
# tests that don't need qmake (must be run before displaying help)
#-------------------------------------------------------------------------------
@@ -2929,6 +2965,7 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir
[-no-openssl] [-openssl] [-openssl-linked]
[-no-gtkstyle] [-gtkstyle]
[-qt-pcre] [-system-pcre]
+ [-device <name>] [-device-option <key=value>]
[additional platform specific options (see below)]
@@ -3192,6 +3229,10 @@ Additional options:
-force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
+ -device <name> ............... Cross-compile for device <name> (experimental)
+ -device-option <key=value> ... Add device specific options for the device mkspec
+ (experimental)
+
EOF
if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
@@ -3925,12 +3966,12 @@ fi # Build qmake
#-------------------------------------------------------------------------------
# Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
-CFG_ARCH=`"$outpath/bin/qmake" -spec "$XQMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
+CFG_ARCH=`OUTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
[ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
# Do the same test again, using the host compiler
- CFG_HOST_ARCH=`"$outpath/bin/qmake" -spec "$QMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
+ CFG_HOST_ARCH=`OUTDIR="$outpath" "$outpath/bin/qmake" -spec "$QMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
[ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
else
# not cross compiling, host == target