When testing for an hg repo, use a file that always exists, even with the "shared" extension
diff --git a/configure.in b/configure.in
index 5a411fe..c4ad4e8 100644
--- a/configure.in
+++ b/configure.in
@@ -833,7 +833,7 @@
 AC_SUBST(HGTAG)
 AC_SUBST(HGBRANCH)
 
-if test -e $srcdir/.hg/00changelog.i
+if test -e $srcdir/.hg/dirstate
 then
 AC_CHECK_PROG(HAS_HG, hg, found, not-found)
 else