+# Check whether --enable-tcpd or --disable-tcpd was given.
+if test "${enable_tcpd+set}" = set; then
+ enableval="$enable_tcpd"
+ :
+fi
+
+if test "$enable_tcpd" = "yes"; then
+ echo $ac_n "checking for working tcpd.h""... $ac_c" 1>&6
+echo "configure:1315: checking for working tcpd.h" >&5
+ oldLibs=$LIBS
+ LIBS="$LIBS -lwrap"
+ cat > conftest.$ac_ext <<EOF
+#line 1319 "configure"
+#include "confdefs.h"
+#include <syslog.h>
+ #include <tcpd.h>
+ int allow_severity = LOG_INFO;
+ int deny_severity = LOG_WARNING;
+int main() {
+struct request_info request_info; int i;
+ i = hosts_access(&request_info);
+; return 0; }
+EOF
+if { (eval echo configure:1330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ tcpd_ok=1
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ tcpd_ok=0
+fi
+rm -f conftest*
+ if test "$tcpd_ok" = "0"; then
+ echo "$ac_t""no" 1>&6
+ LIBS=$oldLibs
+ else
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_TCPD_H 1
+EOF
+
+ fi
+fi