summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorXavier de Gaye <xdegaye@users.sourceforge.net>2016-07-26 10:55:20 (GMT)
committerXavier de Gaye <xdegaye@users.sourceforge.net>2016-07-26 10:55:20 (GMT)
commit8d4989687cc8f7e4add7fd3b09e131fa26e3f132 (patch)
tree97e531287c685417977ea3de010fedb81c7ced3c /configure.ac
parentc75885bb86f3d0956bf5dacab6a0b5d719753d6e (diff)
parentfd0d5939bd7dd36ad84fb4c14c84f4386295da9d (diff)
downloadcpython-8d4989687cc8f7e4add7fd3b09e131fa26e3f132.zip
cpython-8d4989687cc8f7e4add7fd3b09e131fa26e3f132.tar.gz
cpython-8d4989687cc8f7e4add7fd3b09e131fa26e3f132.tar.bz2
(merge from 3.5) Issue #26662: Set PYTHON_FOR_GEN in configure
as the Python program to be used for file generation during the build.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 8 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index 7c83ca6..d5b8192 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,14 @@ AC_SUBST(host)
# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
rm -f pybuilddir.txt
+AC_CHECK_PROGS(PYTHON_FOR_GEN, python$PACKAGE_VERSION python3 python, not-found)
+if test "$PYTHON_FOR_GEN" = not-found; then
+ PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
+ echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
+ echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
+fi
+AC_SUBST(PYTHON_FOR_GEN)
+
if test "$cross_compiling" = yes; then
AC_MSG_CHECKING([for python interpreter for cross build])
if test -z "$PYTHON_FOR_BUILD"; then
@@ -1204,23 +1212,6 @@ if test "$cross_compiling" = yes; then
fi
AC_SUBST(READELF)
-AC_SUBST(ASDLGEN)
-AC_CHECK_PROGS(PYTHON, python$PACKAGE_VERSION python3 python, not-found)
-if test "$PYTHON" = not-found; then
- ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
-else
- ASDLGEN="$PYTHON"
-fi
-
-AC_SUBST(OPCODEHGEN)
-AC_CHECK_PROGS(PYTHON, python$PACKAGE_VERSION python3 python, not-found)
-if test "$PYTHON" = not-found; then
- OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
-else
- OPCODEHGEN="$PYTHON"
-fi
-
-
case $MACHDEP in
bsdos*|hp*|HP*)