]> arthur.barton.de Git - netatalk.git/blob - macros/tcp-wrappers.m4
apply parts of the netbsd build patch by Patrick Welche <prlw1@newn.cam.ac.uk>, mostl...
[netatalk.git] / macros / tcp-wrappers.m4
1 dnl $Id: tcp-wrappers.m4,v 1.2 2004-01-14 16:10:29 bfernhomberg Exp $
2
3 AC_DEFUN([NETATALK_TCP_WRAPPERS], [
4         check=maybe
5         AC_ARG_ENABLE(tcp-wrappers,
6                 [  --disable-tcp-wrappers  disable TCP wrappers support],
7                 [
8                         if test "x$enableval" = "xno"; then
9                                 check=no
10                         else
11                                 check=yes
12                         fi
13                 ]
14         )
15
16         enable=no
17         if test "x$check" != "xno"; then
18                 AC_CHECK_LIB(wrap, tcpd_warn, enable=yes)
19         fi
20
21         AC_MSG_CHECKING([whether to enable the TCP wrappers])
22         if test "x$enable" = "xyes"; then
23                 AC_DEFINE(TCPWRAP, 1, [Define if TCP wrappers should be used])
24                 WRAP_LIBS="-lwrap"
25                 AC_MSG_RESULT([yes])
26         else
27                 if test "x$check" = "xyes"; then
28                         AC_MSG_ERROR([libwrap not found])
29                 else
30                         AC_MSG_RESULT([no])
31                 fi
32         fi
33
34         AC_SUBST(WRAP_LIBS)
35 ])