summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.pre.in2
-rw-r--r--configure.in15
2 files changed, 16 insertions, 1 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index b93e482..694faad 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -274,7 +274,7 @@ AST_ASDL= $(srcdir)/Parser/Python.asdl
ASDLGEN_FILES= $(srcdir)/Parser/asdl.py $(srcdir)/Parser/asdl_c.py
# XXX Note that a build now requires Python exist before the build starts
-ASDLGEN= $(srcdir)/Parser/asdl_c.py
+ASDLGEN= @DISABLE_ASDLGEN@ $(srcdir)/Parser/asdl_c.py
##########################################################################
# Python
diff --git a/configure.in b/configure.in
index 524282f..8e89c8f 100644
--- a/configure.in
+++ b/configure.in
@@ -832,7 +832,13 @@ fi
AC_SUBST(HGVERSION)
AC_SUBST(HGTAG)
AC_SUBST(HGBRANCH)
+
+if test -e $srcdir/.hg/00changelog.i
+then
AC_CHECK_PROG(HAS_HG, hg, found, not-found)
+else
+HAS_HG=no-repository
+fi
if test $HAS_HG = found
then
HGVERSION="hg id -i \$(srcdir)"
@@ -844,6 +850,15 @@ else
HGBRANCH=""
fi
+AC_SUBST(DISABLE_ASDLGEN)
+DISABLE_ASDLGEN=""
+AC_CHECK_PROG(HAS_PYTHON, python, found, not-found)
+if test $HAS_HG != found -o $HAS_PYTHON != found
+then
+ DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
+fi
+
+
case $MACHDEP in
bsdos*|hp*|HP*)
# install -d does not work on BSDI or HP-UX