summaryrefslogtreecommitdiff
path: root/aclocal
diff options
context:
space:
mode:
authorDavid Reiss <dreiss@apache.org>2008-03-02 07:00:19 +0000
committerDavid Reiss <dreiss@apache.org>2008-03-02 07:00:19 +0000
commitbe5ee7c191ec125c80f4221c3231b254b3bcb145 (patch)
tree9a1b87dc4d2bf00536018adb1216b7ea4ab7a77d /aclocal
parentb3483d0b2c7fbf923a63d6f138ada8d2fc53cbab (diff)
downloadthrift-be5ee7c191ec125c80f4221c3231b254b3bcb145.tar.gz
Infrastructure for excluding language libraries from the build.
Add a new autoconf macro (a thin wrapper around AC_ARG_WITH) that makes it pretty easy to include or exclude specific language libraries. This will be tested along with future changes that use it. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665544 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'aclocal')
-rw-r--r--aclocal/ax_thrift_gen.m417
1 files changed, 15 insertions, 2 deletions
diff --git a/aclocal/ax_thrift_gen.m4 b/aclocal/ax_thrift_gen.m4
index 51661fca5..e0e6dad6c 100644
--- a/aclocal/ax_thrift_gen.m4
+++ b/aclocal/ax_thrift_gen.m4
@@ -1,9 +1,11 @@
dnl @synopsis AX_THRIFT_GEN(SHORT_LANGUAGE, LONG_LANGUAGE, DEFAULT)
+dnl @synopsis AX_THRIFT_LIB(SHORT_LANGUAGE, LONG_LANGUAGE, DEFAULT)
dnl
dnl Allow a particular language generator to be disabled.
+dnl Allow a particular language library 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 These macros have poor error handling and are poorly documented.
+dnl They are intended only for internal use by the Thrift compiler.
dnl
dnl @author David Reiss <dreiss@facebook.com>
dnl @version 2008-02-20
@@ -20,3 +22,14 @@ AC_DEFUN([AX_THRIFT_GEN],
dnl all AM_CONDITIONALs to be nice and explicit in configure.ac.
dnl AM_CONDITIONAL([THRIFT_GEN_$1], [test "$ax_thrift_gen_$1" = "yes"])
])
+
+AC_DEFUN([AX_THRIFT_LIB],
+ [
+ AC_ARG_WITH($1,
+ AC_HELP_STRING([--with-$1], [build the $2 library @<:@default=$3@:>@]),
+ [with_$1="$withval"],
+ [with_$1=$3]
+ )
+ dnl What we do here is going to vary from library to library,
+ dnl so we can't really generalize (yet!).
+ ])