build: Tune M4 macros for our needs.
* m4/ax_python_devel.m4: Do not emit 'HAVE_PYTHON'. * m4/python.m4 (_AM_PYTHON_INTERPRETER_LIST): Add newer Python versions, drop older ones. Also, sort the list with older versions at the front, newer and generic versions towards the end. This makes the algorithm pick the lowest version that meets the version requirement. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
067da472f9
commit
5189c08af9
@ -195,8 +195,11 @@ EOD`
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Make the versioning information available to the compiler
|
# Make the versioning information available to the compiler
|
||||||
AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"],
|
|
||||||
[If available, contains the Python version number currently in use.])
|
# JW: We don't need it and it interferes with the hack
|
||||||
|
# to detect multiple Pyhton versions
|
||||||
|
#AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"],
|
||||||
|
# [If available, contains the Python version number currently in use.])
|
||||||
|
|
||||||
# First, the library directory:
|
# First, the library directory:
|
||||||
ac_python_libdir=`cat<<EOD | $PYTHON -
|
ac_python_libdir=`cat<<EOD | $PYTHON -
|
||||||
|
@ -37,8 +37,8 @@ AC_DEFUN([AM_PATH_PYTHON],
|
|||||||
dnl Find a Python interpreter. Python versions prior to 2.0 are not
|
dnl Find a Python interpreter. Python versions prior to 2.0 are not
|
||||||
dnl supported. (2.0 was released on October 16, 2000).
|
dnl supported. (2.0 was released on October 16, 2000).
|
||||||
m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
|
m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
|
||||||
[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
|
[python2.7 python2 python3.0 python3.1 python3.2 python3.3 python3.4 dnl
|
||||||
python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
|
python3.5 python3.6 python3.7 python3.8 python3 python])
|
||||||
|
|
||||||
AC_ARG_VAR([PYTHON], [the Python interpreter])
|
AC_ARG_VAR([PYTHON], [the Python interpreter])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user