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