summaryrefslogtreecommitdiff
path: root/package/snort/patches/patch-configure_in
blob: 5ed8dc9f18901abe3903ce49d812a59bb11f6357 (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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
--- snort-2.9.14.1.orig/configure.in	2019-08-02 08:16:45.000000000 +0200
+++ snort-2.9.14.1/configure.in	2019-10-08 14:40:16.073097068 +0200
@@ -70,8 +70,10 @@ case "$host" in
   *-linux*)
     linux="yes"
     AC_DEFINE([LINUX],[1],[Define if Linux])
-    AC_SUBST(extra_incl)
-    extra_incl="-I/usr/include/pcap"
+    if test -z "x$with_libpcap_includes"; then
+        AC_SUBST(extra_incl)
+        extra_incl="-I/usr/include/pcap"
+    fi
     ;;
   *-hpux10*|*-hpux11*)
     AC_DEFINE([HPUX],[1],[Define if HP-UX 10 or 11])
@@ -282,8 +284,8 @@ AC_CHECK_TYPES([int8_t,int16_t,int32_t,i
 AC_CHECK_TYPES([boolean])
 
 # In case INADDR_NONE is not defined (like on Solaris)
+AC_CACHE_CHECK([for INADDR_NONE], [have_inaddr_none], [
 have_inaddr_none="no"
-AC_MSG_CHECKING([for INADDR_NONE])
 AC_RUN_IFELSE(
 [AC_LANG_PROGRAM(
 [[
@@ -296,7 +298,7 @@ AC_RUN_IFELSE(
     return 0;
 ]])],
 [have_inaddr_none="yes"],
-[have_inaddr_none="no"])
+[have_inaddr_none="no"])])
 AC_MSG_RESULT($have_inaddr_none)
 if test "x$have_inaddr_none" = "xno"; then
 	AC_DEFINE([INADDR_NONE],[-1],[For INADDR_NONE definition])
@@ -429,7 +431,7 @@ if test "x$LPCAP" = "xno"; then
 fi
 
 AC_MSG_CHECKING([for pcap_lex_destroy])
-AC_RUN_IFELSE(
+AC_COMPILE_IFELSE(
 [AC_LANG_PROGRAM(
 [[
 #include <pcap.h>
@@ -717,17 +719,11 @@ fi
 AC_CHECK_FUNCS([daq_hup_apply] [daq_acquire_with_meta] [daq_dp_add_dc])
 
 AC_MSG_CHECKING([for daq real addresses])
-AC_RUN_IFELSE(
-[AC_LANG_PROGRAM(
-[[
-#include <daq.h>
-]],
-[[
-   DAQ_PktHdr_t hdr;
-   hdr.n_real_dPort = 0;
-]])],
-[have_daq_real_addresses="yes"],
-[have_daq_real_addresses="no"])
+
+AC_CHECK_MEMBERS([DAQ_PktHdr_t hdr.n_real_dPort],
+    [have_daq_real_addresses="yes"],
+    [have_daq_real_addresses="no"],
+    [[#include <daq.h>]])
 AC_MSG_RESULT($have_daq_real_addresses)
 if test "x$have_daq_real_addresses" = "xyes"; then
     AC_DEFINE([HAVE_DAQ_REAL_ADDRESSES],[1],
@@ -771,17 +767,11 @@ if test "x$ac_cv_func_daq_dp_add_dc" = "
 fi
 
 AC_MSG_CHECKING([for daq address space ID])
-AC_RUN_IFELSE(
-[AC_LANG_PROGRAM(
-[[
-#include <daq.h>
-]],
-[[
-   DAQ_PktHdr_t hdr;
-   hdr.address_space_id = 0;
-]])],
-[have_daq_address_space_id="yes"],
-[have_daq_address_space_id="no"])
+
+AC_CHECK_MEMBERS([DAQ_PktHdr_t hdr.address_space_id],
+    [have_daq_address_space_id="yes"],
+    [have_daq_address_space_id="no"],
+    [[#include <daq.h>]])
 AC_MSG_RESULT($have_daq_address_space_id)
 if test "x$have_daq_address_space_id" = "xyes"; then
     AC_DEFINE([HAVE_DAQ_ADDRESS_SPACE_ID],[1],
@@ -789,17 +779,10 @@ if test "x$have_daq_address_space_id" =
 fi
 
 AC_MSG_CHECKING([for daq flow ID])
-AC_RUN_IFELSE(
-[AC_LANG_PROGRAM(
-[[
-#include <daq.h>
-]],
-[[
-   DAQ_PktHdr_t hdr;
-   hdr.flow_id = 0;
-]])],
-[have_daq_flow_id="yes"],
-[have_daq_flow_id="no"])
+AC_CHECK_MEMBERS([DAQ_PktHdr_t hdr.flow_id],
+    [have_daq_flow_id="yes"],
+    [have_daq_flow_id="no"],
+    [[#include <daq.h>]])
 AC_MSG_RESULT($have_daq_flow_id)
 if test "x$have_daq_flow_id" = "xyes"; then
     AC_DEFINE([HAVE_DAQ_FLOW_ID],[1],
@@ -807,19 +790,10 @@ if test "x$have_daq_flow_id" = "xyes"; t
 fi
 
 AC_MSG_CHECKING([for daq extended flow modifiers])
-AC_RUN_IFELSE(
-[AC_LANG_PROGRAM(
-[[
-#include <daq.h>
-]],
-[[
-   DAQ_ModFlow_t mod;
-   mod.type = 0;
-   mod.length = 0;
-   mod.value = NULL;
-]])],
-[have_daq_ext_modflow="yes"],
-[have_daq_ext_modflow="no"])
+AC_CHECK_MEMBERS([DAQ_ModFlow_t mod.type, DAQ_ModFlow_t mod.length, DAQ_ModFlow_t mod.value],
+    [have_daq_ext_modflow="yes"],
+    [have_daq_ext_modflow="no"],
+    [[#include <daq.h>]])
 AC_MSG_RESULT($have_daq_ext_modflow)
 if test "x$have_daq_ext_modflow" = "xyes"; then
     CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_EXT_MODFLOW"
@@ -828,19 +802,11 @@ if test "x$have_daq_ext_modflow" = "xyes
 fi
 
 AC_MSG_CHECKING([for daq query flow])
-AC_RUN_IFELSE(
-[AC_LANG_PROGRAM(
-[[
-#include <daq.h>
-]],
-[[
-   DAQ_QueryFlow_t mod;
-   mod.type = 0;
-   mod.length = 0;
-   mod.value = NULL;
-]])],
-[have_daq_queryflow="yes"],
-[have_daq_queryflow="no"])
+
+AC_CHECK_MEMBERS([DAQ_QueryFlow_t mod.type, DAQ_QueryFlow_t mod.length, DAQ_QueryFlow_t mod.value],
+    [have_daq_queryflow="yes"],
+    [have_daq_queryflow="no"],
+    [[#include <daq.h>]])
 AC_MSG_RESULT($have_daq_queryflow)
 if test "x$have_daq_queryflow" = "xyes"; then
     CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_QUERYFLOW"
@@ -849,16 +815,11 @@ if test "x$have_daq_queryflow" = "xyes";
 fi
 
 AC_MSG_CHECKING([for daq data channel flags])
-AC_RUN_IFELSE(
-[AC_LANG_PROGRAM(
-[[
-#include <daq.h>
-]],
-[[
-   DAQ_Data_Channel_Params_t params;
-]])],
-[have_daq_data_channel_flags="yes"],
-[have_daq_data_channel_flags="no"])
+
+AC_CHECK_MEMBERS([DAQ_Data_Channel_Params_t params.flags],
+    [have_daq_data_channel_flags="yes"],
+    [have_daq_data_channel_flags="no"],
+    [[#include <daq.h>]])
 AC_MSG_RESULT($have_daq_data_channel_flags)
 if test "x$have_daq_data_channel_flags" = "xyes"; then
     CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_PARAMS"
@@ -867,17 +828,10 @@ if test "x$have_daq_data_channel_flags"
 fi
 
 AC_MSG_CHECKING([for separate IP versions on pinhole endpoints])
-AC_RUN_IFELSE(
-[AC_LANG_PROGRAM(
-[[
-#include <daq.h>
-]],
-[[
-   DAQ_DP_key_t dpKey;
-   dpKey.src_af = 0;
-]])],
-[have_daq_data_channel_separate_ip_versions="yes"],
-[have_daq_data_channel_separate_ip_versions="no"])
+AC_CHECK_MEMBERS([DAQ_DP_key_t dpKey.src_af],
+    [have_daq_data_channel_separate_ip_versions="yes"],
+    [have_daq_data_channel_separate_ip_versions="no"],
+    [[#include <daq.h>]])
 AC_MSG_RESULT($have_daq_data_channel_separate_ip_versions)
 if test "x$have_daq_data_channel_separate_ip_versions" = "xyes"; then
     CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_SEPARATE_IP_VERSIONS"
@@ -886,7 +840,7 @@ if test "x$have_daq_data_channel_separat
 fi
 
 AC_MSG_CHECKING([for DAQ_VERDICT_RETRY])
-AC_RUN_IFELSE(
+AC_COMPILE_IFELSE(
 [AC_LANG_PROGRAM(
 [[
 #include <daq.h>
@@ -904,17 +858,10 @@ if test "x$have_daq_verdict_retry" = "xy
 fi
 
 AC_MSG_CHECKING([for daq packet trace])
-AC_RUN_IFELSE(
-[AC_LANG_PROGRAM(
-[[
-#include <daq.h>
-]],
-[[
-   DAQ_PktHdr_t hdr;
-   hdr.flags = DAQ_PKT_FLAG_TRACE_ENABLED;
-]])],
-[have_daq_packet_trace="yes"],
-[have_daq_packet_trace="no"])
+AC_CHECK_MEMBERS([DAQ_PktHdr_t hdr.flags],
+    [have_daq_packet_trace="yes"],
+    [have_daq_packet_trace="no"],
+    [[#include <daq.h>]])
 AC_MSG_RESULT($have_daq_packet_trace)
 if test "x$have_daq_packet_trace" = "xyes"; then
     AC_DEFINE([HAVE_DAQ_PKT_TRACE],[1],
@@ -924,17 +871,11 @@ else
 fi
 
 AC_MSG_CHECKING([for daq verdict reason])
-AC_RUN_IFELSE(
-[AC_LANG_PROGRAM(
-[[
-#include <daq.h>
-]],
-[[
-   DAQ_ModFlow_t fl;
-   fl.type = DAQ_MODFLOW_TYPE_VER_REASON;
-]])],
-[have_daq_verdict_reason="yes"],
-[have_daq_verdict_reason="no"])
+
+AC_CHECK_MEMBERS([DAQ_ModFlow_t fl.type],
+    [have_daq_verdict_reason="yes"],
+    [have_daq_verdict_reason="no"],
+    [[#include <daq.h>]])
 AC_MSG_RESULT($have_daq_verdict_reason)
 if test "x$have_daq_verdict_reason" = "xyes"; then
     AC_DEFINE([HAVE_DAQ_VERDICT_REASON],[1],
@@ -959,10 +900,8 @@ fi
 
 # check for sparc %time register
 if eval "echo $host_cpu|grep -i sparc >/dev/null"; then
-    OLD_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -mcpu=v9 "
     AC_MSG_CHECKING([for sparc %time register])
-    AC_RUN_IFELSE(
+    AC_COMPILE_IFELSE(
     [AC_LANG_PROGRAM(
     [[]],
     [[
@@ -974,8 +913,6 @@ if eval "echo $host_cpu|grep -i sparc >/
     AC_MSG_RESULT($sparcv9)
     if test "x$sparcv9" = "xyes"; then
         AC_DEFINE([SPARCV9],[1],[For sparc v9 with %time register])
-    else
-        CFLAGS="$OLD_CFLAGS"
     fi
 fi