[Spice-devel] [PATCH xf86-video-qxl] protect AC_CHECK_FILE for cross compiling

Alon Levy alevy at redhat.com
Thu Mar 8 06:19:03 PST 2012


Signed-off-by: Alon Levy <alevy at redhat.com>
---
 configure.ac |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 22b2e3d..dfb7a21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,11 +107,14 @@ AM_CONDITIONAL(BUILD_QXL, test "x$enable_qxl" = "xyes")
 
 PKG_CHECK_MODULES([SPICE_PROTOCOL], [spice-protocol >= 0.8.1])
 
-AC_CHECK_FILE(.git, [
-    GIT_VERSION=`git log -1 --format=%h`
-    AC_DEFINE_UNQUOTED([GIT_VERSION], ["$GIT_VERSION"], [Defined if building from git])
-    ]
-)
+# AC_CHECK_FILE is not supported when cross compiling
+if test "$cross_compiling" = "no" ; then
+    AC_CHECK_FILE(.git, [
+        GIT_VERSION=`git log -1 --format=%h`
+        AC_DEFINE_UNQUOTED([GIT_VERSION], ["$GIT_VERSION"], [Defined if building from git])
+        ]
+    )
+fi
 
 AC_CONFIG_FILES([
                 Makefile
-- 
1.7.9.1



More information about the Spice-devel mailing list