summaryrefslogtreecommitdiff
path: root/security/stunnel/patches/patch-ab
blob: 38a24c9120cd580213c6d5a4cd71150db5d5738f (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
58
59
60
61
62
$NetBSD: patch-ab,v 1.5 2001/07/19 12:22:17 martin Exp $

--- configure.in.orig	Sun Jul 15 14:43:33 2001
+++ configure.in	Thu Jul 19 14:02:22 2001
@@ -108,21 +108,24 @@
 fi
 
 dnl Check for libwrap library.
+wrap_LIB=
 AC_MSG_CHECKING(whether to use the libwrap library)
 AC_ARG_WITH(tcp-wrappers,
 [  --with-tcp-wrappers     Use the libwrap 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))
@@ -154,12 +157,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)
 
 dnl Add SSL includes and libraries
@@ -182,7 +180,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
@@ -200,6 +198,8 @@
 AC_CHECK_SIZEOF(unsigned int)
 AC_CHECK_SIZEOF(unsigned long)
 AC_CHECK_SIZEOF(unsigned long long)
+
+LIBS="$LIBS $wrap_LIB"
 
 AC_OUTPUT(Makefile)