Lines Matching full:python
14 # This macro checks for Python and tries to get the include path to
15 # 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LIBS) output
17 # $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code.
19 # You can search for some particular version of Python by passing a
26 # This macro should work for all versions of Python >= 2.1.0. As an end
27 # user, you can disable the check for the python version by setting the
31 # If you need to use this macro for an older Python version, please
75 # Allow the use of a (user set) custom python version
77 AC_ARG_VAR([PYTHON_VERSION],[The installed Python
79 will be appended to the Python interpreter
82 AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
83 if test -z "$PYTHON"; then
84 AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path])
89 # Check for a version of Python >= 2.1.0
91 AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
92 ac_supports_python_ver=`$PYTHON -c "import sys; \
100 doesn't work properly with versions of Python before
118 AC_MSG_CHECKING([for a version of Python $1])
119 ac_supports_python_ver=`$PYTHON -c "import sys; \
126 AC_MSG_ERROR([this package requires Python $1.
127 If you have it installed, but it isn't the default Python
138 AC_MSG_CHECKING([for the distutils Python package])
139 ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
144 AC_MSG_ERROR([cannot import Python module "distutils".
145 Please check your Python installation. The error was:
151 # Check for Python include path
153 AC_MSG_CHECKING([for Python include path])
155 python_path=`$PYTHON -c "import distutils.sysconfig; \
157 plat_python_path=`$PYTHON -c "import distutils.sysconfig; \
172 # Check for Python library path
174 AC_MSG_CHECKING([for Python library path])
178 ac_python_version=`cat<<EOD | $PYTHON -
192 ac_python_version=`$PYTHON -c "import sys; \
199 … [If available, contains the Python version number currently in use.])
202 ac_python_libdir=`cat<<EOD | $PYTHON -
212 ac_python_library=`cat<<EOD | $PYTHON -
217 print ('python'+c[['LDVERSION']])
219 print ('python'+c[['VERSION']])
222 # This small piece shamelessly adapted from PostgreSQL python macro;
233 ac_python_libdir=`$PYTHON -c \
242 Cannot determine location of your Python DSO. Please check it was installed with
253 AC_MSG_CHECKING([for Python site-packages path])
255 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
264 AC_MSG_CHECKING(python extra libraries)
266 PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
276 AC_MSG_CHECKING(python extra linking flags)
278 PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
288 AC_MSG_CHECKING([consistency of all components of python development environment])
298 AC_LANG_PROGRAM([[#include <Python.h>]],
311 Could not link test program to Python. Maybe the main Python library has been
314 Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
317 You probably have to install the development version of the Python package