show git commit number even when cross-compiling

AC_CHECK_FILE will die when cross-compiling. So don't use it to test the existence of guess-rev.sh.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
This commit is contained in:
Jie Zhang 2011-08-15 10:52:11 -04:00 committed by Spencer Oliver
parent 9779a2bf1a
commit 8ff6097e23
1 changed files with 5 additions and 11 deletions

View File

@ -143,20 +143,14 @@ is_mingw=no
is_win32=no is_win32=no
is_darwin=no is_darwin=no
if test $cross_compiling = no; then # guess-rev.sh only exists in the repository, not in the released archives
# guess-rev.sh only exists in the repository, not in the released archives AC_MSG_CHECKING([whether to build a release])
AC_CHECK_FILE("$srcdir/guess-rev.sh", has_guess_rev=yes, has_guess_rev=no) if test -f $srcdir/guess-rev.sh ; then
build_release=no
AC_MSG_CHECKING([whether to build a release])
if test $has_guess_rev = no; then
build_release=yes
else
build_release=no
fi
AC_MSG_RESULT($build_release)
else else
build_release=yes build_release=yes
fi fi
AC_MSG_RESULT($build_release)
# We are not *ALWAYS* being installed in the standard place. # We are not *ALWAYS* being installed in the standard place.
# We may be installed in a "tool-build" specific location. # We may be installed in a "tool-build" specific location.