- 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
Default = "/usr"])
AS_IF([test "x$PY_PREFIX" = x], [PY_PREFIX="/usr"])
-AM_PATH_PYTHON(2.4,, :)
-
AC_PROG_CC
AC_PROG_CPP
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
SUBDIRS = \
- cpp \
- py
+ cpp
if ENABLE_MONO
SUBDIRS += csharp
SUBDIRS += java
endif
+if ENABLE_PYTHON
+SUBDIRS += py
+endif
+
if ENABLE_ERLANG
SUBDIRS += erl
endif
-SUBDIRS = py
+SUBDIRS =
if ENABLE_JAVA
SUBDIRS += java
endif
+if ENABLE_PYTHON
+SUBDIRS += py
+endif
+
noinst_LTLIBRARIES = libtestgencpp.la
libtestgencpp_la_SOURCES = \
gen-cpp/DebugProtoTest_types.cpp \