Previous: Appendix, Up: Appendix


6.1 Autoconf macros

Macro Name & Arguments Description Variables exported


PC_INIT([MINIMUM-VERSION], [MAXIMUM-VERSION]) Initialize pyconfigure by finding the highest-version Python interpreter that meets the specified requirements. If no such interpreter is found, exit with an error. This is a convenience macro that includes PC_PROG_PYTHON and does the version checking via PC_PYTHON_VERIFY_VERSION. PYTHON


PC_PROG_PYTHON([NAME-TO-CHECK], [MINIMUM-VERSION], [MAXIMUM-VERSION]) Find a Python interpreter with the highest version number between the given minimum and maximum versions. The version requirement is performed in a naive way, by simply appending the major and minor release numbers to the interpreter name (i.e. “python2.7”). PYTHON


PC_PROG_PYTHON_CONFIG([NAME-TO-CHECK]) Find a python-config program PYTHON_CONFIG


PC_PYTHON_VERIFY_VERSION([OPERATOR], [VERSION], [ACTION-IF-TRUE], [ACTION-IF-NOT-TRUE]) Verify that the Python interpreter is of a sufficient version number according to some comparison operator ("==", "<=", etc.)


PC_PYTHON_CHECK_VERSION Get the version of the Python interpreter PYTHON_VERSION


PC_PYTHON_CHECK_PREFIX Check what Python thinks is the prefix PYTHON_PREFIX


PC_PYTHON_CHECK_EXEC_PREFIX Check what Python thinks is the exec_prefix PYTHON_EXEC_PREFIX


PC_PYTHON_CHECK_INCLUDES Check the include flags ('-I[header]...') for including the Python header files PYTHON_INCLUDES


PC_PYTHON_CHECK_HEADERS Check for the Python header files (i.e. Python.h) HAVE_PYTHON_H


PC_PYTHON_CHECK_LIBS Check for the proper LIBS flags to load the Python shared libraries PYTHON_LIBS


PC_PYTHON_TEST_LIBS Test for the presence of the Python shared libraries HAVE_LIBPYTHON


PC_PYTHON_CHECK_CFLAGS Find the CFLAGS that Python expects PYTHON_CFLAGS


PC_PYTHON_CHECK_LDFLAGS Find the LDFLAGS that Python expects PYTHON_LDFLAGS


PC_PYTHON_CHECK_EXTENSION_SUFFIX Check the extension suffix given to Python extension modules (Python 3 only) PYTHON_EXTENSION_SUFFIX


PC_PYTHON_CHECK_ABI_FLAGS Check the ABI flags used by Python (Python 3 only) PC_PYTHON_ABI_FLAGS


PC_PYTHON_CHECK_PLATFORM Check what platform Python thinks this is PYTHON_PLATFORM


PC_PYTHON_CHECK_SITE_DIR Check the appropriate place to install Python packages (i.e. $(prefix)/lib/python2.7/site-packages) pythondir


PC_PYTHON_SITE_PACKAGE_DIR A convenience macro; adds the package's name to pythondir pkgpythondir


PC_PYTHON_CHECK_EXEC_DIR Check directory for installing Python extension modules pyexecdir


PC_PYTHON_EXEC_PACKAGE_DIR A convenience macro; adds the package's name to pyexecdir pkgpyexecdir


PC_PYTHON_CHECK_MODULE Test if a given Python module can be successfully loaded


PC_PYTHON_CHECK_FUNC Test if a given Python function can be called successfully.