Erik <brinkie83 <at> gmail.com> writes:
> ./configure: line 15117: syntax error near unexpected token `,BIND_PYTHON=no'
> ./configure: line 15117: `
> AM_CHECK_PYTHON_HEADERS(,BIND_PYTHON=no;AC_MSG_NOTICE([python headers not
> found, disabling python binding]))'
>
> I believe we're missing the AM_CHECK_PYTHON_HEADER macro somewhere?
I might have posted a bit to quick (assumed this macro was there specially for
urjtag, but after some google-fu I noticed it was not). Here's how I solved the
problem.
I added the following lines to the bottom of "acinclude.m4" and reran
autogen.sh
dnl a macro to check for ability to create python extensions
dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
dnl function also defines PYTHON_INCLUDES
AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
[AC_REQUIRE([AM_PATH_PYTHON])
AC_MSG_CHECKING(for headers required to compile python extensions)
dnl deduce PYTHON_INCLUDES
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
if test "$py_prefix" != "$py_exec_prefix"; then
PYTHON_INCLUDES="$PYTHON_INCLUDES
-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
fi
AC_SUBST(PYTHON_INCLUDES)
dnl check if the headers exist:
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
AC_TRY_CPP([#include <Python.h>],dnl
[AC_MSG_RESULT(found)
$1],dnl
[AC_MSG_RESULT(not found)
$2])
CPPFLAGS="$save_CPPFLAGS"
])
result:
urjtag is now configured for
Libraries:
libusb : 1.0
libftdi : yes (no async mode)
...
Language bindings:
python : yes
oh yeah! :-)
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development