diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2014-02-16 15:53:08 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2014-02-16 17:30:51 +0000 |
commit | a161e5ab4ef310d0639f10cf75a490b5106bfe0a (patch) | |
tree | 4e8bbc5e572fc606e0d6aa7fe9e9eabfcbe79189 /configure.ac | |
parent | b1707884592807e89a133035c1571e1b75746ece (diff) | |
download | swig-a161e5ab4ef310d0639f10cf75a490b5106bfe0a.tar.gz |
Fix configure for binary specified by --with-python3
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 736395ac7..bb62068ae 100644 --- a/configure.ac +++ b/configure.ac @@ -707,15 +707,21 @@ 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 - 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 + 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 + 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 - fi - done + done + else + PYTHON3="$PY3BIN" + AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config]) + fi + if test -n "$PYTHON3" -a -n "$PY3CONFIG"; then AC_MSG_CHECKING([for Python 3.x prefix]) |