summaryrefslogtreecommitdiff
path: root/net-analyzer/tcpflow/files/tcpflow-1.5.2-gentoo.patch
blob: e6748c019688ba74346a5708dd714b47d0499baf (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
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,6 @@
 AC_PROG_INSTALL
 
 m4_include([m4/slg_searchdirs.m4])
-m4_include([m4/slg_gcc_all_warnings.m4])
 
 
 # use C++11 mode if available; HAVE_CXX11 is defined in config.h if so.  Don't
@@ -402,7 +402,12 @@
	AC_CHECK_HEADERS(cap-ng.h)
 fi
 
-
+################################################################
+# http-parser
+ 
+AC_CHECK_LIB(http_parser,http_parser_init,,
+  AC_MSG_ERROR([http-parser library not installed]))
+AC_CHECK_HEADERS(http_parser.h)
 
 ################################################################
 # Specify our other headers
--- a/src/scan_http.cpp
+++ b/src/scan_http.cpp
@@ -11,7 +11,11 @@
 #include "tcpip.h"
 #include "tcpdemux.h"
 
+#ifdef HAVE_HTTP_PARSER_H
+#include "http_parser.h"
+#else
 #include "http-parser/http_parser.h"
+#endif
 
 #include "mime_map.h"
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 793ec1a..ecac7a9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -98,8 +98,6 @@ tcpflow_SOURCES = \
 	scan_netviz.cpp \
 	pcap_writer.h \
 	iptree.h \
-	http-parser/http_parser.c \
-	http-parser/http_parser.h \
 	mime_map.cpp \
 	mime_map.h
 
@@ -110,12 +108,6 @@ tcpflow_SOURCES = \
 EXTRA_DIST =\
 	inet_ntop.c \
 	inet_ntop.h \
-	http-parser/AUTHORS \
-	http-parser/CONTRIBUTIONS \
-	http-parser/LICENSE-MIT \
-	http-parser/Makefile \
-	http-parser/README.md \
-	http-parser/http_parser.gyp \
 	wifipcap/README.txt \
 	wifipcap/TimeVal.cpp \
 	wifipcap/TimeVal.h \