@@ -645,8 +645,8 @@ MKDIR_P
645645INSTALL_DATA
646646INSTALL_SCRIPT
647647INSTALL_PROGRAM
648- HAS_PYTHON
649- DISABLE_ASDLGEN
648+ PYTHON
649+ ASDLGEN
650650HAS_HG
651651HGBRANCH
652652HGTAG
@@ -5281,16 +5281,17 @@ else
52815281fi
52825282
52835283
5284- DISABLE_ASDLGEN=" "
5285- # Extract the first word of "python", so it can be a program name with args.
5286- set dummy python; ac_word=$2
5284+ for ac_prog in python$PACKAGE_VERSION python3 python
5285+ do
5286+ # Extract the first word of "$ac_prog", so it can be a program name with args.
5287+ set dummy $ac_prog ; ac_word=$2
52875288{ $as_echo " $as_me :${as_lineno-$LINENO } : checking for $ac_word " >&5
52885289$as_echo_n " checking for $ac_word ... " >&6 ; }
5289- if ${ac_cv_prog_HAS_PYTHON +: } false ; then :
5290+ if ${ac_cv_prog_PYTHON +: } false ; then :
52905291 $as_echo_n " (cached) " >&6
52915292else
5292- if test -n " $HAS_PYTHON " ; then
5293- ac_cv_prog_HAS_PYTHON =" $HAS_PYTHON " # Let the user override the test.
5293+ if test -n " $PYTHON " ; then
5294+ ac_cv_prog_PYTHON =" $PYTHON " # Let the user override the test.
52945295else
52955296as_save_IFS=$IFS ; IFS=$PATH_SEPARATOR
52965297for as_dir in $PATH
@@ -5299,30 +5300,34 @@ do
52995300 test -z " $as_dir " && as_dir=.
53005301 for ac_exec_ext in ' ' $ac_executable_extensions ; do
53015302 if { test -f " $as_dir /$ac_word$ac_exec_ext " && $as_test_x " $as_dir /$ac_word$ac_exec_ext " ; }; then
5302- ac_cv_prog_HAS_PYTHON= " found "
5303+ ac_cv_prog_PYTHON= " $ac_prog "
53035304 $as_echo " $as_me :${as_lineno-$LINENO } : found $as_dir /$ac_word$ac_exec_ext " >&5
53045305 break 2
53055306 fi
53065307done
53075308 done
53085309IFS=$as_save_IFS
53095310
5310- test -z " $ac_cv_prog_HAS_PYTHON " && ac_cv_prog_HAS_PYTHON=" not-found"
53115311fi
53125312fi
5313- HAS_PYTHON= $ac_cv_prog_HAS_PYTHON
5314- if test -n " $HAS_PYTHON " ; then
5315- { $as_echo " $as_me :${as_lineno-$LINENO } : result: $HAS_PYTHON " >&5
5316- $as_echo " $HAS_PYTHON " >&6 ; }
5313+ PYTHON= $ac_cv_prog_PYTHON
5314+ if test -n " $PYTHON " ; then
5315+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $PYTHON " >&5
5316+ $as_echo " $PYTHON " >&6 ; }
53175317else
53185318 { $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
53195319$as_echo " no" >&6 ; }
53205320fi
53215321
53225322
5323- if test $HAS_HG ! = found -o $HAS_PYTHON ! = found
5324- then
5325- DISABLE_ASDLGEN=" @echo hg: $HAS_HG , python: $HAS_PYTHON ! cannot run \$ (srcdir)/Parser/asdl_c.py #"
5323+ test -n " $PYTHON " && break
5324+ done
5325+ test -n " $PYTHON " || PYTHON=" not-found"
5326+
5327+ if $PYTHON = not-found; then
5328+ ASDLGEN=" @echo python: $PYTHON ! cannot run \$ (srcdir)/Parser/asdl_c.py #"
5329+ else
5330+ ASDLGEN=" $PYTHON "
53265331fi
53275332
53285333
0 commit comments