summaryrefslogtreecommitdiff
path: root/net/ntopng/files/patch-configure.ac.in
diff options
context:
space:
mode:
Diffstat (limited to 'net/ntopng/files/patch-configure.ac.in')
-rw-r--r--net/ntopng/files/patch-configure.ac.in157
1 files changed, 93 insertions, 64 deletions
diff --git a/net/ntopng/files/patch-configure.ac.in b/net/ntopng/files/patch-configure.ac.in
index 0eb772b211f8..2efdccd10217 100644
--- a/net/ntopng/files/patch-configure.ac.in
+++ b/net/ntopng/files/patch-configure.ac.in
@@ -1,6 +1,6 @@
---- configure.ac.in.orig 2023-05-31 14:54:04 UTC
+--- configure.ac.in.orig 2023-11-03 09:27:20 UTC
+++ configure.ac.in
-@@ -90,40 +90,8 @@ LIBPCAP=-lpcap
+@@ -142,40 +142,8 @@ LIBPCAP=-lpcap
MAKE=make
BIN_PATH=/usr/bin
LIBPCAP=-lpcap
@@ -42,13 +42,13 @@
dnl> Remove spaces
OS="${OS#"${OS%%[![:space:]]*}"}"
-@@ -165,15 +133,6 @@ fi
+@@ -220,15 +188,6 @@ fi
LIBS="${LIBS} -lnetfilter_queue -lnfnetlink -lnetfilter_conntrack"
fi
-if test -d "/usr/local/include"; then
- CFLAGS="${CFLAGS} -I/usr/local/include"
-- CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
+- CXXFLAGS="${CXXFLAGS} -I/usr/local/include"
-fi
-
-if test -d "/usr/local/lib"; then
@@ -57,8 +57,8 @@
-
if test -d /opt/local/include; then :
CFLAGS="${CFLAGS} -I/opt/local/include"
- CPPFLAGS="${CPPFLAGS} -I/opt/local/include"
-@@ -227,15 +186,12 @@ AC_ARG_WITH(ndpi-includes,
+ CXXFLAGS="${CXXFLAGS} -I/opt/local/include"
+@@ -282,15 +241,12 @@ AC_ARG_WITH(ndpi-includes,
NDPI_CUST_INC="-I$withval -I$withval/../lib/third_party/include"
])
@@ -72,15 +72,15 @@
-
-AC_MSG_CHECKING(for nDPI source)
+PKG_CHECK_MODULES([NDPI], [libndpi >= 2.0], [
-+ NDPI_INC=`echo $NDPI_CFLAGS | sed -e "s/[ ]*$//"`
-+ NDPI_LIB="$NDPI_LIBS"
-+ NDPI_LIB_DEP=
-+ ], [
++ NDPI_INC=`echo $NDPI_CFLAGS | sed -e "s/[ ]*$//"`
++ NDPI_LIB="$NDPI_LIBS"
++ NDPI_LIB_DEP=
++ ], [
+ AC_MSG_CHECKING(for nDPI source)
if test -d "./nDPI" ; then :
NDPI_HOME=./nDPI
elif test -d "../nDPI" ; then :
-@@ -260,8 +216,8 @@ AC_MSG_CHECKING(for nDPI source)
+@@ -315,8 +271,8 @@ AC_MSG_CHECKING(for nDPI source)
else
AC_MSG_RESULT(not found)
fi
@@ -90,51 +90,75 @@
if test ! -z "$NDPI_CUST_INC" ; then :
NDPI_INC=$NDPI_CUST_INC
fi
-@@ -278,18 +234,14 @@ dnl finish: nDPI handling
- fi
- dnl finish: nDPI handling
+@@ -339,46 +295,9 @@ AC_ARG_WITH(json-c-static,
+ [PKG_CHECK_MODULES(JSON, json-c, [], [AC_MSG_ERROR(Please install libjson-c-dev package prerequisite)])]
+ )
--if test $SYSTEM = "FreeBSD"; then
-- JSON_LIB=/usr/local/lib/libjson-c.a
-- JSON_INC=`pkg-config --cflags json-c`
-+
-+pkg-config --exists json-c
-+if test "$?" -ne 1; then
-+ JSON_INC=`pkg-config --cflags json-c`
-+ JSON_LIB=`pkg-config --libs json-c`
- else
-- pkg-config --exists json-c
-- if test "$?" -ne 1; then
-- JSON_INC=`pkg-config --cflags json-c`
-- JSON_LIB=`pkg-config --libs json-c`
-- else
-- echo "Please install libjson-c-dev package prerequisite"
-- exit -1
-- fi
-+ echo "Please install libjson-c-dev package prerequisite"
-+ exit -1
- fi
+-if test -x /bin/freebsd-version; then
+- FREEBSD_VERSION=`freebsd-version | cut -f 1 -d '.'`
+-fi
++SSL_INC="-I%%SSL_INC%%"
++SSL_LIB="-L%%SSL_LIB%% -lssl -lcrypto"
- pkg-config --exists libssl
-@@ -447,11 +399,7 @@ if test "$?" -ne 1; then
- pkg-config --exists hiredis
- if test "$?" -ne 1; then
- HIREDIS_INC="`pkg-config --cflags hiredis` -I/usr/include/hiredis"
-- if test $SYSTEM = "FreeBSD"; then
-- HIREDIS_LIB="/usr/local/lib/libhiredis.a"
-- else
-- HIREDIS_LIB="`pkg-config --libs hiredis`"
+-if test "${FREEBSD_VERSION}" != "14"; then
+-pkg-config --exists libssl
+-if test "$?" -ne 1; then
+- AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
+- SSL_INC="`pkg-config --cflags libssl` -I/usr/include/openssl"
+- SSL_LIB="`pkg-config --libs libssl` -lssl -lcrypto"
+-else
+- dnl Workaround for MacOS Brew
+- if test -d "/usr/local/Cellar/openssl@1.1"; then
+- AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
+- SSL_INC="-I/usr/local/Cellar/openssl@1.1/include"
+- SSL_LIB="-L/usr/local/Cellar/openssl@1.1 -lssl -lcrypto"
+- elif test -d "/usr/local/opt/openssl/lib"; then
+- AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
+- SSL_INC="-I/usr/local/opt/openssl/include"
+- SSL_LIB="-L/usr/local/opt/openssl/lib -lssl -lcrypto"
+- elif test -d "/opt/homebrew/Cellar/openssl@1.1"; then
+- AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
+- SSL_INC="-I/opt/homebrew/Cellar/openssl@1.1/include"
+- SSL_LIB="-L/opt/homebrew/Cellar/openssl@1.1 -lssl -lcrypto"
+- elif test -d "/usr/local/opt/openssl/lib"; then
+- AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
+- SSL_INC="-I/usr/local/opt/openssl/include"
+- SSL_LIB="-L/usr/local/opt/openssl/lib -lssl -lcrypto"
+- dnl Workaround for FreeBSD
+- elif test -f "/usr/lib/libssl.so"; then
+- AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
+- SSL_INC="-I/usr/include"
+- SSL_LIB="-L/usr/lib -lssl -lcrypto"
+- else
+- echo "Please install openssl-dev(el) package prerequisite"
+- exit -1
- fi
-+ HIREDIS_LIB="`pkg-config --libs hiredis`"
- else
- echo "Please install hiredis package prerequisite"
- exit -1
-@@ -469,14 +417,14 @@ if test "${with_nedge+set}" != set; then
+-fi
+-fi
+-
+ AC_MSG_CHECKING([PF_RING nBPF])
+ NBPF_HOME=${PWD}/../PF_RING/userland/nbpf
+ LIBNBPF=${NBPF_HOME}/libnbpf.a
+@@ -510,12 +429,8 @@ AS_VAR_IF(with_hiredis, yes, [
+ pkg-config --exists hiredis
+ if test "$?" -ne 1; then
+ HIREDIS_INC="`pkg-config --cflags hiredis` -I/usr/include/hiredis"
+- if test $SYSTEM = "FreeBSD"; then
+- HIREDIS_LIB="/usr/local/lib/libhiredis.a"
++ HIREDIS_LIB="`pkg-config --libs hiredis`"
+ else
+- HIREDIS_LIB="`pkg-config --libs hiredis`"
+- fi
+- else
+ echo "Please install hiredis package prerequisite"
+ exit -1
+ fi
+@@ -533,14 +448,14 @@ if test "${with_nedge+set}" != set; then
fi
if test $SYSTEM = "FreeBSD"; then
- LIBPCAP="${PF_RING_HOME}/userland/libpcap/libpcap.a"
-+ # Use pcap from base
++ # Use pcap from base
else
if test -d ${PF_RING_HOME}; then
AC_MSG_CHECKING(for PF_RING source installed in $PF_RING_HOME)
@@ -146,8 +170,8 @@
AC_DEFINE_UNQUOTED(HAVE_PF_RING, 1, [Native PF_RING support])
if test -f "${PF_RING_HOME}/userland/lib/libpfring.a"; then
echo "${PF_RING_HOME}/userland/libpcap/libpcap.a"
-@@ -496,18 +444,18 @@ if test "${with_nedge+set}" != set; then
- CPPFLAGS="${CPPFLAGS} -I/opt/pfring/include"
+@@ -560,18 +475,18 @@ if test "${with_nedge+set}" != set; then
+ CXXFLAGS="${CXXFLAGS} -I/opt/pfring/include"
echo "Using PF_RING installed in /opt/pfring"
else
- if test -f "/usr/local/lib/libpfring.a"; then
@@ -156,8 +180,8 @@
- echo "Using PF_RING installed in /usr/local/lib"
+ if test -f "%%LOCALBASE%%/lib/libpfring.a"; then
+ if test -f "%%LOCALBASE%%/lib/libpcap.a"; then
-+ LIBS="${LIBS} %%LOCALBASE%%/lib/libpfring.a"
-+ echo "Using PF_RING installed in %%LOCALBASE%%/lib"
++ LIBS="${LIBS} %%LOCALBASE%%/lib/libpfring.a"
++ echo "Using PF_RING installed in %%LOCALBASE%%/lib"
AC_CHECK_LIB([pcap], [pcap_open_live], pcap=true)
if test x$pcap = x
then
@@ -171,16 +195,21 @@
echo "Please make sure you have installed your PF_RING libraries and try again"
exit 1
fi
-@@ -656,9 +604,9 @@ dnl> FreeBSD
+@@ -756,14 +671,12 @@ else
+ echo "Building without support for MySQL libraries."
+ fi
+ else
+- if test "${FREEBSD_VERSION}" != "14"; then
+ dnl> FreeBSD
+ if test -f "/usr/local/lib/mysql/libmysqlclient.a"; then
+- MYSQL_LIB=/usr/local/lib/mysql/libmysqlclient.a
+- MYSQL_INC="-I /usr/local/include/mysql/"
+- AC_DEFINE_UNQUOTED(HAVE_MYSQL, 1, [use mysql])
++ MYSQL_LIB="-L%%LOCALBASE%%/lib/mysql -lmysqlclient"
++ MYSQL_INC="-I%%LOCALBASE%%/include/mysql"
++ AC_DEFINE_UNQUOTED(HAVE_MYSQL, 1, [use mysql])
+ fi
+- fi
fi
- dnl> FreeBSD
--dnl> MYSQL_LIB=/usr/local/lib/mysql/libmysqlclient.a
--dnl> MYSQL_INC="-I /usr/local/include/mysql/"
--dnl> AC_DEFINE_UNQUOTED(HAVE_MYSQL, 1, [use mysql])
-+MYSQL_LIB="-L%%LOCALBASE%%/lib/mysql -lmysqlclient"
-+MYSQL_INC="-I%%LOCALBASE%%/include/mysql"
-+AC_DEFINE_UNQUOTED(HAVE_MYSQL, 1, [use mysql])
-
- if test $SYSTEM != "FreeBSD"; then
- if test "${with_nedge+set}" != set; then
+ AC_CHECK_LIB([expat], [XML_ParserCreate], expat=true)