Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From dc390837bc7adc205bb955d0922040a7e365d8dd Mon Sep 17 00:00:00 2001 |
| 2 | From: Yi Zhao <yi.zhao@windriver.com> |
| 3 | Date: Mon, 23 Jul 2018 13:54:07 +0800 |
| 4 | Subject: [PATCH] Disable run test program while cross compiling |
| 5 | |
| 6 | fix configure error: |
| 7 | configure: error: cannot run test program while cross compiling |
| 8 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 9 | Upstream-Status: Inappropriate [embedded specific] |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 10 | |
| 11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
| 12 | --- |
| 13 | configure.in | 148 +++++------------------------------------------------------ |
| 14 | 1 file changed, 12 insertions(+), 136 deletions(-) |
| 15 | |
| 16 | diff --git a/configure.in b/configure.in |
| 17 | index 4b3a5db..a6c5498 100644 |
| 18 | --- a/configure.in |
| 19 | +++ b/configure.in |
| 20 | @@ -284,19 +284,7 @@ AC_CHECK_TYPES([boolean]) |
| 21 | # In case INADDR_NONE is not defined (like on Solaris) |
| 22 | have_inaddr_none="no" |
| 23 | AC_MSG_CHECKING([for INADDR_NONE]) |
| 24 | -AC_RUN_IFELSE( |
| 25 | -[AC_LANG_PROGRAM( |
| 26 | -[[ |
| 27 | -#include <sys/types.h> |
| 28 | -#include <netinet/in.h> |
| 29 | -#include <arpa/inet.h> |
| 30 | -]], |
| 31 | -[[ |
| 32 | - if (inet_addr("10,5,2") == INADDR_NONE); |
| 33 | - return 0; |
| 34 | -]])], |
| 35 | -[have_inaddr_none="yes"], |
| 36 | -[have_inaddr_none="no"]) |
| 37 | +have_inaddr_none="yes" |
| 38 | AC_MSG_RESULT($have_inaddr_none) |
| 39 | if test "x$have_inaddr_none" = "xno"; then |
| 40 | AC_DEFINE([INADDR_NONE],[-1],[For INADDR_NONE definition]) |
| 41 | @@ -429,16 +417,7 @@ if test "x$LPCAP" = "xno"; then |
| 42 | fi |
| 43 | |
| 44 | AC_MSG_CHECKING([for pcap_lex_destroy]) |
| 45 | -AC_RUN_IFELSE( |
| 46 | -[AC_LANG_PROGRAM( |
| 47 | -[[ |
| 48 | -#include <pcap.h> |
| 49 | -]], |
| 50 | -[[ |
| 51 | - pcap_lex_destroy(); |
| 52 | -]])], |
| 53 | -[have_pcap_lex_destroy="yes"], |
| 54 | -[have_pcap_lex_destroy="no"]) |
| 55 | +have_pcap_lex_destroy="yes" |
| 56 | AC_MSG_RESULT($have_pcap_lex_destroy) |
| 57 | if test "x$have_pcap_lex_destroy" = "xyes"; then |
| 58 | AC_DEFINE([HAVE_PCAP_LEX_DESTROY],[1],[Can cleanup lex buffer stack created by pcap bpf filter]) |
| 59 | @@ -716,17 +695,7 @@ fi |
| 60 | AC_CHECK_FUNCS([daq_hup_apply] [daq_acquire_with_meta] [daq_dp_add_dc]) |
| 61 | |
| 62 | AC_MSG_CHECKING([for daq real addresses]) |
| 63 | -AC_RUN_IFELSE( |
| 64 | -[AC_LANG_PROGRAM( |
| 65 | -[[ |
| 66 | -#include <daq.h> |
| 67 | -]], |
| 68 | -[[ |
| 69 | - DAQ_PktHdr_t hdr; |
| 70 | - hdr.n_real_dPort = 0; |
| 71 | -]])], |
| 72 | -[have_daq_real_addresses="yes"], |
| 73 | -[have_daq_real_addresses="no"]) |
| 74 | +have_daq_real_addresses="no" |
| 75 | AC_MSG_RESULT($have_daq_real_addresses) |
| 76 | if test "x$have_daq_real_addresses" = "xyes"; then |
| 77 | AC_DEFINE([HAVE_DAQ_REAL_ADDRESSES],[1], |
| 78 | @@ -754,17 +723,7 @@ if test "x$ac_cv_func_daq_dp_add_dc" = "xyes"; then |
| 79 | fi |
| 80 | |
| 81 | AC_MSG_CHECKING([for daq address space ID]) |
| 82 | -AC_RUN_IFELSE( |
| 83 | -[AC_LANG_PROGRAM( |
| 84 | -[[ |
| 85 | -#include <daq.h> |
| 86 | -]], |
| 87 | -[[ |
| 88 | - DAQ_PktHdr_t hdr; |
| 89 | - hdr.address_space_id = 0; |
| 90 | -]])], |
| 91 | -[have_daq_address_space_id="yes"], |
| 92 | -[have_daq_address_space_id="no"]) |
| 93 | +have_daq_address_space_id="yes" |
| 94 | AC_MSG_RESULT($have_daq_address_space_id) |
| 95 | if test "x$have_daq_address_space_id" = "xyes"; then |
| 96 | AC_DEFINE([HAVE_DAQ_ADDRESS_SPACE_ID],[1], |
| 97 | @@ -772,17 +731,7 @@ if test "x$have_daq_address_space_id" = "xyes"; then |
| 98 | fi |
| 99 | |
| 100 | AC_MSG_CHECKING([for daq flow ID]) |
| 101 | -AC_RUN_IFELSE( |
| 102 | -[AC_LANG_PROGRAM( |
| 103 | -[[ |
| 104 | -#include <daq.h> |
| 105 | -]], |
| 106 | -[[ |
| 107 | - DAQ_PktHdr_t hdr; |
| 108 | - hdr.flow_id = 0; |
| 109 | -]])], |
| 110 | -[have_daq_flow_id="yes"], |
| 111 | -[have_daq_flow_id="no"]) |
| 112 | +have_daq_flow_id="yes" |
| 113 | AC_MSG_RESULT($have_daq_flow_id) |
| 114 | if test "x$have_daq_flow_id" = "xyes"; then |
| 115 | AC_DEFINE([HAVE_DAQ_FLOW_ID],[1], |
| 116 | @@ -790,19 +739,7 @@ if test "x$have_daq_flow_id" = "xyes"; then |
| 117 | fi |
| 118 | |
| 119 | AC_MSG_CHECKING([for daq extended flow modifiers]) |
| 120 | -AC_RUN_IFELSE( |
| 121 | -[AC_LANG_PROGRAM( |
| 122 | -[[ |
| 123 | -#include <daq.h> |
| 124 | -]], |
| 125 | -[[ |
| 126 | - DAQ_ModFlow_t mod; |
| 127 | - mod.type = 0; |
| 128 | - mod.length = 0; |
| 129 | - mod.value = NULL; |
| 130 | -]])], |
| 131 | -[have_daq_ext_modflow="yes"], |
| 132 | -[have_daq_ext_modflow="no"]) |
| 133 | +have_daq_ext_modflow="no" |
| 134 | AC_MSG_RESULT($have_daq_ext_modflow) |
| 135 | if test "x$have_daq_ext_modflow" = "xyes"; then |
| 136 | CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_EXT_MODFLOW" |
| 137 | @@ -811,19 +748,7 @@ if test "x$have_daq_ext_modflow" = "xyes"; then |
| 138 | fi |
| 139 | |
| 140 | AC_MSG_CHECKING([for daq query flow]) |
| 141 | -AC_RUN_IFELSE( |
| 142 | -[AC_LANG_PROGRAM( |
| 143 | -[[ |
| 144 | -#include <daq.h> |
| 145 | -]], |
| 146 | -[[ |
| 147 | - DAQ_QueryFlow_t mod; |
| 148 | - mod.type = 0; |
| 149 | - mod.length = 0; |
| 150 | - mod.value = NULL; |
| 151 | -]])], |
| 152 | -[have_daq_queryflow="yes"], |
| 153 | -[have_daq_queryflow="no"]) |
| 154 | +have_daq_queryflow="no" |
| 155 | AC_MSG_RESULT($have_daq_queryflow) |
| 156 | if test "x$have_daq_queryflow" = "xyes"; then |
| 157 | CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_QUERYFLOW" |
| 158 | @@ -832,16 +757,7 @@ if test "x$have_daq_queryflow" = "xyes"; then |
| 159 | fi |
| 160 | |
| 161 | AC_MSG_CHECKING([for daq data channel flags]) |
| 162 | -AC_RUN_IFELSE( |
| 163 | -[AC_LANG_PROGRAM( |
| 164 | -[[ |
| 165 | -#include <daq.h> |
| 166 | -]], |
| 167 | -[[ |
| 168 | - DAQ_Data_Channel_Params_t params; |
| 169 | -]])], |
| 170 | -[have_daq_data_channel_flags="yes"], |
| 171 | -[have_daq_data_channel_flags="no"]) |
| 172 | +have_daq_data_channel_flags="no" |
| 173 | AC_MSG_RESULT($have_daq_data_channel_flags) |
| 174 | if test "x$have_daq_data_channel_flags" = "xyes"; then |
| 175 | CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_PARAMS" |
| 176 | @@ -850,17 +766,7 @@ if test "x$have_daq_data_channel_flags" = "xyes"; then |
| 177 | fi |
| 178 | |
| 179 | AC_MSG_CHECKING([for separate IP versions on pinhole endpoints]) |
| 180 | -AC_RUN_IFELSE( |
| 181 | -[AC_LANG_PROGRAM( |
| 182 | -[[ |
| 183 | -#include <daq.h> |
| 184 | -]], |
| 185 | -[[ |
| 186 | - DAQ_DP_key_t dpKey; |
| 187 | - dpKey.src_af = 0; |
| 188 | -]])], |
| 189 | -[have_daq_data_channel_separate_ip_versions="yes"], |
| 190 | -[have_daq_data_channel_separate_ip_versions="no"]) |
| 191 | +have_daq_data_channel_separate_ip_versions="no" |
| 192 | AC_MSG_RESULT($have_daq_data_channel_separate_ip_versions) |
| 193 | if test "x$have_daq_data_channel_separate_ip_versions" = "xyes"; then |
| 194 | CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_SEPARATE_IP_VERSIONS" |
| 195 | @@ -869,17 +775,7 @@ if test "x$have_daq_data_channel_separate_ip_versions" = "xyes"; then |
| 196 | fi |
| 197 | |
| 198 | AC_MSG_CHECKING([for DAQ_VERDICT_RETRY]) |
| 199 | -AC_RUN_IFELSE( |
| 200 | -[AC_LANG_PROGRAM( |
| 201 | -[[ |
| 202 | -#include <daq.h> |
| 203 | -]], |
| 204 | -[[ |
| 205 | - DAQ_Verdict verdict; |
| 206 | - verdict = DAQ_VERDICT_RETRY; |
| 207 | -]])], |
| 208 | -[have_daq_verdict_retry="yes"], |
| 209 | -[have_daq_verdict_retry="no"]) |
| 210 | +have_daq_verdict_retry="yes" |
| 211 | AC_MSG_RESULT($have_daq_verdict_retry) |
| 212 | if test "x$have_daq_verdict_retry" = "xyes"; then |
| 213 | AC_DEFINE([HAVE_DAQ_VERDICT_RETRY],[1], |
| 214 | @@ -887,17 +783,7 @@ if test "x$have_daq_verdict_retry" = "xyes"; then |
| 215 | fi |
| 216 | |
| 217 | AC_MSG_CHECKING([for daq packet trace]) |
| 218 | -AC_RUN_IFELSE( |
| 219 | -[AC_LANG_PROGRAM( |
| 220 | -[[ |
| 221 | -#include <daq.h> |
| 222 | -]], |
| 223 | -[[ |
| 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"]) |
Brad Bishop | c8f4712 | 2019-06-24 09:36:18 -0400 | [diff] [blame] | 229 | +have_daq_packet_trace="no" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 230 | AC_MSG_RESULT($have_daq_packet_trace) |
| 231 | if test "x$have_daq_packet_trace" = "xyes"; then |
| 232 | AC_DEFINE([HAVE_DAQ_PKT_TRACE],[1], |
| 233 | @@ -907,17 +793,7 @@ else |
| 234 | fi |
| 235 | |
| 236 | AC_MSG_CHECKING([for daq verdict reason]) |
| 237 | -AC_RUN_IFELSE( |
| 238 | -[AC_LANG_PROGRAM( |
| 239 | -[[ |
| 240 | -#include <daq.h> |
| 241 | -]], |
| 242 | -[[ |
| 243 | - DAQ_ModFlow_t fl; |
| 244 | - fl.type = DAQ_MODFLOW_TYPE_VER_REASON; |
| 245 | -]])], |
| 246 | -[have_daq_verdict_reason="yes"], |
| 247 | -[have_daq_verdict_reason="no"]) |
Brad Bishop | c8f4712 | 2019-06-24 09:36:18 -0400 | [diff] [blame] | 248 | +have_daq_verdict_reason="no" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 249 | AC_MSG_RESULT($have_daq_verdict_reason) |
| 250 | if test "x$have_daq_verdict_reason" = "xyes"; then |
| 251 | AC_DEFINE([HAVE_DAQ_VERDICT_REASON],[1], |
| 252 | -- |
| 253 | 2.7.4 |
| 254 | |