From e497ddd14a044f328c2fad8c962534aa7a10dff6 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 17 Jan 2010 23:06:02 +0100 Subject: 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. diff --git a/configure b/configure index c7768c4..e02b652 100755 --- a/configure +++ b/configure @@ -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 -- cgit v0.10.2-6-g49f6