summaryrefslogtreecommitdiff
path: root/security/stunnel/patches/patch-ab
blob: ce313e981da0e0a08a63df91530bb93822780c41 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
$NetBSD: patch-ab,v 1.6 2001/07/23 10:03:10 martin Exp $

--- configure.in.orig	Wed Jul 18 08:55:23 2001
+++ configure.in	Mon Jul 23 11:54:52 2001
@@ -124,12 +124,7 @@
 AC_CHECK_LIB(dl, dlopen)
 AC_CHECK_LIB(nsl, gethostbyname)
 AC_CHECK_LIB(socket, socket)
-AC_CHECK_LIB(pthread, pthread_create)
-# BSD hack
-AC_CHECK_LIB(c_r, pthread_create,
-        [ LIBS="$LIBS -pthread"
-	AC_DEFINE(HAVE_LIBPTHREAD) ]
-)
+# XXX pthread does not work with stunnel on NetBSD
 AC_CHECK_LIB(util, openpty)
 
 
@@ -138,17 +133,19 @@
 AC_ARG_WITH(tcp-wrappers,
 [  --with-tcp-wrappers     Use the libwrap (TCP wrappers) library],
   [
+    saved_LIBS="$LIBS"
     if test "$withval" = "yes"; then
       AC_MSG_RESULT(yes)
       AC_MSG_CHECKING([for hosts_access in -lwrap])
       LIBS="-lwrap $LIBS"
       AC_TRY_LINK([int hosts_access(); int allow_severity, deny_severity;],
         [hosts_access()],
-        [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_LIBWRAP)],
+        [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_LIBWRAP) wrap_LIB="-lwrap"],
 	[AC_MSG_RESULT(not found); exit 1])
     else
       AC_MSG_RESULT(no)
     fi
+    LIBS="$saved_LIBS"
   ],
   [
     AC_MSG_RESULT((default))
@@ -184,7 +181,7 @@
 # AC_HEADER_DIRENT
 # AC_HEADER_STDC
 # AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(getopt.h unistd.h sys/select.h tcpd.h pthread.h pty.h stropts.h)
+AC_CHECK_HEADERS(getopt.h unistd.h sys/select.h tcpd.h pthread.h util.h pty.h stropts.h)
 
 # dnl Checks for typedefs, structures, and compiler characteristics.
 # AC_C_CONST
@@ -202,6 +199,8 @@
 AC_CHECK_SIZEOF(unsigned int)
 AC_CHECK_SIZEOF(unsigned long)
 AC_CHECK_SIZEOF(unsigned long long)
+
+LIBS="$LIBS $wrap_LIB"
 
 AC_OUTPUT(Makefile)