diff options
author | Alon Levy <alevy@redhat.com> | 2012-03-08 16:16:20 +0200 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-03-18 21:53:08 +0100 |
commit | fe74d8a89534d92a2151ee3ac28de3d5864a874e (patch) | |
tree | 7b055fc19e4ada861a59617b851ac178dd58d78e | |
parent | 810d92db84d0e11260ec3abc936dacac113fcbba (diff) |
protect AC_CHECK_FILE for cross compiling
Signed-off-by: Alon Levy <alevy@redhat.com>
-rw-r--r-- | configure.ac | 13 |
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 |