root / pykota / trunk / acinclude.m4 @ 2162

Revision 2146, 0.9 kB (checked in by jerome, 20 years ago)

It seems that $Log$ is not implemented or doesn't work for some reason

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1dnl From msw.
2dnl
3dnl a macro to check for ability to create python extensions
4dnl  AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
5dnl function also defines PYTHON_INCLUDES
6AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
7[AC_REQUIRE([AM_PATH_PYTHON])
8AC_MSG_CHECKING(for headers required to compile python extensions)
9dnl deduce PYTHON_INCLUDES
10py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
11py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
12PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
13if test "$py_prefix" != "$py_exec_prefix"; then
14  PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
15fi
16AC_SUBST(PYTHON_INCLUDES)
17dnl check if the headers exist:
18save_CPPFLAGS="$CPPFLAGS"
19CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
20AC_TRY_CPP([#include <Python.h>],dnl
21[AC_MSG_RESULT(found)
22$1],dnl
23[AC_MSG_RESULT(not found)
24$2])
25CPPFLAGS="$save_CPPFLAGS"
26])
Note: See TracBrowser for help on using the browser.