From: Vadim Z. <vz...@ze...> - 2012-05-22 00:01:19
|
On Mon, 21 May 2012 18:13:59 +0000 wsf...@us... wrote: > Revision: 13097 > http://swig.svn.sourceforge.net/swig/?rev=13097&view=rev > Author: wsfulton > Date: 2012-05-21 18:13:58 +0000 (Mon, 21 May 2012) > Log Message: > ----------- > Autoconf to check for a few more later versions of Python 3.x - can > anyone think of a better way to do this? Wouldn't python3 be always available in any case as a symlink to some python3.N version? This seems to be the case at least under Debian. > Modified Paths: > -------------- > trunk/configure.in > > Modified: trunk/configure.in > =================================================================== > --- trunk/configure.in 2012-05-18 02:43:52 UTC (rev 13096) > +++ trunk/configure.in 2012-05-21 18:13:58 UTC (rev 13097) > @@ -737,16 +737,16 @@ > # First figure out the name of the Python3 executable > > if test "x$PY3BIN" = xyes; then > - AC_CHECK_PROGS(PYTHON3, [python3 python3.0 python3.1]) > + 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]) > + 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]) > + 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 If we do need to test for all the versions perhaps it would be worth it to at least do it in a loop, i.e. something like for py_ver in 3.4 3.3 3.2 3.1 3.0 3; do AC_CHECK_PROGS(PYTHON3, [python$py_ver]) if test -n "$PYTHON3"; then AC_CHECK_PROGS(PY3CONFIG, [python$py_ver-config]); if test -n "$PY3CONFIG"; then break fi fi done ? Regards, VZ |