Index: build/ac-macros/swig.m4 =================================================================== --- build/ac-macros/swig.m4 (revision 1868603) +++ build/ac-macros/swig.m4 (working copy) @@ -157,10 +157,18 @@ ac_cv_python_is_py3="yes" ]) - if test "$ac_cv_python_is_py3" = "yes"; then - SWIG_PY_OPTS="-python -py3" + if test "$SWIG_VERSION" -ge "400000"; then + if test "$ac_cv_python_is_py3" = "yes"; then + SWIG_PY_OPTS="-python -py3 -nofastunpack" + else + SWIG_PY_OPTS="-python -nofastunpack" + fi else - SWIG_PY_OPTS="-python -classic" + if test "$ac_cv_python_is_py3" = "yes"; then + SWIG_PY_OPTS="-python -py3" + else + SWIG_PY_OPTS="-python -classic" + fi fi dnl SWIG Python bindings successfully configured, clear the error message