Add mingw host target

This commit is contained in:
Zied Aouini
2019-12-16 01:11:55 +01:00
committed by GitHub
parent 1097f5488d
commit 812a3e7099
+26 -22
View File
@@ -96,28 +96,32 @@ AS_IF([test "${with_hyperscan+set}" = set],[
]) ])
]) ])
if test -f $PCAP_HOME/libpcap/libpcap.a; then : case "$host" in
echo "Using libpcap from $PCAP_HOME" *-*-mingw32*|*-*-msys)
PCAP_INC="-I $PCAP_HOME/libpcap" CFLAGS="${CFLAGS} -DOS_WIN32"
PCAP_LIB="$PCAP_HOME/libpcap/libpcap.a $PCAP_HOME/lib/libpfring.a $LIBNUMA `$PCAP_HOME/lib/pfring_config --libs`" LDFLAGS="${LDFLAGS} -lws2_32 -lucrtbase"
;;
AC_CHECK_LIB([rt], [clock_gettime], [PCAP_LIB="$PCAP_LIB -lrt"]) *)
AC_CHECK_LIB([nl], [nl_handle_alloc], [PCAP_LIB="$PCAP_LIB -lnl"]) if test -f $PCAP_HOME/libpcap/libpcap.a; then :
# The dlopen() function is in libdl on GLIBC-based systems echo "Using libpcap from $PCAP_HOME"
# and in the C library for *BSD systems PCAP_INC="-I $PCAP_HOME/libpcap"
AC_CHECK_LIB([dl], [dlopen, dlsym], [DL_LIB="-ldl"], PCAP_LIB="$PCAP_HOME/libpcap/libpcap.a $PCAP_HOME/lib/libpfring.a $LIBNUMA `$PCAP_HOME/lib/pfring_config --libs`"
[AC_CHECK_LIB([c], [dlopen, dlsym], [DL_LIB="-lc"], AC_CHECK_LIB([rt], [clock_gettime], [PCAP_LIB="$PCAP_LIB -lrt"])
[AC_MSG_ERROR([unable to find the dlopen(), dlsym() functions]) ]) ]) AC_CHECK_LIB([nl], [nl_handle_alloc], [PCAP_LIB="$PCAP_LIB -lnl"])
else # The dlopen() function is in libdl on GLIBC-based systems
AC_CHECK_LIB([pcap], [pcap_open_live], [PCAP_LIB="-lpcap"]) # and in the C library for *BSD systems
AC_CHECK_LIB([dl], [dlopen, dlsym], [DL_LIB="-ldl"],[AC_CHECK_LIB([c], [dlopen, dlsym], [DL_LIB="-lc"],[AC_MSG_ERROR([unable to find the dlopen(), dlsym() functions]) ]) ])
if test $ac_cv_lib_pcap_pcap_open_live = "no"; then : else
echo "" AC_CHECK_LIB([pcap], [pcap_open_live], [PCAP_LIB="-lpcap"])
echo "ERROR: Missing libpcap(-dev) library required to compile the example application" if test $ac_cv_lib_pcap_pcap_open_live = "no"; then :
echo "ERROR: Please install it and try again" echo ""
exit echo "ERROR: Missing libpcap(-dev) library required to compile the example application"
fi echo "ERROR: Please install it and try again"
fi exit
fi
fi
;;
esac
dnl> https://github.com/json-c/json-c dnl> https://github.com/json-c/json-c
AC_ARG_ENABLE([json-c], AC_ARG_ENABLE([json-c],