aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/hping/files/hping2_configure.patch
blob: 90795ab0e04d9f275d08dd5290afcfe93e58fbb8 (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
Allow the byteorder and target os type to be specified via
environment variables when running the configured shell script, don't
try and run the resultant binary after building it, don't set various
compiler related environment varibles - we'll let OE set those.

diff -dur hping2-rc3-orig/configure hping2-rc3/configure
--- hping2-rc3-orig/configure	2005-12-03 19:04:44.000000000 +1100
+++ hping2-rc3/configure	2005-12-03 19:05:58.000000000 +1100
@@ -13,16 +13,19 @@
 	exit 0
 fi
 
-CC=${CC:=cc}
+if [ "x$BYTEORDER" = "x" ]; then
+	CC=${CC:=cc}
 
-echo build byteorder.c...
-$CC byteorder.c -o byteorder || exit 1
+	echo build byteorder.c...
+	$CC byteorder.c -o byteorder || exit 1
+
+	BYTEORDER=`./byteorder -m`
+fi
 
 INSTALL_MANPATH=`echo $MANPATH|cut -f1 -d:`
 if [ "$INSTALL_MANPATH" = "" ]; then
 	INSTALL_MANPATH="/usr/local/man"
 fi
-BYTEORDER=`./byteorder -m`
 
 echo create byteorder.h...
 cat > byteorder.h <<EOF
@@ -38,7 +41,9 @@
 #endif /* __BYTEORDER_H */
 EOF
 
-CONFIGOSTYPE=`uname -s | tr [a-z] [A-Z]`
+if [ "x$CONFIGOSTYPE" = "x" ]; then
+  CONFIGOSTYPE=`uname -s | tr [a-z] [A-Z]`
+fi
 if [ ! "$CONFIGOSTYPE" ]; then
 	CONFIGOSTYPE=UNKNOWN
 fi
diff -dur hping2-rc3-orig/Makefile.in hping2-rc3/Makefile.in
--- hping2-rc3-orig/Makefile.in	2005-12-03 19:04:44.000000000 +1100
+++ hping2-rc3/Makefile.in	2005-12-03 19:05:41.000000000 +1100
@@ -6,17 +6,6 @@
 # $date: Sun Jul 25 17:56:15 MET DST 1999$ 
 # $rev: 3$ 
 
-CC= gcc
-AR=/usr/bin/ar
-RANLIB=/usr/bin/ranlib
-CCOPT= -O2 -Wall @PCAP_INCLUDE@
-DEBUG= -g
-#uncomment the following if you need libpcap based build under linux
-#(not raccomanded)
-COMPILE_TIME= @FORCE_LIBPCAP@
-INSTALL_MANPATH=@MANPATH@
-@PCAP@
-
 OBJ=	main.o getifname.o getlhs.o \
 	linux_sockpacket.o parseoptions.o datafiller.o \
 	datahandler.o gethostname.o \
@@ -44,10 +33,6 @@
 
 hping2: byteorder.h $(OBJ)
 	$(CC) -o hping2 $(CCOPT) $(DEBUG) $(OBJ) $(PCAP) @SOLARISLIB@
-	@echo
-	./hping2 -v
-	@echo "use \`make strip' to strip hping2 binary"
-	@echo "use \`make install' to install hping2"
 
 byteorder.h:
 	./configure