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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
$NetBSD: patch-aa,v 1.4 1999/02/10 15:16:46 frueauf Exp $
--- Makefile.orig Wed Sep 6 19:24:02 1995
+++ Makefile Tue Jan 19 15:53:43 1999
@@ -5,7 +5,7 @@
#SOCKS=-DSOCKS
# or
-SOCKS=-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten -Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect
+SOCKS=-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten -Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect -Dunix=1
# If the second definition of SOCKS is used, you MUST also
# define SHORTENED_RBIND
@@ -19,7 +19,7 @@
# It should be this current directory.
# If your system has getcwd() but no getwd(), uncomment the next line:
-#GETCWD=-DGETCWD
+GETCWD=-DGETCWD
#If your system doesn't have waitpid(), uncomment the nextline:
#NO_WAITPID=-DNO_WAITPID
@@ -43,16 +43,16 @@
# Define RCMD and SUPPORT_RCMD if you want to support Rrcmd, which is required
# for SOCKSified rlogin, rsh, and rcp.
-#RCMD=Rrcmd.o
-#SUPPORT_RCMD=-DSUPPORT_RCMD
+RCMD=Rrcmd.o
+SUPPORT_RCMD=-DSUPPORT_RCMD
# Define FOR_PS if your system is not SYSV and you want to have the
# command 'ps' show some details of sockd's activity.
#FOR_PS=-DFOR_PS
# optimization flag for cc
-OPTIMIZE=-g
-#OPTIMIZE=-O
+#OPTIMIZE=-g
+OPTIMIZE=-O
# Be careful with the OPTIMIZE flag. SunPro's SC2.0.1, for example, is
# knwon to produce incorrect code when -O is used.
@@ -73,13 +73,13 @@
#BIND_RESOLVER=-DBIND_RESOLVER
# Directory into which to install the man pages
-MAN_DEST_DIR = /usr/local/man
+MAN_DEST_DIR = ${PREFIX}/man
# Directory into which the SOCKS server should be installed
-SERVER_BIN_DIR = /usr/etc
+SERVER_BIN_DIR = ${PREFIX}/libexec
# Directory into the client programs should be installed
-CLIENTS_BIN_DIR = /usr/local/bin
+CLIENTS_BIN_DIR = ${PREFIX}/bin
# SunOS 4.1.x should use
#CC=cc
@@ -103,13 +103,13 @@
#GETPASS=getpass.o
# IRIX 5 should use
-CC=cc
-RESOLV_LIB=-lsun
-OTHER_CFLAGS=-cckr $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT -DSVR3 -DNCARGS=`sysconf ARG_MAX` -D_BSD_SIGNALS $(TRY_PASV)
-RANLIB=/bin/true
-OS=irix5
-INSTALL=bsdinstall
-GETPASS=getpass.o
+#CC=cc
+#RESOLV_LIB=-lsun
+#OTHER_CFLAGS=-cckr $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT -DSVR3 -DNCARGS=`sysconf ARG_MAX` -D_BSD_SIGNALS $(TRY_PASV)
+#RANLIB=/bin/true
+#OS=irix5
+#INSTALL=bsdinstall
+#GETPASS=getpass.o
# Ultrix 4.0 should use
#CC=cc
@@ -174,13 +174,13 @@
#RESOLV_LIB=-linet -lc_s
# netBSD should use
-#OTHER_CFLAGS = $(GETCWD) $(SHORTENED_RBIND) $(FASCIST) $(TRY_PASV)
-#CC=cc
-#RANLIB=ranlib
-#OS=netbsd0.9
-#INSTALL=install
-#GETPASS=
-#RESOLV_LIB=
+OTHER_CFLAGS = $(GETCWD) $(SHORTENED_RBIND) $(FASCIST) $(TRY_PASV) -Dunix=1
+CC=cc
+RANLIB=ranlib
+OS=netbsd0.9
+INSTALL=install -c
+GETPASS=
+RESOLV_LIB=
# FreeBSD should use:
#CC=cc
@@ -413,3 +413,11 @@
( cd $$i ; $(MAKE) clean) done
+install.conf:
+ ${INSTALL} -m 0644 socks.conf ${PREFIX}/etc
+
+install.lib:
+ ${INSTALL} -m 0644 lib/libsocks.a ${PREFIX}/lib/libsocks4.a
+ ${RANLIB} ${PREFIX}/lib/libsocks4.a
+
+install: install.server install.clients install.man install.conf install.lib
|