2 # ARG_ENABL_SET(option, help)
3 # ---------------------------
4 # Create a --enable-$1 option with helptext, set a variable $1 to true/false
5 # All $1 are collected in the variable $disabled_by_default
6 AC_DEFUN([ARG_ENABL_SET],
9 AS_HELP_STRING([--enable-$1], [$2]),
10 [patsubst([$1], [-], [_])_given=true
11 if test x$enableval = xyes; then
12 patsubst([$1], [-], [_])=true
14 patsubst([$1], [-], [_])=false
16 [patsubst([$1], [-], [_])=false
17 patsubst([$1], [-], [_])_given=false]
19 disabled_by_default=${disabled_by_default}" patsubst([$1], [-], [_])"]
22 # ARG_DISBL_SET(option, help)
23 # ---------------------------
24 # Create a --disable-$1 option with helptext, set a variable $1 to true/false
25 # All $1 are collected in the variable $enabled_by_default
26 AC_DEFUN([ARG_DISBL_SET],
29 AS_HELP_STRING([--disable-$1], [$2]),
30 [patsubst([$1], [-], [_])_given=true
31 if test x$enableval = xyes; then
32 patsubst([$1], [-], [_])=true
34 patsubst([$1], [-], [_])=false
36 [patsubst([$1], [-], [_])=true
37 patsubst([$1], [-], [_])_given=false]
39 enabled_by_default=${enabled_by_default}" patsubst([$1], [-], [_])"]