]> arthur.barton.de Git - netatalk.git/blob - macros/tcp-wrappers.m4
Add a patch folder for stuff not included in CVS.
[netatalk.git] / macros / tcp-wrappers.m4
1 dnl $Id: tcp-wrappers.m4,v 1.1.4.3 2004-01-03 01:49:54 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         if test "x$enable" = "xyes"; then
21                 AC_CHECK_HEADERS(tcpd.h)
22                 if test "x$ac_cv_header_tcpd_h" != "xyes"; then
23                         enable=no
24                 fi
25         fi
26
27         netatalk_cv_tcpwrap=no
28         AC_MSG_CHECKING([whether to enable the TCP wrappers])
29         if test "x$enable" = "xyes"; then
30                 AC_DEFINE(TCPWRAP, 1, [Define if TCP wrappers should be used])
31                 WRAP_LIBS="-lwrap"
32                 netatalk_cv_tcpwrap=yes
33                 AC_MSG_RESULT([yes])
34         else
35                 if test "x$check" = "xyes"; then
36                         AC_MSG_ERROR([libwrap not found])
37                 else
38                         AC_MSG_RESULT([no])
39                 fi
40         fi
41
42         AC_SUBST(WRAP_LIBS)
43 ])