summaryrefslogtreecommitdiff
path: root/net/tsocks/patches/patch-ab
blob: 58ddf38ebf76b975b8f1ea7bcb4f3ae122c57f78 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
$NetBSD: patch-ab,v 1.4 2006/03/23 16:37:46 joerg Exp $

--- configure.orig	2002-07-15 22:51:08.000000000 +0000
+++ configure
@@ -538,7 +538,6 @@ fi
 
 
 
-test "$libdir" = "\${exec_prefix}/lib" && libdir="/lib"
 
 # Check whether --enable-socksdns or --disable-socksdns was given.
 if test "${enable_socksdns+set}" = set; then
@@ -1375,7 +1374,7 @@ fi
 done
 
 
-for ac_func in strcspn strdup strerror strspn strtol
+for ac_func in strcspn strdup strerror strspn strtol dlopen
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 echo "configure:1382: checking for $ac_func" >&5
@@ -1426,9 +1425,11 @@ if eval "test \"`echo '$ac_cv_func_'$ac_
 EOF
  
 else
+if [ ${ac_func} != "dlopen" ]; then
   echo "$ac_t""no" 1>&6
 { echo "configure: error: "Required function not found"" 1>&2; exit 1; }
 fi
+fi
 done
 
 
@@ -1836,6 +1837,7 @@ fi
 SIMPLELIBS=${LIBS}
 LIBS=
 
+if [ $ac_cv_func_dlopen != "yes" ]; then
 echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
 echo "configure:1841: checking for dlsym in -ldl" >&5
 ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
@@ -1883,6 +1885,7 @@ else
   echo "$ac_t""no" 1>&6
 { echo "configure: error: "libdl is required"" 1>&2; exit 1; }
 fi
+fi
 
 
 echo $ac_n "checking "for RTLD_NEXT from dlfcn.h"""... $ac_c" 1>&6
@@ -2078,12 +2081,16 @@ EOF
 
     echo $ac_n "checking "location of libc.so"""... $ac_c" 1>&6
 echo "configure:2081: checking "location of libc.so"" >&5
+ if test "$OPSYS" != "IRIX"; then
   LIBC=
   for DIR in '/lib' '/usr/lib'; do
     if test "${LIBC}" = ""; then
       LIBC=`$FIND $DIR -name "libc.so.?" 2>/dev/null | $TAIL -1`
     fi
   done
+ else
+  LIBC=/usr/lib$ABI/libc.so
+ fi
 
   cat >> confdefs.h <<EOF
 #define LIBC "${LIBC}"
@@ -2151,6 +2158,7 @@ do
 #line 2152 "configure"
 #include "confdefs.h"
 
+      #include <sys/types.h>
       #include <sys/socket.h>
       int connect($testproto);
     
@@ -2228,7 +2236,7 @@ EOF
 echo $ac_n "checking for correct poll prototype""... $ac_c" 1>&6
 echo "configure:2230: checking for correct poll prototype" >&5
 PROTO=
-for testproto in 'struct pollfd *ufds, unsigned long nfds, int timeout' 
+for testproto in 'struct pollfd *ufds, nfds_t nfds, int timeout' 'struct pollfd *ufds, unsigned int nfds, int timeout'
 do
   if test "${PROTO}" = ""; then
     cat > conftest.$ac_ext <<EOF