Skip to content

Commit

Permalink
Merge pull request #849 from ChenQi1989/cross
Browse files Browse the repository at this point in the history
configure.ac: do not run conftest in case of cross compilation
  • Loading branch information
fklassen authored Jun 3, 2024
2 parents 0d86947 + 42f7bbc commit a7aab40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ cat >conftest.c <<EOF
EOF
${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LPCAPLIB \
conftest.c $LIBS >/dev/null 2>&1
if test -x conftest ; then
if test -x conftest -a "$cross_compiling" != "yes"; then
full_libpcap_version=$(LD_LIBRARY_PATH="$LPCAP_LD_LIBRARY_PATH" ./conftest)
libpcap_version=$(echo "$full_libpcap_version" | ${CUT} -d' ' -f3)
pcap_version_ok=yes
Expand Down Expand Up @@ -1819,7 +1819,7 @@ case "$host_os" in
EOF
${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
conftest.c $LIBS >/dev/null 2>&1
if test ! -x conftest ; then
if test ! -x conftest -o "$cross_compiling" = "yes" ; then
dnl failed to compile for some reason
unaligned_cv_fail=yes
else
Expand Down

0 comments on commit a7aab40

Please sign in to comment.