diff options
author | Damien Miller <djm@mindrot.org> | 2000-03-05 17:02:45 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-03-05 17:02:45 +1100 |
commit | 65165f8d83f342b1f3664eebb011c6a0ce6215b4 (patch) | |
tree | b1e00767781c90bb0a076af0ed577d02abafaf08 /configure.in | |
parent | 9fb07e4b8baa291d7fda56e8621780cfd1fde287 (diff) |
- Check for libwrap if --with-tcp-wrappers option specified. Suggestion
Mate Wierdl <mw@moni.msci.memphis.edu>
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/configure.in b/configure.in index c9bd33b0..4b5ee92c 100644 --- a/configure.in +++ b/configure.in @@ -699,8 +699,25 @@ AC_ARG_WITH(tcp-wrappers, [ --with-tcp-wrappers Enable tcpwrappers support], [ if test "x$withval" != "$xno" ; then - AC_DEFINE(LIBWRAP) + saved_LIBS="$LIBS" LIBS="$LIBS -lwrap" + AC_MSG_CHECKING(for libwrap) + AC_TRY_LINK( + [ + #include <tcpd.h> + int deny_severity = 0, allow_severity = 0; + ], + [hosts_access(0);], + [ + AC_MSG_RESULT(yes) + AC_DEFINE(LIBWRAP) + ], + [ + AC_MSG_RESULT(no) + AC_MSG_WARN([*** libwrap missing - tcpwrapper support disabled ***]) + LIBS="$saved_LIBS" + ] + ) fi ] ) |