Allow the Thrift compiler to be built without the Python generator.

- Use AX_THRIFT_GEN to make configure support --disable-gen-py
- Update the compiler Makefile.am to exclude the generator.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665614 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/Makefile.am b/compiler/cpp/Makefile.am
index e7a5c67..713ac21 100644
--- a/compiler/cpp/Makefile.am
+++ b/compiler/cpp/Makefile.am
@@ -10,7 +10,6 @@
                  src/md5c.c \
                  src/generate/t_generator.cc \
                  src/generate/t_php_generator.cc \
-                 src/generate/t_py_generator.cc \
                  src/generate/t_rb_generator.cc \
                  src/generate/t_xsd_generator.cc \
                  src/generate/t_perl_generator.cc \
@@ -54,6 +53,9 @@
 if THRIFT_GEN_csharp
 thrift_SOURCES += src/generate/t_csharp_generator.cc
 endif
+if THRIFT_GEN_py
+thrift_SOURCES += src/generate/t_py_generator.cc
+endif
 if THRIFT_GEN_cocoa
 thrift_SOURCES += src/generate/t_cocoa_generator.cc
 endif