blob: c2008697f23bf7c64d56b622a504dddf7bc5c338 [file] [log] [blame]
David Reissadd584d2008-02-27 01:55:30 +00001dnl @synopsis AX_THRIFT_GEN(SHORT_LANGUAGE, LONG_LANGUAGE, DEFAULT)
2dnl
3dnl Allow a particular language generator to be disabled.
4dnl
5dnl This macro has poor error handling and is poorly documented.
6dnl It is intended only for internal use by the Thrift compiler.
7dnl
8dnl @author David Reiss <dreiss@facebook.com>
9dnl @version 2008-02-20
10dnl @license AllPermissive
11
12AC_DEFUN([AX_THRIFT_GEN],
13 [
14 AC_ARG_ENABLE([gen-$1],
15 AC_HELP_STRING([--enable-gen-$1], [Enable the $2 compiler. Default is $3]),
16 [ax_thrift_gen_$1="$enableval"],
17 [ax_thrift_gen_$1=$3]
18 )
19 dnl I'd like to run the AM_CONDITIONAL here, but automake likes
20 dnl all AM_CONDITIONALs to be nice and explicit in configure.ac.
21 dnl AM_CONDITIONAL([THRIFT_GEN_$1], [test "$ax_thrift_gen_$1" = "yes"])
22 ])