diff options
author | Simone Mainardi <mainardi@ntop.org> | 2018-08-16 11:47:10 +0200 |
---|---|---|
committer | Simone Mainardi <mainardi@ntop.org> | 2018-08-16 11:47:10 +0200 |
commit | 335b3369689f8c338f9d7680490f500279ce9bba (patch) | |
tree | 5903670b59fb8aa3c4ac50e2f891fa99c825b5af /configure.seed | |
parent | 70eb619b86656cf8ee8425fe67d862f554ebfbe2 (diff) |
Hyperscan compilation fixes
Diffstat (limited to 'configure.seed')
-rw-r--r-- | configure.seed | 28 |
1 files changed, 18 insertions, 10 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 : |