summaryrefslogtreecommitdiff
blob: 67dd22e0531053198189932eb70573f61d224428 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- configure.in.orig	2008-03-10 22:04:41.000000000 +0100
+++ configure.in	2012-01-08 17:59:49.804613011 +0100
@@ -147,11 +147,27 @@
 AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl")
 AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
 AC_SUBST(SOCKETLIBS)
-AC_CHECK_LIB(wrap,main,[
-	LIBWRAPLIBS="$LIBWRAPLIBS -lwrap"
+
+AC_ARG_ENABLE(tcp-wrapper,--enable-tcp-wrapper enables support for TCP wrappers. *** DISABLING IS A SECURITY RISK! *** Read the SECURITY file before using this option! (default: auto),[
+	if test x$enableval = xyes; then
+		enable_tcp_wrapper=yes
+	else
+		enable_tcp_wrapper=no
+	fi
+	],enable_tcp_wrapper="auto")
+
+LIBWRAPLIBS=""
+if test "x$enable_tcp_wrapper" = "xauto"; then
+	AC_CHECK_LIB(wrap,main,[
+		LIBWRAPLIBS="$LIBWRAPLIBS -lwrap"
+		AC_DEFINE(HAVE_LIBWRAP)
+		])
+elif test "x$enable_tcp_wrapper" = "xyes"; then
+	AC_CHECK_LIB(wrap,main,LIBWRAPLIBS="$LIBWRAPLIBS -lwrap",[AC_MSG_ERROR([TCP wrapper library not found])])
 	AC_DEFINE(HAVE_LIBWRAP)
-	])
+fi
 AC_SUBST(LIBWRAPLIBS)
+
 AC_CHECK_FUNCS(strdup strstr strtoul initgroups closesocket)
 
 dnl socklen_t check - from curl