1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
Description: Use system libndpi, and discover path by using pkg-config.
Author: Ludovico Cavedon <cavedon@debian.org>
Index: ntopng/configure.seed
===================================================================
--- ntopng.orig/configure.seed
+++ ntopng/configure.seed
@@ -128,54 +128,7 @@ else
AC_MSG_RESULT(not found)
fi
-PKG_CHECK_MODULES([NDPI], [libndpi >= 2.0], [
- NDPI_INC=`echo $NDPI_CFLAGS | sed -e "s/[ ]*$//"`/libndpi
- # Use static libndpi library as building against the dynamic library fails
- NDPI_LIB="-Wl,-Bstatic $NDPI_LIBS -Wl,-Bdynamic"
- NDPI_LIB_DEP=
- ], [
- AC_MSG_CHECKING(for nDPI source)
- if test -d "./nDPI" ; then :
- NDPI_HOME=./nDPI
- elif test -d "../nDPI" ; then :
- NDPI_HOME=../nDPI
- elif test -d "$HOME/nDPI" ; then :
- NDPI_HOME=$HOME/nDPI
- fi
-
- if test ! -z "$NDPI_HOME" ; then :
- AC_MSG_RESULT(found in $NDPI_HOME)
- NDPI_LIB=$NDPI_HOME/src/lib/libndpi.a
- AC_MSG_CHECKING(for $NDPI_LIB)
- if test -r $NDPI_LIB ; then :
- AC_MSG_RESULT(found $NDPI_LIB)
- else
- AC_MSG_RESULT(not found $NDPI_LIB: compiling)
- cd $NDPI_HOME; ./autogen.sh; make; cd -
- fi
- NDPI_INC="-I$NDPI_HOME/src/include -I$NDPI_HOME/src/lib/third_party/include"
- NDPI_LIB=$NDPI_HOME/src/lib/libndpi.a
- NDPI_LIB_DEP=$NDPI_LIB
- else
- AC_MSG_RESULT(not found)
- fi
- ])
-
-if test ! -z "$NDPI_CUST_INC" ; then :
- NDPI_INC=$NDPI_CUST_INC
-fi
-
-if test ! -z "$NDPI_CUST_LIB" ; then :
- NDPI_LIB=$NDPI_CUST_LIB
-fi
-
-if test -z "$NDPI_INC" || test -z "$NDPI_LIB" ; then :
- echo "Could not find nDPI"
- echo "Please do cd ..; git clone https://github.com/ntop/nDPI.git; cd nDPI; ./autogen.sh; make; cd ../ntopng"
- echo "and try again"
- exit 1
-fi
-dnl finish: nDPI handling
+PKG_CHECK_MODULES([NDPI], [libndpi >= 2.6])
if test -z `pkg-config --exists libssl`; then
AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
@@ -590,8 +543,8 @@ AC_SUBST(GIT_INDEX)
AC_SUBST(INSTALL_DIR)
AC_SUBST(MAN_DIR)
AC_SUBST(NDPI_HOME)
-AC_SUBST(NDPI_INC)
-AC_SUBST(NDPI_LIB)
+AC_SUBST(NDPI_INC, [$NDPI_CFLAGS])
+AC_SUBST(NDPI_LIB, [$NDPI_LIBS])
AC_SUBST(NDPI_LIB_DEP)
AC_SUBST(HIREDIS_INC)
AC_SUBST(HIREDIS_LIB)
|