blob: 9348f4a356106f5ff89c3513f61381d36a823457 [file] [log] [blame]
David Reissadd584d2008-02-27 01:55:30 +00001dnl @synopsis AX_THRIFT_GEN(SHORT_LANGUAGE, LONG_LANGUAGE, DEFAULT)
David Reissbe5ee7c2008-03-02 07:00:19 +00002dnl @synopsis AX_THRIFT_LIB(SHORT_LANGUAGE, LONG_LANGUAGE, DEFAULT)
David Reissadd584d2008-02-27 01:55:30 +00003dnl
4dnl Allow a particular language generator to be disabled.
David Reissbe5ee7c2008-03-02 07:00:19 +00005dnl Allow a particular language library to be disabled.
David Reissadd584d2008-02-27 01:55:30 +00006dnl
David Reissbe5ee7c2008-03-02 07:00:19 +00007dnl These macros have poor error handling and are poorly documented.
8dnl They are intended only for internal use by the Thrift compiler.
David Reissadd584d2008-02-27 01:55:30 +00009dnl
David Reissadd584d2008-02-27 01:55:30 +000010dnl @version 2008-02-20
11dnl @license AllPermissive
12
13AC_DEFUN([AX_THRIFT_GEN],
14 [
15 AC_ARG_ENABLE([gen-$1],
David Reissb3483d02008-03-02 07:00:15 +000016 AC_HELP_STRING([--enable-gen-$1], [enable the $2 compiler @<:@default=$3@:>@]),
David Reissadd584d2008-02-27 01:55:30 +000017 [ax_thrift_gen_$1="$enableval"],
18 [ax_thrift_gen_$1=$3]
19 )
20 dnl I'd like to run the AM_CONDITIONAL here, but automake likes
21 dnl all AM_CONDITIONALs to be nice and explicit in configure.ac.
22 dnl AM_CONDITIONAL([THRIFT_GEN_$1], [test "$ax_thrift_gen_$1" = "yes"])
23 ])
David Reissbe5ee7c2008-03-02 07:00:19 +000024
25AC_DEFUN([AX_THRIFT_LIB],
26 [
27 AC_ARG_WITH($1,
28 AC_HELP_STRING([--with-$1], [build the $2 library @<:@default=$3@:>@]),
29 [with_$1="$withval"],
30 [with_$1=$3]
31 )
32 dnl What we do here is going to vary from library to library,
33 dnl so we can't really generalize (yet!).
34 ])