aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2020-01-30 22:24:24 +0100
committerLuca Deri <deri@ntop.org>2020-01-30 22:24:24 +0100
commitc68ea3067b86b0d3bb3215d80d48d655a30459bd (patch)
treedc4bc49d601783ebaea83c0d6183b17cce8a5b3f
parent4e538b1e4d60de30b8643b8426d9c9e8ee9d49d7 (diff)
Added libpcre lib if present
-rw-r--r--configure.seed5
-rw-r--r--example/Makefile.in2
2 files changed, 6 insertions, 1 deletions
diff --git a/configure.seed b/configure.seed
index 68997975e..215c56ee9 100644
--- a/configure.seed
+++ b/configure.seed
@@ -41,6 +41,7 @@ AC_DEFINE_UNQUOTED(NDPI_GIT_DATE, "${GIT_DATE}", [Last GIT change])
AC_CHECK_HEADERS([netinet/in.h stdint.h stdlib.h string.h unistd.h])
+ADDITIONAL_LIBS=
PCAP_HOME=$HOME/PF_RING/userland
DPDK_TARGET=
@@ -161,6 +162,9 @@ AM_CONDITIONAL([HAS_FUZZLDFLAGS], [test "x$has_sanitizefuzzer" = "xyes"])
AC_CHECK_LIB(pthread, pthread_setaffinity_np, AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SETAFFINITY_NP, 1, [libc has pthread_setaffinity_np]))
AC_CHECK_LIB(pcre, pcre_compile, AC_DEFINE_UNQUOTED(HAVE_PCRE, 1, [libpcre(-dev) is present]))
+if ${ac_cv_lib_pcre_pcre_compile+:} false; then :
+ADDITIONAL_LIBS=-lpcre
+fi
AC_CONFIG_FILES([Makefile example/Makefile example/Makefile.dpdk tests/Makefile libndpi.pc src/include/ndpi_define.h src/lib/Makefile python/Makefile fuzz/Makefile])
AC_CONFIG_HEADERS(src/include/ndpi_config.h)
@@ -173,6 +177,7 @@ AC_SUBST(SVN_DATE)
AC_SUBST(JSON_C_LIB)
AC_SUBST(PCAP_INC)
AC_SUBST(PCAP_LIB)
+AC_SUBST(ADDITIONAL_LIBS)
AC_SUBST(DL_LIB)
AC_SUBST(DPDK_TARGET)
AC_SUBST(HAVE_PTHREAD_SETAFFINITY_NP)
diff --git a/example/Makefile.in b/example/Makefile.in
index cc47b3047..ec9c712ae 100644
--- a/example/Makefile.in
+++ b/example/Makefile.in
@@ -3,7 +3,7 @@ CXX=@CXX@
SRCHOME=../src
CFLAGS=-g -I$(SRCHOME)/include @CFLAGS@
LIBNDPI=$(SRCHOME)/lib/libndpi.a
-LDFLAGS=$(LIBNDPI) @PCAP_LIB@ -lpthread -lm @LDFLAGS@
+LDFLAGS=$(LIBNDPI) @PCAP_LIB@ @ADDITIONAL_LIBS@ -lpthread -lm @LDFLAGS@
HEADERS=intrusion_detection.h reader_util.h $(SRCHOME)/include/ndpi_api.h \
$(SRCHOME)/include/ndpi_typedefs.h $(SRCHOME)/include/ndpi_protocol_ids.h
OBJS=ndpiReader.o reader_util.o intrusion_detection.o