Better search for python3 based on code from Vadim Zeitlin
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13110 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1d000ef6a6
commit
6f8e77d7b0
1 changed files with 10 additions and 15 deletions
25
configure.in
25
configure.in
|
|
@ -630,7 +630,7 @@ if test x"${PYBIN}" = xno -o x"${with_alllang}" = xno ; then
|
|||
else
|
||||
# First figure out the name of the Python executable
|
||||
if test "x$PYBIN" = xyes; then
|
||||
AC_CHECK_PROGS(PYTHON, [python python2.8 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python1.4 python])
|
||||
AC_CHECK_PROGS(PYTHON, [python python2.8 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python1.4])
|
||||
else
|
||||
PYTHON="$PYBIN"
|
||||
fi
|
||||
|
|
@ -733,20 +733,15 @@ AS_HELP_STRING([--with-python3=path], [Set location of Python 3.x executable]),[
|
|||
if test x"${PY3BIN}" = xno -o x"${with_alllang}" = xno ; then
|
||||
AC_MSG_NOTICE([Disabling Python 3.x support])
|
||||
else
|
||||
# First figure out the name of the Python3 executable
|
||||
|
||||
if test "x$PY3BIN" = xyes; then
|
||||
AC_CHECK_PROGS(PYTHON3, [python3 python3.0 python3.1 python3.2 python3.3 python3.4 python3.5 python3.6])
|
||||
else
|
||||
PYTHON3="$PY3BIN"
|
||||
fi
|
||||
|
||||
# Check for Python 3.x development tools (header files, static library and python3-config)
|
||||
if test "x$PYTHON3" = x; then
|
||||
AC_CHECK_PROGS(PY3CONFIG, [python3-config python3.0-config python3.1-config python3.2-config python3.3-config python3.4-config python3.5-config python3.6-config])
|
||||
else
|
||||
AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config python3-config python3.0-config python3.1-config python3.2-config python3.3-config python3.4-config python3.5-config python3.6-config])
|
||||
fi
|
||||
for py_ver in 3 3.6 3.5 3.4 3.3 3.2 3.1 3.0; do
|
||||
AC_CHECK_PROGS(PYTHON3, [python$py_ver])
|
||||
if test -n "$PYTHON3"; then
|
||||
AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config])
|
||||
if test -n "$PY3CONFIG"; then
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "$PYTHON3" -a -n "$PY3CONFIG"; then
|
||||
AC_MSG_CHECKING([for Python 3.x prefix])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue