1# SYNOPSIS
2#
3#   AMANDA_BSDUDP_SECURITY
4#
5# OVERVIEW
6#
7#   Handle configuration for BSDUDP security, implementing the
8#   --with-bsdudp-security option.
9#
10#   Defines and substitutes BSDUDP_SECURITY, and sets AM_CONDITIONAL
11#   WANT_BSDUDP_SECURITY, if the user has selected this mechanism.
12#
13AC_DEFUN([AMANDA_BSDUDP_SECURITY],
14[
15    BSDUDP_SECURITY="no"
16    AC_ARG_WITH(bsdudp-security,
17        AS_HELP_STRING([--with-bsdudp-security],
18                [include BSDUDP authentication]),
19        [
20            case "$withval" in
21                n | no) : ;;
22                y |  ye | yes) BSDUDP_SECURITY=yes ;;
23                *) AC_MSG_ERROR([*** You must not supply an argument to --with-bsdudp-security.])
24              ;;
25            esac
26        ],
27    )
28
29    if test "x$BSDUDP_SECURITY" = "xyes"; then
30        AC_DEFINE(BSDUDP_SECURITY,1,
31            [Define if BSDUDP transport should be enabled.])
32    fi
33
34    AM_CONDITIONAL(WANT_BSDUDP_SECURITY, test x"$BSDUDP_SECURITY" = x"yes")
35    AC_SUBST(BSDUDP_SECURITY)
36])
37