Allow Thrift to be built without the Python library.
- Modify configure.ac to check for Python conditionally, like we do for
Java, Mono, and Erlang.
- Modify Makefile.am to add "py" to SUBDIRS only if Python was detected.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666488 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configure.ac b/configure.ac
index 9e9a0b4..44e3168 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,8 +12,6 @@
Default = "/usr"])
AS_IF([test "x$PY_PREFIX" = x], [PY_PREFIX="/usr"])
-AM_PATH_PYTHON(2.4,, :)
-
AC_PROG_CC
AC_PROG_CPP
@@ -57,6 +55,12 @@
fi
AM_CONDITIONAL(ENABLE_ERLANG, [test -n "$ERLC"])
+AX_THRIFT_LIB(py, [Python], yes)
+if test "$with_py" = "yes"; then
+ AM_PATH_PYTHON(2.4,, :)
+fi
+AM_CONDITIONAL(ENABLE_PYTHON, [test -n "$PYTHON" -a "$PYTHON" != ":"])
+
AC_C_CONST
AC_C_INLINE
AC_C_VOLATILE