binutils: allow static linking
[openadk.git] / package / snort / patches / patch-configure_in
blob5ed8dc9f18901abe3903ce49d812a59bb11f6357
1 --- snort-2.9.14.1.orig/configure.in    2019-08-02 08:16:45.000000000 +0200
2 +++ snort-2.9.14.1/configure.in 2019-10-08 14:40:16.073097068 +0200
3 @@ -70,8 +70,10 @@ case "$host" in
4    *-linux*)
5      linux="yes"
6      AC_DEFINE([LINUX],[1],[Define if Linux])
7 -    AC_SUBST(extra_incl)
8 -    extra_incl="-I/usr/include/pcap"
9 +    if test -z "x$with_libpcap_includes"; then
10 +        AC_SUBST(extra_incl)
11 +        extra_incl="-I/usr/include/pcap"
12 +    fi
13      ;;
14    *-hpux10*|*-hpux11*)
15      AC_DEFINE([HPUX],[1],[Define if HP-UX 10 or 11])
16 @@ -282,8 +284,8 @@ AC_CHECK_TYPES([int8_t,int16_t,int32_t,i
17  AC_CHECK_TYPES([boolean])
19  # In case INADDR_NONE is not defined (like on Solaris)
20 +AC_CACHE_CHECK([for INADDR_NONE], [have_inaddr_none], [
21  have_inaddr_none="no"
22 -AC_MSG_CHECKING([for INADDR_NONE])
23  AC_RUN_IFELSE(
24  [AC_LANG_PROGRAM(
25  [[
26 @@ -296,7 +298,7 @@ AC_RUN_IFELSE(
27      return 0;
28  ]])],
29  [have_inaddr_none="yes"],
30 -[have_inaddr_none="no"])
31 +[have_inaddr_none="no"])])
32  AC_MSG_RESULT($have_inaddr_none)
33  if test "x$have_inaddr_none" = "xno"; then
34         AC_DEFINE([INADDR_NONE],[-1],[For INADDR_NONE definition])
35 @@ -429,7 +431,7 @@ if test "x$LPCAP" = "xno"; then
36  fi
38  AC_MSG_CHECKING([for pcap_lex_destroy])
39 -AC_RUN_IFELSE(
40 +AC_COMPILE_IFELSE(
41  [AC_LANG_PROGRAM(
42  [[
43  #include <pcap.h>
44 @@ -717,17 +719,11 @@ fi
45  AC_CHECK_FUNCS([daq_hup_apply] [daq_acquire_with_meta] [daq_dp_add_dc])
47  AC_MSG_CHECKING([for daq real addresses])
48 -AC_RUN_IFELSE(
49 -[AC_LANG_PROGRAM(
50 -[[
51 -#include <daq.h>
52 -]],
53 -[[
54 -   DAQ_PktHdr_t hdr;
55 -   hdr.n_real_dPort = 0;
56 -]])],
57 -[have_daq_real_addresses="yes"],
58 -[have_daq_real_addresses="no"])
60 +AC_CHECK_MEMBERS([DAQ_PktHdr_t hdr.n_real_dPort],
61 +    [have_daq_real_addresses="yes"],
62 +    [have_daq_real_addresses="no"],
63 +    [[#include <daq.h>]])
64  AC_MSG_RESULT($have_daq_real_addresses)
65  if test "x$have_daq_real_addresses" = "xyes"; then
66      AC_DEFINE([HAVE_DAQ_REAL_ADDRESSES],[1],
67 @@ -771,17 +767,11 @@ if test "x$ac_cv_func_daq_dp_add_dc" = "
68  fi
70  AC_MSG_CHECKING([for daq address space ID])
71 -AC_RUN_IFELSE(
72 -[AC_LANG_PROGRAM(
73 -[[
74 -#include <daq.h>
75 -]],
76 -[[
77 -   DAQ_PktHdr_t hdr;
78 -   hdr.address_space_id = 0;
79 -]])],
80 -[have_daq_address_space_id="yes"],
81 -[have_daq_address_space_id="no"])
83 +AC_CHECK_MEMBERS([DAQ_PktHdr_t hdr.address_space_id],
84 +    [have_daq_address_space_id="yes"],
85 +    [have_daq_address_space_id="no"],
86 +    [[#include <daq.h>]])
87  AC_MSG_RESULT($have_daq_address_space_id)
88  if test "x$have_daq_address_space_id" = "xyes"; then
89      AC_DEFINE([HAVE_DAQ_ADDRESS_SPACE_ID],[1],
90 @@ -789,17 +779,10 @@ if test "x$have_daq_address_space_id" =
91  fi
93  AC_MSG_CHECKING([for daq flow ID])
94 -AC_RUN_IFELSE(
95 -[AC_LANG_PROGRAM(
96 -[[
97 -#include <daq.h>
98 -]],
99 -[[
100 -   DAQ_PktHdr_t hdr;
101 -   hdr.flow_id = 0;
102 -]])],
103 -[have_daq_flow_id="yes"],
104 -[have_daq_flow_id="no"])
105 +AC_CHECK_MEMBERS([DAQ_PktHdr_t hdr.flow_id],
106 +    [have_daq_flow_id="yes"],
107 +    [have_daq_flow_id="no"],
108 +    [[#include <daq.h>]])
109  AC_MSG_RESULT($have_daq_flow_id)
110  if test "x$have_daq_flow_id" = "xyes"; then
111      AC_DEFINE([HAVE_DAQ_FLOW_ID],[1],
112 @@ -807,19 +790,10 @@ if test "x$have_daq_flow_id" = "xyes"; t
113  fi
115  AC_MSG_CHECKING([for daq extended flow modifiers])
116 -AC_RUN_IFELSE(
117 -[AC_LANG_PROGRAM(
119 -#include <daq.h>
120 -]],
122 -   DAQ_ModFlow_t mod;
123 -   mod.type = 0;
124 -   mod.length = 0;
125 -   mod.value = NULL;
126 -]])],
127 -[have_daq_ext_modflow="yes"],
128 -[have_daq_ext_modflow="no"])
129 +AC_CHECK_MEMBERS([DAQ_ModFlow_t mod.type, DAQ_ModFlow_t mod.length, DAQ_ModFlow_t mod.value],
130 +    [have_daq_ext_modflow="yes"],
131 +    [have_daq_ext_modflow="no"],
132 +    [[#include <daq.h>]])
133  AC_MSG_RESULT($have_daq_ext_modflow)
134  if test "x$have_daq_ext_modflow" = "xyes"; then
135      CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_EXT_MODFLOW"
136 @@ -828,19 +802,11 @@ if test "x$have_daq_ext_modflow" = "xyes
137  fi
139  AC_MSG_CHECKING([for daq query flow])
140 -AC_RUN_IFELSE(
141 -[AC_LANG_PROGRAM(
143 -#include <daq.h>
144 -]],
146 -   DAQ_QueryFlow_t mod;
147 -   mod.type = 0;
148 -   mod.length = 0;
149 -   mod.value = NULL;
150 -]])],
151 -[have_daq_queryflow="yes"],
152 -[have_daq_queryflow="no"])
154 +AC_CHECK_MEMBERS([DAQ_QueryFlow_t mod.type, DAQ_QueryFlow_t mod.length, DAQ_QueryFlow_t mod.value],
155 +    [have_daq_queryflow="yes"],
156 +    [have_daq_queryflow="no"],
157 +    [[#include <daq.h>]])
158  AC_MSG_RESULT($have_daq_queryflow)
159  if test "x$have_daq_queryflow" = "xyes"; then
160      CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_QUERYFLOW"
161 @@ -849,16 +815,11 @@ if test "x$have_daq_queryflow" = "xyes";
162  fi
164  AC_MSG_CHECKING([for daq data channel flags])
165 -AC_RUN_IFELSE(
166 -[AC_LANG_PROGRAM(
168 -#include <daq.h>
169 -]],
171 -   DAQ_Data_Channel_Params_t params;
172 -]])],
173 -[have_daq_data_channel_flags="yes"],
174 -[have_daq_data_channel_flags="no"])
176 +AC_CHECK_MEMBERS([DAQ_Data_Channel_Params_t params.flags],
177 +    [have_daq_data_channel_flags="yes"],
178 +    [have_daq_data_channel_flags="no"],
179 +    [[#include <daq.h>]])
180  AC_MSG_RESULT($have_daq_data_channel_flags)
181  if test "x$have_daq_data_channel_flags" = "xyes"; then
182      CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_PARAMS"
183 @@ -867,17 +828,10 @@ if test "x$have_daq_data_channel_flags"
184  fi
186  AC_MSG_CHECKING([for separate IP versions on pinhole endpoints])
187 -AC_RUN_IFELSE(
188 -[AC_LANG_PROGRAM(
190 -#include <daq.h>
191 -]],
193 -   DAQ_DP_key_t dpKey;
194 -   dpKey.src_af = 0;
195 -]])],
196 -[have_daq_data_channel_separate_ip_versions="yes"],
197 -[have_daq_data_channel_separate_ip_versions="no"])
198 +AC_CHECK_MEMBERS([DAQ_DP_key_t dpKey.src_af],
199 +    [have_daq_data_channel_separate_ip_versions="yes"],
200 +    [have_daq_data_channel_separate_ip_versions="no"],
201 +    [[#include <daq.h>]])
202  AC_MSG_RESULT($have_daq_data_channel_separate_ip_versions)
203  if test "x$have_daq_data_channel_separate_ip_versions" = "xyes"; then
204      CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_SEPARATE_IP_VERSIONS"
205 @@ -886,7 +840,7 @@ if test "x$have_daq_data_channel_separat
206  fi
208  AC_MSG_CHECKING([for DAQ_VERDICT_RETRY])
209 -AC_RUN_IFELSE(
210 +AC_COMPILE_IFELSE(
211  [AC_LANG_PROGRAM(
212  [[
213  #include <daq.h>
214 @@ -904,17 +858,10 @@ if test "x$have_daq_verdict_retry" = "xy
215  fi
217  AC_MSG_CHECKING([for daq packet trace])
218 -AC_RUN_IFELSE(
219 -[AC_LANG_PROGRAM(
221 -#include <daq.h>
222 -]],
224 -   DAQ_PktHdr_t hdr;
225 -   hdr.flags = DAQ_PKT_FLAG_TRACE_ENABLED;
226 -]])],
227 -[have_daq_packet_trace="yes"],
228 -[have_daq_packet_trace="no"])
229 +AC_CHECK_MEMBERS([DAQ_PktHdr_t hdr.flags],
230 +    [have_daq_packet_trace="yes"],
231 +    [have_daq_packet_trace="no"],
232 +    [[#include <daq.h>]])
233  AC_MSG_RESULT($have_daq_packet_trace)
234  if test "x$have_daq_packet_trace" = "xyes"; then
235      AC_DEFINE([HAVE_DAQ_PKT_TRACE],[1],
236 @@ -924,17 +871,11 @@ else
237  fi
239  AC_MSG_CHECKING([for daq verdict reason])
240 -AC_RUN_IFELSE(
241 -[AC_LANG_PROGRAM(
243 -#include <daq.h>
244 -]],
246 -   DAQ_ModFlow_t fl;
247 -   fl.type = DAQ_MODFLOW_TYPE_VER_REASON;
248 -]])],
249 -[have_daq_verdict_reason="yes"],
250 -[have_daq_verdict_reason="no"])
252 +AC_CHECK_MEMBERS([DAQ_ModFlow_t fl.type],
253 +    [have_daq_verdict_reason="yes"],
254 +    [have_daq_verdict_reason="no"],
255 +    [[#include <daq.h>]])
256  AC_MSG_RESULT($have_daq_verdict_reason)
257  if test "x$have_daq_verdict_reason" = "xyes"; then
258      AC_DEFINE([HAVE_DAQ_VERDICT_REASON],[1],
259 @@ -959,10 +900,8 @@ fi
261  # check for sparc %time register
262  if eval "echo $host_cpu|grep -i sparc >/dev/null"; then
263 -    OLD_CFLAGS="$CFLAGS"
264 -    CFLAGS="$CFLAGS -mcpu=v9 "
265      AC_MSG_CHECKING([for sparc %time register])
266 -    AC_RUN_IFELSE(
267 +    AC_COMPILE_IFELSE(
268      [AC_LANG_PROGRAM(
269      [[]],
270      [[
271 @@ -974,8 +913,6 @@ if eval "echo $host_cpu|grep -i sparc >/
272      AC_MSG_RESULT($sparcv9)
273      if test "x$sparcv9" = "xyes"; then
274          AC_DEFINE([SPARCV9],[1],[For sparc v9 with %time register])
275 -    else
276 -        CFLAGS="$OLD_CFLAGS"
277      fi
278  fi