summaryrefslogtreecommitdiff
path: root/aclocal
diff options
context:
space:
mode:
authorDavid Reiss <dreiss@apache.org>2008-02-27 01:55:30 +0000
committerDavid Reiss <dreiss@apache.org>2008-02-27 01:55:30 +0000
commitadd584d8f957347c0b5394a9562181a87d4eb468 (patch)
treec66147a661b539bc0cbbff933e75e8e69b7f46a4 /aclocal
parent771f8c797b1920919aadcb63d9e1dab3cd1905f6 (diff)
downloadthrift-add584d8f957347c0b5394a9562181a87d4eb468.tar.gz
Infrastructure for excluding code generators from the Thrift compiler.
Add a new autoconf macro (a thin wrapper around AC_ARG_ENABLE) that makes it pretty easy to include or exclude specific code genreators. This will be tested along with future changes that use it. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665515 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'aclocal')
-rw-r--r--aclocal/ax_thrift_gen.m422
1 files changed, 22 insertions, 0 deletions
diff --git a/aclocal/ax_thrift_gen.m4 b/aclocal/ax_thrift_gen.m4
new file mode 100644
index 000000000..c2008697f
--- /dev/null
+++ b/aclocal/ax_thrift_gen.m4
@@ -0,0 +1,22 @@
+dnl @synopsis AX_THRIFT_GEN(SHORT_LANGUAGE, LONG_LANGUAGE, DEFAULT)
+dnl
+dnl Allow a particular language generator to be disabled.
+dnl
+dnl This macro has poor error handling and is poorly documented.
+dnl It is intended only for internal use by the Thrift compiler.
+dnl
+dnl @author David Reiss <dreiss@facebook.com>
+dnl @version 2008-02-20
+dnl @license AllPermissive
+
+AC_DEFUN([AX_THRIFT_GEN],
+ [
+ AC_ARG_ENABLE([gen-$1],
+ AC_HELP_STRING([--enable-gen-$1], [Enable the $2 compiler. Default is $3]),
+ [ax_thrift_gen_$1="$enableval"],
+ [ax_thrift_gen_$1=$3]
+ )
+ dnl I'd like to run the AM_CONDITIONAL here, but automake likes
+ dnl all AM_CONDITIONALs to be nice and explicit in configure.ac.
+ dnl AM_CONDITIONAL([THRIFT_GEN_$1], [test "$ax_thrift_gen_$1" = "yes"])
+ ])