diff options
author | Luca Deri <deri@ntop.org> | 2018-08-16 12:03:23 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2018-08-16 12:03:23 +0200 |
commit | 18b9589e50894e4b9bd0d25c185c1a1631add862 (patch) | |
tree | f2331328cdcfb1ff8c28f4669bf9cc37a3114269 | |
parent | 9847c2ccbbe3db62b39249126fb5c86298f37c9d (diff) | |
parent | 335b3369689f8c338f9d7680490f500279ce9bba (diff) |
Merge branch 'dev' of https://github.com/ntop/nDPI into dev
-rw-r--r-- | configure.seed | 28 | ||||
-rw-r--r-- | src/include/ndpi_typedefs.h | 3 | ||||
-rw-r--r-- | src/lib/ndpi_main.c | 2 |
3 files changed, 22 insertions, 11 deletions
diff --git a/configure.seed b/configure.seed index 993ee03fa..6b85c66e9 100644 --- a/configure.seed +++ b/configure.seed @@ -54,16 +54,24 @@ fi HS_LIB= HS_INC= -BKP=$LIBS -LIBS="$LIBS -lstdc++ -lm" -AC_CHECK_LIB([hs], [hs_compile_multi], AC_DEFINE_UNQUOTED(HAVE_HYPERSCAN, 1, [Intel Hyperscan is present])) -LIBS=$BKP - -if test "x$ac_cv_lib_hs_hs_compile_multi" = xyes; then : -AC_CHECK_LIB([m], [pow]) -AC_CHECK_LIB([stdc++], [main]) -HS_INC=`pkg-config --cflags libhs` -HS_LIB=`pkg-config --libs libhs` + +AC_ARG_WITH(hyperscan, [ --with-hyperscan Enable nDPI build with Intel Hyperscan]) + +if test "${with_hyperscan+set}" = set; then + BKP=$LIBS + LIBS="$LIBS -lstdc++ -lm" + AC_CHECK_LIB([hs], [hs_compile_multi], AC_DEFINE_UNQUOTED(HAVE_HYPERSCAN, 1, [Intel Hyperscan is present])) + LIBS=$BKP + + if test "x$ac_cv_lib_hs_hs_compile_multi" = xyes; then : + AC_CHECK_LIB([m], [pow]) + AC_CHECK_LIB([stdc++], [main]) + HS_INC=`pkg-config --cflags libhs` + HS_LIB=`pkg-config --libs libhs` + else + AC_MSG_RESULT([Intel Hyperscan not found, exiting. See https://github.com/intel/hyperscan/blob/master/doc/dev-reference/getting_started.rst for install/build instructions]) + exit 1 + fi fi if test -f $PCAP_HOME/libpcap/libpcap.a; then : diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index 2c4c2c63a..244074044 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -26,6 +26,9 @@ #include "ndpi_define.h" +/* Needed to have access to HAVE_* defines */ +#include "ndpi_config.h" + /* NDPI_LOG_LEVEL */ typedef enum { NDPI_LOG_ERROR, diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 164481cc4..494c93bd0 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -47,7 +47,7 @@ #include "third_party/src/hash.c" #ifdef HAVE_HYPERSCAN -#include <hs.h> +#include <hs/hs.h> #endif #ifdef HAVE_HYPERSCAN |