summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorRalf Schmitt <ralf@systemexit.de>2011-05-31 22:10:03 (GMT)
committerRalf Schmitt <ralf@systemexit.de>2011-05-31 22:10:03 (GMT)
commit069456267e96c359ec7b4bd4073c3a027629d79a (patch)
treeed732a1ba6380997a99245439f7d05c828a58536 /configure.in
parentac4e5abc788dfd10474fe3b0a6c5c802d3159763 (diff)
downloadcpython-069456267e96c359ec7b4bd4073c3a027629d79a.zip
cpython-069456267e96c359ec7b4bd4073c3a027629d79a.tar.gz
cpython-069456267e96c359ec7b4bd4073c3a027629d79a.tar.bz2
disable ASDLGEN if hg won't work, or if python is not installed.
This change makes configure check for - the existence of a hg repository - the hg executable itself - the python executable Running $(srcdir)/Parser/asdl_c.py (i.e. ASDLGEN) will fail if any of the above prerequisites is missing, so we now disable it instead. closes #12225
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in15
1 files changed, 15 insertions, 0 deletions
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