]> arthur.barton.de Git - netatalk.git/blob - macros/tcp-wrappers.m4
big merge for db frontend and unicode.
[netatalk.git] / macros / tcp-wrappers.m4
1 dnl $Id: tcp-wrappers.m4,v 1.1.4.1 2003-09-09 16:42:22 didg 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         AC_MSG_CHECKING([whether to enable the TCP wrappers])
28         if test "x$enable" == "xyes"; then
29                 AC_DEFINE(TCPWRAP, 1, [Define if TCP wrappers should be used])
30                 WRAP_LIBS="-lwrap"
31                 AC_MSG_RESULT([yes])
32         else
33                 if test "x$check" == "xyes"; then
34                         AC_MSG_ERROR([libwrap not found])
35                 else
36                         AC_MSG_RESULT([no])
37                 fi
38         fi
39
40         AC_SUBST(WRAP_LIBS)
41 ])