summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKushal Das <kushaldas@gmail.com>2014-04-15 18:20:06 (GMT)
committerKushal Das <kushaldas@gmail.com>2014-04-15 18:20:06 (GMT)
commit02d23a212a1e8e45a29e06d3f91e119610b682a3 (patch)
treeb80ae813af32578a07c9fbe75dc60dfee0fb7af8 /configure
parentcec96144755bc75bc82d34a27e17ebe4eb300992 (diff)
downloadcpython-02d23a212a1e8e45a29e06d3f91e119610b682a3.zip
cpython-02d23a212a1e8e45a29e06d3f91e119610b682a3.tar.gz
cpython-02d23a212a1e8e45a29e06d3f91e119610b682a3.tar.bz2
Closes Issue 17861: Autogenerate Include/opcode.h from opcode.py.
It includes required changes in Makefile.pre.in and configure.ac among other files.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure52
1 files changed, 52 insertions, 0 deletions
diff --git a/configure b/configure
index d762b71..7b0c6a9 100755
--- a/configure
+++ b/configure
@@ -670,6 +670,7 @@ MKDIR_P
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
+OPCODEHGEN
PYTHON
ASDLGEN
ac_ct_READELF
@@ -6048,6 +6049,57 @@ else
fi
+for ac_prog in python$PACKAGE_VERSION python3 python
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PYTHON+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PYTHON"; then
+ ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PYTHON="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PYTHON=$ac_cv_prog_PYTHON
+if test -n "$PYTHON"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+$as_echo "$PYTHON" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$PYTHON" && break
+done
+test -n "$PYTHON" || 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*)
# install -d does not work on BSDI or HP-UX