Fix configure for binary specified by --with-python3

This commit is contained in:
William S Fulton 2014-02-16 15:53:08 +00:00
commit a161e5ab4e

View file

@ -707,6 +707,7 @@ AS_HELP_STRING([--with-python3=path], [Set location of Python 3.x executable]),[
if test x"${PY3BIN}" = xno -o x"${with_alllang}" = xno ; then if test x"${PY3BIN}" = xno -o x"${with_alllang}" = xno ; then
AC_MSG_NOTICE([Disabling Python 3.x support]) AC_MSG_NOTICE([Disabling Python 3.x support])
else else
if test "x$PY3BIN" = xyes; then
for py_ver in 3 3.6 3.5 3.4 3.3 3.2 3.1 3.0; do 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]) AC_CHECK_PROGS(PYTHON3, [python$py_ver])
if test -n "$PYTHON3"; then if test -n "$PYTHON3"; then
@ -716,6 +717,11 @@ else
fi fi
fi fi
done done
else
PYTHON3="$PY3BIN"
AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config])
fi
if test -n "$PYTHON3" -a -n "$PY3CONFIG"; then if test -n "$PYTHON3" -a -n "$PY3CONFIG"; then
AC_MSG_CHECKING([for Python 3.x prefix]) AC_MSG_CHECKING([for Python 3.x prefix])