1 |
jmc |
1.1 |
dnl libwrap.m4 --- do we have libwrap, the access control library? |
2 |
|
|
dnl $Id: libwrap.m4,v 1.6 2002/08/21 15:03:19 rjs3 Exp $ |
3 |
|
|
|
4 |
|
|
AC_DEFUN(CMU_LIBWRAP, [ |
5 |
|
|
AC_REQUIRE([CMU_SOCKETS]) |
6 |
|
|
AC_ARG_WITH(libwrap, |
7 |
|
|
[ --with-libwrap=DIR use libwrap (rooted in DIR) [yes] ], |
8 |
|
|
with_libwrap=$withval, with_libwrap=yes) |
9 |
|
|
if test "$with_libwrap" != no; then |
10 |
|
|
if test -d "$with_libwrap"; then |
11 |
|
|
CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include" |
12 |
|
|
LDFLAGS="$LDFLAGS -L${with_libwrap}/lib" |
13 |
|
|
fi |
14 |
|
|
cmu_save_LIBS="$LIBS" |
15 |
|
|
AC_CHECK_LIB(wrap, request_init, [ |
16 |
|
|
AC_CHECK_HEADER(tcpd.h,, with_libwrap=no)], |
17 |
|
|
with_libwrap=no, ${LIB_SOCKET}) |
18 |
|
|
LIBS="$cmu_save_LIBS" |
19 |
|
|
fi |
20 |
|
|
AC_MSG_CHECKING(libwrap support) |
21 |
|
|
AC_MSG_RESULT($with_libwrap) |
22 |
|
|
LIB_WRAP="" |
23 |
|
|
if test "$with_libwrap" != no; then |
24 |
|
|
AC_DEFINE(HAVE_LIBWRAP) |
25 |
|
|
LIB_WRAP="-lwrap" |
26 |
|
|
AC_CHECK_LIB(nsl, yp_get_default_domain, LIB_WRAP="${LIB_WRAP} -lnsl") |
27 |
|
|
fi |
28 |
|
|
AC_SUBST(LIB_WRAP) |
29 |
|
|
]) |