diff --git a/plugins/pyloader/m4/ac_python_devel.m4 b/plugins/pyloader/m4/ac_python_devel.m4 index be395b8..0623ce8 100644 --- a/plugins/pyloader/m4/ac_python_devel.m4 +++ b/plugins/pyloader/m4/ac_python_devel.m4 @@ -1,25 +1,26 @@ dnl @synopsis AC_PYTHON_DEVEL([version]) dnl -dnl Checks for Python and tries to get the include path to 'Python.h'. -dnl It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS) output -dnl variables. -dnl Also exports $(PYTHON_EXTRA_LIBS) and $(PYTHON_EXTRA_LDFLAGS) +dnl Note: Defines as a precious variable "PYTHON_VERSION". Don't +dnl override it in your configure.ac. +dnl +dnl This macro checks for Python and tries to get the include path to +dnl 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS) +dnl output variables. +dnl It also exports $(PYTHON_EXTRA_LIBS) and $(PYTHON_EXTRA_LDFLAGS) dnl for embedding Python in your code. dnl dnl You can search for some particular version of Python by passing a dnl parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". dnl Please note that you *have* to pass also an operator along dnl with the version to match, and pay special attention to the -dnl single quotes surrounding the version number. +dnl single quotes surrounding the version number. +dnl Don't use "PYTHON_VERSION" for this: that environment variable is +dnl declared as precious and thus reserved for the end-user. dnl -dnl If the user wants to employ a particular version of Python, she can -dnl now pass to configure the PYTHON_VERSION environment variable. -dnl This is only limited by the macro parameter set by the packager. -dnl -dnl This macro should work for all versions of Python >= 2.1.0. You can -dnl disable the check for the python version by setting the -dnl PYTHON_NOVERSIONCHECK environment variable to something else -dnl than the empty string. +dnl This macro should work for all versions of Python >= 2.1.0. As +dnl an end user, you can disable the check for the python version +dnl by setting the PYTHON_NOVERSIONCHECK environment variable +dnl to something else than the empty string. dnl dnl If you need to use this macro for an older Python version, please dnl contact the authors. We're always open for feedback. @@ -46,6 +47,7 @@ AC_DEFUN([AC_PYTHON_DEVEL],[ AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]]) if test -z "$PYTHON"; then AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path]) + PYTHON_VERSION="" fi # @@ -66,7 +68,7 @@ variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. Moreover, to disable this check, set PYTHON_NOVERSIONCHECK to something else than an empty string. -])dnl +]) else AC_MSG_RESULT([skip at user request]) fi @@ -90,7 +92,8 @@ to something else than an empty string. If you have it installed, but it isn't the default Python interpreter in your system path, please pass the PYTHON_VERSION variable to configure. See ``configure --help'' for reference. -])dnl +]) + PYTHON_VERSION="" fi fi @@ -106,6 +109,7 @@ variable to configure. See ``configure --help'' for reference. AC_MSG_ERROR([cannot import Python module "distutils". Please check your Python installation. The error was: $ac_distutils_result]) + PYTHON_VERSION="" fi # @@ -188,7 +192,7 @@ $ac_distutils_result]) # # final check to see if everything compiles alright # - AC_MSG_CHECKING([whether collected informations are consistent]) + AC_MSG_CHECKING([consistency of all components of python development environment]) AC_LANG_PUSH([C]) # save current global flags LIBS="$ac_save_LIBS $PYTHON_LDFLAGS" @@ -206,12 +210,14 @@ $ac_distutils_result]) Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pass it to configure, via the LDFLAGS environment variable. + Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib" ============================================================================ ERROR! You probably have to install the development version of the Python package for your distribution. The exact name of this package varies among them. ============================================================================ ]) + PYTHON_VERSION="" fi AC_LANG_POP # turn back to default flags