Allow the Thrift compiler to be built without the OCaml generator.
- Use AX_THRIFT_GEN to make configure support --disable-gen-ocaml
- Update the compiler Makefile.am to exclude the generator.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665593 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/Makefile.am b/compiler/cpp/Makefile.am
index eed2043..bb78b1e 100644
--- a/compiler/cpp/Makefile.am
+++ b/compiler/cpp/Makefile.am
@@ -14,7 +14,6 @@
src/generate/t_rb_generator.cc \
src/generate/t_xsd_generator.cc \
src/generate/t_perl_generator.cc \
- src/generate/t_ocaml_generator.cc \
src/generate/t_erl_generator.cc \
src/generate/t_hs_generator.cc \
src/generate/t_cocoa_generator.cc \
@@ -61,6 +60,9 @@
if THRIFT_GEN_java
thrift_SOURCES += src/generate/t_java_generator.cc
endif
+if THRIFT_GEN_ocaml
+thrift_SOURCES += src/generate/t_ocaml_generator.cc
+endif
thrift_CXXFLAGS = -Wall -I$(srcdir)/src $(BOOST_CPPFLAGS)
thrift_LDFLAGS = -Wall $(BOOST_LDFLAGS)
diff --git a/configure.ac b/configure.ac
index 76d12bf..db68259 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,6 +130,8 @@
AM_CONDITIONAL([THRIFT_GEN_cpp], [test "$ax_thrift_gen_cpp" = "yes"])
AX_THRIFT_GEN(java, [Java], yes)
AM_CONDITIONAL([THRIFT_GEN_java], [test "$ax_thrift_gen_java" = "yes"])
+AX_THRIFT_GEN(ocaml, [OCaml], yes)
+AM_CONDITIONAL([THRIFT_GEN_ocaml], [test "$ax_thrift_gen_ocaml" = "yes"])
AC_CONFIG_HEADERS(config.h:config.hin)