summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-03-08 16:16:20 +0200
committerAlon Levy <alevy@redhat.com>2012-03-18 21:53:08 +0100
commitfe74d8a89534d92a2151ee3ac28de3d5864a874e (patch)
tree7b055fc19e4ada861a59617b851ac178dd58d78e
parent810d92db84d0e11260ec3abc936dacac113fcbba (diff)
protect AC_CHECK_FILE for cross compiling
Signed-off-by: Alon Levy <alevy@redhat.com>
-rw-r--r--configure.ac13
1 files changed, 8 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index f34624f..cb874f7 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