summaryrefslogtreecommitdiffstats
path: root/m4/acx_libwrap.m4
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-08-18 23:52:44 +0200
committerLennart Poettering <lennart@poettering.net>2008-08-18 23:52:44 +0200
commit3d2d6ca958719c03fa541dda48037501919a55de (patch)
treec0e378f622f2e65b2bf5e622ae94bd6de03b4d6a /m4/acx_libwrap.m4
parent46f0f9ed8bb2cda7c1f19b5d900e2954d7aa1f27 (diff)
parent016fcd92d412cb453a062b69053bc49a742fff56 (diff)
Merge commit 'flameeyes/autoconf-2.62'
Diffstat (limited to 'm4/acx_libwrap.m4')
-rw-r--r--m4/acx_libwrap.m419
1 files changed, 19 insertions, 0 deletions
diff --git a/m4/acx_libwrap.m4 b/m4/acx_libwrap.m4
new file mode 100644
index 00000000..e1602144
--- /dev/null
+++ b/m4/acx_libwrap.m4
@@ -0,0 +1,19 @@
+AC_DEFUN([ACX_LIBWRAP], [
+LIBWRAP_LIBS=
+saved_LIBS="$LIBS"
+LIBS="$LIBS -lwrap"
+AC_MSG_CHECKING([for tcpwrap library and headers])
+AC_LINK_IFELSE(
+AC_LANG_PROGRAM(
+[#include <tcpd.h>
+#include <syslog.h>
+int allow_severity = LOG_INFO;
+int deny_severity = LOG_WARNING;],
+[struct request_info *req;
+return hosts_access (req);]),
+[AC_DEFINE(HAVE_LIBWRAP, [], [Have tcpwrap?])
+LIBWRAP_LIBS="-lwrap"
+AC_MSG_RESULT(yes)],
+[AC_MSG_RESULT(no)])
+LIBS="$saved_LIBS"
+])