python: Make Python detection more robust.
Previously, missing Python development packages made configure fail instead of merely disabling the bindings. * configure.ac: Check for 'PYTHON_VERSION'. * m4/ax_python_devel.m4: Make test non-fatal. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
73c47535b6
commit
1607aa7fe5
10
configure.ac
10
configure.ac
@ -365,6 +365,16 @@ if test "$found" = "1"; then
|
|||||||
else
|
else
|
||||||
AM_PATH_PYTHON([3.3])
|
AM_PATH_PYTHON([3.3])
|
||||||
AX_SWIG_PYTHON
|
AX_SWIG_PYTHON
|
||||||
|
if test -z "$PYTHON_VERSION"; then
|
||||||
|
if test "$explicit_languages" = "1"; then
|
||||||
|
AC_MSG_ERROR([[
|
||||||
|
***
|
||||||
|
*** Please install the python development packages.
|
||||||
|
***]])
|
||||||
|
else
|
||||||
|
enabled_languages=$(echo $enabled_languages | sed 's/python//')
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -304,13 +304,12 @@ EOD`
|
|||||||
AC_MSG_RESULT([$pythonexists])
|
AC_MSG_RESULT([$pythonexists])
|
||||||
|
|
||||||
if test ! "x$pythonexists" = "xyes"; then
|
if test ! "x$pythonexists" = "xyes"; then
|
||||||
AC_MSG_FAILURE([
|
AC_MSG_WARN([
|
||||||
Could not link test program to Python. Maybe the main Python library has been
|
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,
|
installed in some non-standard library path. If so, pass it to configure,
|
||||||
via the LDFLAGS environment variable.
|
via the LDFLAGS environment variable.
|
||||||
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
|
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
|
||||||
============================================================================
|
============================================================================
|
||||||
ERROR!
|
|
||||||
You probably have to install the development version of the Python package
|
You probably have to install the development version of the Python package
|
||||||
for your distribution. The exact name of this package varies among them.
|
for your distribution. The exact name of this package varies among them.
|
||||||
============================================================================
|
============================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user