+ AS_IF([test -z "$PYTHON_LIBS"], [
+ AS_IF([test -z "$PYTHON_CONFIG"], [
+ AC_PATH_PROGS([PYTHON_CONFIG],
+ [python$PYTHON_VERSION-config python-config],
+ [no],
+ [`dirname $PYTHON`])
+ AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON. Do you have python-dev installed?])])
+ ])
+ AC_MSG_CHECKING([Python library flags])
+ PYTHON_LIBS=`$PYTHON_CONFIG --libs`
+ AC_MSG_RESULT([$PYTHON_LIBS])
+ ])
+fi
+
+AM_CONDITIONAL([WITH_PYTHON_PLUGINS], [test "x$enable_python_plugins" != xno])
+AS_IF(
+ [test "x$enable_python_plugins" != xno],
+ AC_DEFINE_UNQUOTED([WITH_PYTHON_PLUGINS], [1], [Python plugin support.])
+)
+
+AC_ARG_ENABLE([python-bindings-doc],
+ [AC_HELP_STRING([--enable-python-bindings-doc],
+ [generate Python bindings documentation])],
+ [enable_python_bindings_doc=yes], [enable_python_bindings_doc=no])
+
+AM_CONDITIONAL([BUILD_PYTHON_BINDINGS_DOC], [test "x${enable_python_bindings_doc:-yes}" = xyes])
+
+AC_ARG_ENABLE([python-bindings-tests],
+ [AC_HELP_STRING([--enable-python-bindings-tests],
+ [test Python bindings])],
+ [enable_python_bindings_tests=yes], [enable_python_bindings_tests=no])