@@ -593,6 +593,28 @@ if test "$enable_tutorial" = "no"; then
593593fi
594594AM_CONDITIONAL(WITH_TUTORIAL, [ test "$have_tutorial" = "yes"] )
595595
596+ AC_ARG_ENABLE ( [ contrib] ,
597+ AS_HELP_STRING ( [ --enable-contrib] , [ build contrib [ default=yes] ] ) ,
598+ [ ] , enable_contrib=yes
599+ )
600+ have_contrib=yes
601+ if test "$enable_contrib" = "no"; then
602+ have_contrib="no"
603+ fi
604+ AM_CONDITIONAL(WITH_CONTRIB, [ test "$have_contrib" = "yes"] )
605+
606+ AC_ARG_WITH ( [ maven-plugin] ,
607+ [ AS_HELP_STRING ( [ --with-maven-plugin] , [ build the Maven plugin [ default=yes] ] ) ] ,
608+ [ with_maven_plugin="$withval"] , [ with_maven_plugin="yes"] )
609+ have_maven_plugin="no"
610+ if test "$enable_contrib" = "yes" -a "$with_maven_plugin" = "yes"; then
611+ AC_PATH_PROG ( [ MAVEN] , [ mvn] )
612+ if [ [ -x "$MAVEN" ] ] ; then
613+ AX_PROG_MAVEN_VERSION([ 3.0.0] , have_maven_plugin="yes", have_maven_plugin="no")
614+ fi
615+ fi
616+ AM_CONDITIONAL(WITH_MAVEN_PLUGIN, [ test "$have_maven_plugin" = "yes"] )
617+
596618AM_CONDITIONAL(MINGW, false)
597619case "${host_os}" in
598620*mingw*)
@@ -769,6 +791,8 @@ AC_CONFIG_FILES([
769791 compiler/cpp/Makefile
770792 compiler/cpp/src/Makefile
771793 compiler/cpp/test/Makefile
794+ contrib/Makefile
795+ contrib/thrift-maven-plugin/Makefile
772796 lib/Makefile
773797 lib/cl/Makefile
774798 lib/cpp/Makefile
@@ -929,6 +953,7 @@ echo "Building Py3 Library ......... : $have_py3"
929953echo "Building Ruby Library ........ : $have_ruby"
930954echo "Building Rust Library ........ : $have_rs"
931955echo "Building Swift Library ....... : $have_swift"
956+ echo "Building Maven Plugin ........ : $have_maven_plugin"
932957
933958if test "$have_c_glib" = "yes" ; then
934959 echo
@@ -1064,6 +1089,12 @@ if test "$have_swift" = "yes" ; then
10641089 echo " Using Swift ............... : $SWIFT"
10651090 echo " Using Swift version ....... : $($SWIFT --version | head -1)"
10661091fi
1092+ if test "$have_maven_plugin" = "yes" ; then
1093+ echo
1094+ echo "Maven Plugin:"
1095+ echo " Using Maven ............... : $MAVEN"
1096+ echo " Using Maven version ....... : $($MAVEN --version --quiet)"
1097+ fi
10671098echo
10681099echo "If something is missing that you think should be present,"
10691100echo "please skim the output of configure to find the missing"
0 commit comments