summaryrefslogtreecommitdiffstats
path: root/main/arpwatch/02_all_arpwatch-2.1a15-srcdir.patch
blob: 3ab59fcb2ae418dfafddbb90e7b39708b923e901 (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
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
Patch for aclocal, Makefile.in, configure.in to handle srcdir correctly.

diff -Naru arpwatch-2.1a15.orig/aclocal.m4 arpwatch-2.1a15/aclocal.m4
--- arpwatch-2.1a15.orig/aclocal.m4	2006-03-28 11:55:40.000000000 +0400
+++ arpwatch-2.1a15/aclocal.m4	2006-09-22 16:16:24.000000000 +0400
@@ -50,7 +50,7 @@
     $1="-O"
     $2=""
     if test "${srcdir}" != "." ; then
-	    $2="-I\$\(srcdir\)"
+	    $2="-I\$(srcdir)"
     fi
     if test "${CFLAGS+set}" = set; then
 	    LBL_CFLAGS="$CFLAGS"
diff -Naru arpwatch-2.1a15.orig/configure.in arpwatch-2.1a15/configure.in
--- arpwatch-2.1a15.orig/configure.in	2006-06-22 00:34:29.000000000 +0400
+++ arpwatch-2.1a15/configure.in	2006-09-22 16:16:24.000000000 +0400
@@ -143,17 +143,17 @@
 	AC_DEFINE(HAVE_DN_SKIPNAME)
 fi
 
-if test -f .devel ; then
+if test -f $srcdir/.devel ; then
 	AC_DEFINE(LBL)
 fi
 
-if test -r lbl/gnuc.h ; then
-	rm -f gnuc.h
-	ln -s lbl/gnuc.h gnuc.h
+if test -r $srcdir/lbl/gnuc.h ; then
+	rm -f $srcdir/gnuc.h
+	ln -s lbl/gnuc.h $srcdir/gnuc.h 
 fi
 
-if test ! -r addresses.h ; then
-	cp addresses.h.in addresses.h
+if test ! -r $srcdir/addresses.h ; then
+	cp $srcdir/addresses.h.in $srcdir/addresses.h
 fi
 
 AC_SUBST(V_CCOPT)
@@ -166,12 +166,12 @@
 
 AC_OUTPUT(Makefile)
 
-if test ! -f arp.dat ; then
+if test ! -f $srcdir/arp.dat ; then
 	echo 'creating empty arp.dat file'
-	touch arp.dat
+	touch $srcdir/arp.dat
 fi
 
-if test -f .devel ; then
+if test -f $srcdir/.devel ; then
 	make depend
 fi
 exit 0
diff -Naru arpwatch-2.1a15.orig/configure.in.orig arpwatch-2.1a15/configure.in.orig
--- arpwatch-2.1a15.orig/configure.in.orig	1970-01-01 03:00:00.000000000 +0300
+++ arpwatch-2.1a15/configure.in.orig	2006-06-22 00:34:29.000000000 +0400
@@ -0,0 +1,177 @@
+dnl @(#) $Header: /usr/src/local/sbin/arpwatch/RCS/configure.in,v 1.35 2006/06/21 20:34:27 leres Exp $ (LBL)
+dnl
+dnl Copyright (c) 1994, 1995, 1996, 1997, 1998, 2000, 2006
+dnl	The Regents of the University of California.  All rights reserved.
+dnl
+dnl Process this file with autoconf to produce a configure script.
+dnl
+
+AC_INIT(arpwatch.c)
+
+AC_CANONICAL_SYSTEM
+
+umask 002
+
+if test -z "$PWD" ; then
+	PWD=`pwd`
+fi
+
+AC_LBL_C_INIT(V_CCOPT, V_INCLS)
+
+AC_CHECK_HEADERS(fcntl.h memory.h)
+AC_HEADER_TIME
+
+AC_REPLACE_FUNCS(bcopy strerror)
+
+dnl The following generates a warning from autoconf...
+AC_C_BIGENDIAN
+
+AC_LBL_TYPE_SIGNAL
+AC_LBL_UNION_WAIT
+
+AC_CHECK_LIB(resolv, res_query)
+AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS)
+
+AC_PATH_PROG(V_SENDMAIL, sendmail, /usr/lib/sendmail,
+    $PATH:/usr/sbin:/usr/lib:/usr/bin:/usr/ucblib:/usr/local/etc)
+
+case "$target_os" in
+
+linux*)
+	V_INCLS="$V_INCLS -Ilinux-include"
+	;;
+
+osf3*)
+	# workaround around ip_hl vs. ip_vhl problem in netinet/ip.h
+	AC_DEFINE(__STDC__,2)
+	;;
+esac
+
+AC_LBL_CHECK_TYPE
+
+AC_LBL_DEVEL(V_CCOPT)
+
+AC_MSG_CHECKING(if ether_header uses ether_addr structs)
+AC_CACHE_VAL(ac_cv_ether_header_has_ea,
+    LBL_SAVE_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS $V_INCLS"
+    AC_TRY_COMPILE([
+#	include <sys/types.h>
+#	if __STDC__
+	/* osf3 has REALLY good prototyes */
+	struct mbuf;
+	struct rtentry;
+#	endif
+#	include <sys/socket.h>
+#	include <net/if.h>
+#	include <netinet/in.h>
+#	include <netinet/if_ether.h>],
+	[u_int i =
+	    sizeof(((struct ether_header *)0)->ether_dhost.ether_addr_octet)],
+	ac_cv_ether_header_has_ea=yes,
+	ac_cv_ether_header_has_ea=no)
+    CFLAGS="$LBL_SAVE_CFLAGS")
+AC_MSG_RESULT($ac_cv_ether_header_has_ea)
+if test $ac_cv_ether_header_has_ea = yes ; then
+	AC_DEFINE(ETHER_HEADER_HAS_EA)
+fi
+
+AC_MSG_CHECKING(if ether_arp uses ether_addr structs)
+AC_CACHE_VAL(ac_cv_ether_arp_has_ea,
+    LBL_SAVE_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS $V_INCLS"
+    AC_TRY_COMPILE([
+#	include <sys/types.h>
+#	if __STDC__
+	/* osf3 has REALLY good prototyes */
+	struct mbuf;
+	struct rtentry;
+#	endif
+#	include <sys/socket.h>
+#	include <net/if.h>
+#	include <netinet/in.h>
+#	include <netinet/if_ether.h>],
+	[u_int i =
+	    sizeof(((struct ether_arp *)0)->arp_sha.ether_addr_octet)],
+	ac_cv_ether_arp_has_ea=yes,
+	ac_cv_ether_arp_has_ea=no)
+    CFLAGS="$LBL_SAVE_CFLAGS")
+AC_MSG_RESULT($ac_cv_ether_arp_has_ea)
+if test $ac_cv_ether_arp_has_ea = yes ; then
+	AC_DEFINE(ETHER_ARP_HAS_EA)
+fi
+
+AC_MSG_CHECKING(if ether_arp uses erp_xsha member)
+AC_CACHE_VAL(ac_cv_struct_ether_arp_x,
+    LBL_SAVE_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS $V_INCLS"
+    AC_TRY_COMPILE([
+#	include <sys/types.h>
+#	include <sys/socket.h>
+#	if __STDC__
+	/* osf3 has REALLY good prototyes */
+	struct mbuf;
+	struct rtentry;
+#	endif
+#	include <net/if.h>
+#	include <netinet/in.h>
+#	include <netinet/if_ether.h>],
+	[u_int i = sizeof( ((struct ether_arp *)0)->arp_xsha)],
+	ac_cv_struct_ether_arp_x=yes,
+	ac_cv_struct_ether_arp_x=no)
+    CFLAGS="$LBL_SAVE_CFLAGS")
+AC_MSG_RESULT($ac_cv_struct_ether_arp_x)
+if test $ac_cv_struct_ether_arp_x = yes ; then
+	AC_DEFINE(ETHER_ARP_HAS_X)
+fi
+
+dnl
+dnl bind 8 does some routine name renaming so we must test specially
+dnl
+AC_MSG_CHECKING(for dn_skipname)
+AC_CACHE_VAL(ac_cv_have_dn_skipname,
+    AC_TRY_LINK([
+#	include <sys/types.h>
+#	include <netinet/in.h>
+#	include <arpa/nameser.h>
+#	include <resolv.h>],
+	[(void)dn_skipname(0, 0);],
+	ac_cv_have_dn_skipname=yes,
+	ac_cv_have_dn_skipname=no))
+AC_MSG_RESULT($ac_cv_have_dn_skipname)
+if test $ac_cv_have_dn_skipname = yes ; then
+	AC_DEFINE(HAVE_DN_SKIPNAME)
+fi
+
+if test -f .devel ; then
+	AC_DEFINE(LBL)
+fi
+
+if test -r lbl/gnuc.h ; then
+	rm -f gnuc.h
+	ln -s lbl/gnuc.h gnuc.h
+fi
+
+if test ! -r addresses.h ; then
+	cp addresses.h.in addresses.h
+fi
+
+AC_SUBST(V_CCOPT)
+AC_SUBST(V_INCLS)
+AC_SUBST(V_PCAPDEP)
+AC_SUBST(V_SENDMAIL)
+AC_SUBST(LBL_LIBS)
+
+AC_PROG_INSTALL
+
+AC_OUTPUT(Makefile)
+
+if test ! -f arp.dat ; then
+	echo 'creating empty arp.dat file'
+	touch arp.dat
+fi
+
+if test -f .devel ; then
+	make depend
+fi
+exit 0
diff -Naru arpwatch-2.1a15.orig/Makefile.in arpwatch-2.1a15/Makefile.in
--- arpwatch-2.1a15.orig/Makefile.in	2000-06-15 04:39:55.000000000 +0400
+++ arpwatch-2.1a15/Makefile.in	2006-09-22 16:16:24.000000000 +0400
@@ -104,7 +104,7 @@
 version.o: version.c
 version.c: $(srcdir)/VERSION
 	@rm -f $@
-	sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
+	sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $(srcdir)/$@
 
 zap: zap.o intoa.o
 	$(CC) $(CFLAGS) -o $@ zap.o intoa.o -lutil