Add a getter for the HTTP referer
[strongswan.git] / m4 / macros / enable-disable.m4
1
2 # ARG_ENABL_SET(option, help)
3 # ---------------------------
4 # Create a --enable-$1 option with helptext, set a variable $1 to true/false
5 AC_DEFUN([ARG_ENABL_SET],
6         [AC_ARG_ENABLE(
7                 [$1],
8                 AS_HELP_STRING([--enable-$1], [$2]),
9                 [if test x$enableval = xyes; then
10                         patsubst([$1], [-], [_])=true
11                  else
12                         patsubst([$1], [-], [_])=false
13                 fi],
14                 patsubst([$1], [-], [_])=false
15         )]
16 )
17
18 # ARG_DISBL_SET(option, help)
19 # ---------------------------
20 # Create a --disable-$1 option with helptext, set a variable $1 to true/false
21 AC_DEFUN([ARG_DISBL_SET],
22         [AC_ARG_ENABLE(
23                 [$1],
24                 AS_HELP_STRING([--disable-$1], [$2]),
25                 [if test x$enableval = xyes; then
26                         patsubst([$1], [-], [_])=true
27                  else
28                         patsubst([$1], [-], [_])=false
29                 fi],
30                 patsubst([$1], [-], [_])=true
31         )]
32 )