diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2017-09-19 08:12:14 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2017-09-19 18:48:34 +0100 |
commit | 836a57190e85ba0b178782697af4d5dc1cb20a64 (patch) | |
tree | 0d82e479194232e2ac7e0d35cce5bec04ddfebea /configure.ac | |
parent | 057e1e44c398a06af6cb0f579048ddf0350dd31e (diff) | |
download | swig-836a57190e85ba0b178782697af4d5dc1cb20a64.tar.gz |
Fix --with-2to3 configure option
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index d2f2c85b3..48bb1ce81 100644 --- a/configure.ac +++ b/configure.ac @@ -902,10 +902,17 @@ if test -n "$PYINCLUDE" || test -n "$PY3INCLUDE" ; then AC_MSG_RESULT($pep8_version) fi fi -AC_ARG_WITH(2to3, AS_HELP_STRING([--with-2to3], [alternate 2to3 executable]) -AS_HELP_STRING([--with-2to3=path], [Specify 2to3 utility path]),[ PY2TO3="$withval"], [PY2TO3="2to3"]) -if [ ! -z "$PYTHON3" ] ; then - AC_CHECK_PROGS(PY2TO3PROG, $PY2TO3) + +AC_ARG_WITH(2to3, AS_HELP_STRING([--with-2to3=path], [Set location of Python 2to3 tool]), [PY2TO3BIN="$withval"], [PY2TO3BIN="yes"]) +if test -n "$PYTHON3"; then + if test "x$PY2TO3BIN" = xyes; then + AC_CHECK_PROGS(PY2TO3, 2to3) + else + PY2TO3="$PY2TO3BIN" + fi + if test -z "$PY2TO3"; then + PYTHON3= + fi fi #---------------------------------------------------------------- |