From 7df980031ba77fc8089700e163db5805faf1d615 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Fri, 23 Mar 2012 13:30:40 +0100 Subject: configure: Fix x86_64 arch detection (part 2) This is a follow-up to comit 70a88331519e6e6439ff23a9cc91b2e3f607acb6. The regular expression for CFG_HOST_ARCH was not updated in the above commit. Change-Id: I2baf0b42d851f1df096c2f6ad54aeec57940e661 Reviewed-by: Oswald Buddenhagen Reviewed-by: Girish Ramakrishnan --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index b24787a613..54c80b0ba0 100755 --- a/configure +++ b/configure @@ -3938,7 +3938,7 @@ CFG_ARCH=`"$outpath/bin/qmake" -spec "$XQMAKESPEC" -o /dev/null "$relpath/config [ -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=`"$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 -- cgit v1.2.3 From d8508b813950cad79600acb49ef5bef837f04934 Mon Sep 17 00:00:00 2001 From: Donald Carr Date: Fri, 23 Mar 2012 21:29:34 +0000 Subject: Reunite NAS support in configure with QSound RIP Change-Id: I7c47052ce4962f10dbcbbb8d48f05b3158d4a69a Reviewed-by: Oswald Buddenhagen --- configure | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 54c80b0ba0..32caa653a9 100755 --- a/configure +++ b/configure @@ -735,7 +735,6 @@ CFG_SSE4_1=auto CFG_SSE4_2=auto CFG_AVX=auto CFG_REDUCE_RELOCATIONS=auto -CFG_NAS=no CFG_ACCESSIBILITY=auto CFG_IWMMXT=no CFG_NEON=auto @@ -1598,13 +1597,6 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; - nas-sound) - if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then - CFG_NAS="$VAL" - else - UNKNOWN_OPT=yes - fi - ;; xcursor) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then CFG_XCURSOR="$VAL" @@ -5705,7 +5697,6 @@ fi [ "$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_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas" [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl" [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked" [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz" @@ -6188,7 +6179,6 @@ QMakeVar set sql-plugins "$SQL_PLUGINS" [ "$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_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS" [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS" [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL" [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL" -- cgit v1.2.3 From 84e98fd9d2594637e928096c8fcb19d52e5e2676 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 20 Mar 2012 14:02:21 -0700 Subject: device: Add -device and -device-option to configure For some reference platforms and SDKs we will need to pass in extra paths. Currently users have to modify the mkspec to adjust paths or set environment variables that will be picked up. This change introduces the -device and -device-option option. The key value pairs will be written to a qdevice.pri and can be used by the qmake.conf of the device spec. The reason to not save the key value pairs in qconfig.pri is becase of the fact that the device spec loads the qdevice.pri earlier than the qconfig.pri. qdevice.pri allows the mkspec to set the compiler flags and qconfig.pri allows configure to add to those compiler flags. Done-with: Holger Freyther Change-Id: I931a197b8be72397e1eedfee09502eefc01c9d4f Reviewed-by: Oswald Buddenhagen Reviewed-by: Girish Ramakrishnan Reviewed-by: Johannes Zellner Reviewed-by: Donald Carr --- configure | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) (limited to 'configure') 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 @@ -223,6 +225,23 @@ linkerSupportsFlag() compilerSupportsFlag "$lflags" >/dev/null 2>&1 } +#------------------------------------------------------------------------------- +# 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" @@ -2456,6 +2483,15 @@ if [ "$CFG_RTOS_ENABLED" = "no" ]; then esac 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 ] [-prefix-install] [-bindir ] [-libdir [-no-openssl] [-openssl] [-openssl-linked] [-no-gtkstyle] [-gtkstyle] [-qt-pcre] [-system-pcre] + [-device ] [-device-option ] [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 ............... Cross-compile for device (experimental) + -device-option ... 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 -- cgit v1.2.3