configure: do not require hg when configuring in an hg clone

When configuring in an hg clone, we need hg to compute the version string.
It can happen that users do not have Mercurial (eg. if they got a snapshot
rather that they did a full clone). In this case, we can still run, of
course, so simply fill the version string with a sufficiently explicit
value, that does not require hg. The date is a good candidate.
This commit is contained in:
Yann E. MORIN" 2010-01-17 23:06:02 +01:00
parent 2a5d424288
commit e497ddd14a

7
configure vendored
View File

@ -383,11 +383,10 @@ has_or_abort lib="${ncurses_libs}" \
# If this version is n hg clone, try to get the revision number
# If we can't get the revision number, use date
printf "Computing version string... "
case "${VERSION}" in
*+hg|hg)
has_or_abort prog=hg
printf "Computing version string... "
REVISION="$( hg id -n 2>/dev/null )"
REVISION="$( hg id -n 2>/dev/null || true )"
case "${REVISION}" in
"")
VERSION="${VERSION}_unknown@$( date +%Y%m%d.%H%M%S )";;
@ -400,7 +399,7 @@ case "${VERSION}" in
VERSION="$( printf "${VERSION}\n" |"${sed}" -r -e 's|/+|_|g;' )"
;;
esac
echo "${VERSION}"
printf "${VERSION}\n"
#---------------------------------------------------------------------
# Compute and check install paths