]> git.ipfire.org Git - thirdparty/pdns.git/blob - m4/ax_arg_default_enable_disable.m4
Merge pull request #13197 from rgacogne/remove-arc4random-warning
[thirdparty/pdns.git] / m4 / ax_arg_default_enable_disable.m4
1 AC_DEFUN([AX_ARG_DEFAULT_ENABLE], [
2 AC_ARG_ENABLE([$1], AS_HELP_STRING([--disable-$1], [$2 (default is ENABLED$3)]))
3 AX_PARSE_VALUE([$1], [y])
4 ])
5
6 AC_DEFUN([AX_ARG_DEFAULT_DISABLE], [
7 AC_ARG_ENABLE([$1], AS_HELP_STRING([--enable-$1], [$2 (default is DISABLED$3)]))
8 AX_PARSE_VALUE([$1], [n])
9 ])
10
11 dnl This function should not be called outside of this file
12 AC_DEFUN([AX_PARSE_VALUE], [
13 AS_IF([test "x$enable_$1" = "xno"], [
14 ax_cv_$1="n"
15 ], [test "x$enable_$1" = "xyes"], [
16 ax_cv_$1="y"
17 ], [test -z $ax_cv_$1], [
18 ax_cv_$1="$2"
19 ])
20 $1=$ax_cv_$1
21 AC_SUBST($1)])