1AC_DEFUN([AX_ARG_DEFAULT_ENABLE], [
2AC_ARG_ENABLE([$1], AS_HELP_STRING([--disable-$1], [$2 (default is ENABLED)]))
3AX_PARSE_VALUE([$1], [y])
4])
5
6AC_DEFUN([AX_ARG_DEFAULT_DISABLE], [
7AC_ARG_ENABLE([$1], AS_HELP_STRING([--enable-$1], [$2 (default is DISABLED)]))
8AX_PARSE_VALUE([$1], [n])
9])
10
11dnl This function should not be called outside of this file
12AC_DEFUN([AX_PARSE_VALUE], [
13AS_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
21AC_SUBST($1)])
22