summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/ntopng/files/0001-configure.ac.in-fix-host-contamination.patch
blob: 852116dec44cbef1edcbea0fc67155b1f967d829 (plain)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
From d9458227ddb4bbb8c63c607202a6854886d66090 Mon Sep 17 00:00:00 2001
From: Mingli Yu <mingli.yu@windriver.com>
Date: Wed, 4 Nov 2020 06:28:28 +0000
Subject: [PATCH] configure.ac.in: fix host contamination

Fix below error:
This autoconf log indicates errors, it looked at host include and/or
library paths while determining system capabilities.

Upstream-Status: Inappropriate [OE specific]

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 configure.ac.in | 43 +++----------------------------------------
 1 file changed, 3 insertions(+), 40 deletions(-)

--- a/configure.ac.in
+++ b/configure.ac.in
@@ -83,30 +83,6 @@ if test "$with_dynamic_ndpi" = "yes"; th
   AC_DEFINE([HAVE_DYNAMIC_NDPI], [1], [Define if using dynamic linking with nDPI])
 fi
 
-dnl> CLANG_STDLIB="-stdlib=libc++"
-
-dnl> On Ubuntu do sudo apt-get install -y clang-14  clang-tools-14
-if test "x$USE_CLANG" = xyes; then
-    if test $SYSTEM = "Darwin"; then
-        CC=clang
-        CXX="clang++ -fno-color-diagnostics -fPIE -stdlib=libc++"
-    else
-       if test -x "/usr/bin/clang-10"; then
-           CLANG_VERSION=10
-       elif test -x "/usr/bin/clang-13"; then
-           CLANG_VERSION=13
-       elif test -x "/usr/bin/clang-14"; then
-           CLANG_VERSION=14
-       else
-           echo "Could not find clang. Please install clang-14 clang-tools-14"
-           exit 1
-       fi
-
-       CC=clang-$CLANG_VERSION
-       CXX="clang++-$CLANG_VERSION -fno-color-diagnostics -fPIE $CLANG_STDLIB"
-    fi
-fi
-
 CFLAGS="${CFLAGS} -I${HERE} -I${HERE}/include"
 CXXFLAGS="${CXXFLAGS} -I${HERE} -I${HERE}/include"
 
@@ -122,7 +98,7 @@ fi
 
 if test -f /proc/device-tree/model; then
   IS_RASPBERRY=`cat /proc/device-tree/model | grep -a -e "Orange Pi" -e Raspberry | wc -l`
-  
+
   if test "$IS_RASPBERRY" = "1"; then
     CFLAGS="${CFLAGS} -DHAVE_EMBEDDED_SUPPORT"
     CXXFLAGS="${CXXFLAGS} -DHAVE_EMBEDDED_SUPPORT"
@@ -158,39 +134,6 @@ MAKE=make
 BIN_PATH=/usr/bin
 LIBPCAP=-lpcap
 
-if test $SYSTEM = "FreeBSD" || test $SYSTEM = "Darwin"; then
-   CFLAGS="${CFLAGS} -I/usr/local/include"
-   LDFLAGS="${LDFLAGS} -L/usr/local/lib"
-
-   dnl> https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
-   CC=clang
-   CXX="clang++ -fpie -fno-color-diagnostics $CLANG_STDLIB"
-   if test $SYSTEM = "FreeBSD"; then
-    MAKE=gmake
-    BIN_PATH=/usr/local/bin
-   else
-     dnl> Adds /opt if MacPorts is installed
-     if [ test -f /opt/local/bin/port ]; then
-       CFLAGS="${CFLAGS} -I/opt/local/include"
-       LDFLAGS="${LDFLAGS} -L/opt/local/lib"
-     fi
-   fi
-   dnl> CXX=clang++ -fsanitize=address -fsanitize-address-use-after-scope
-   OSXV=`sw_vers -productVersion`
-   if test $SYSTEM = "Darwin"; then
-     OS="macOS $OSXV"
-   else
-     OS=`uname -or | cut -d '-' -f 1`
-   fi
-   if test $MACHINE = "x86_64"; then
-      LDFLAGS="${LDFLAGS} -L/usr/local/opt/ntopng"
-      RES=`g++ -Wall -fno-color-diagnostics Prefs.cpp 2>&1 | grep "unrecognized command line option "|wc -l`
-      if test $RES -eq 0; then
-            CFLAGS="-fno-color-diagnostics $CFLAGS"
-      fi
-   fi
-fi
-
 dnl> Remove spaces
 OS="${OS#"${OS%%[![:space:]]*}"}"
 
@@ -237,31 +180,6 @@ if test "${with_nedge+set}" = set; then
   LIBS="${LIBS} -lnetfilter_queue -lnfnetlink -lnetfilter_conntrack"
 fi
 
-if test -d "/usr/local/include"; then
-  CFLAGS="${CFLAGS} -I/usr/local/include"
-  CXXFLAGS="${CXXFLAGS} -I/usr/local/include"
-fi
-
-if test -d "/usr/local/lib"; then
-  LIBS="${LIBS} -L/usr/local/lib"
-fi
-
-if test -d /opt/local/include; then :
-  CFLAGS="${CFLAGS} -I/opt/local/include"
-  CXXFLAGS="${CXXFLAGS} -I/opt/local/include"
-fi
-
-if test -d /opt/local/lib; then :
-  LIBS="${LIBS} -L/opt/local/lib"
-fi
-
-if [ test -f /usr/bin/lsb_release ]; then
-  CODENAME=`/usr/bin/lsb_release -c|cut -f 2`
-  if test $CODENAME = "wheezy" ; then
-    CXXFLAGS="${CXXFLAGS} -DOLD_NETFILTER_INTERFACE=1"
-  fi
-fi
-
 if test -d "pro/"; then
   NTOPCLOUD_LIB=
   NTOPCLOUD_HOME="../ntopcloud"
@@ -317,10 +235,6 @@ AC_ARG_WITH(ndpi-includes,
       NDPI_CUST_INC="-I$withval -I$withval/../lib/third_party/include"
    ])
 
-if test -d /usr/local/include/ndpi ; then :
-   echo "WARNING: /usr/local/include/ndpi is present and might lead to compile errors"
-fi
-
 NDPI_INC=`echo $NDPI_CFLAGS | sed -e "s/[ ]*$//"`
 NDPI_LIB=
 NDPI_LIB_DEP=
@@ -387,7 +301,7 @@ fi
 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_INC="`pkg-config --cflags libssl`"
   SSL_LIB="`pkg-config --libs libssl` -lssl -lcrypto"
 else
   dnl Workaround for MacOS Brew
@@ -490,7 +404,7 @@ if test -d ${TMP_CLICKHOUSE_HOME}; then
  CLICKHOUSE_HOME=${TMP_CLICKHOUSE_HOME}
 fi
 echo "Using clickhouse-cpp stored at ${CLICKHOUSE_HOME}"
-   
+
 AC_DEFINE_UNQUOTED(NTOPNG_PRO_GIT_RELEASE, "r${PRO_GIT_RELEASE}", [ntopng professional release])
 AC_DEFINE_UNQUOTED(NTOPNG_PRO_GIT_DATE, "${PRO_GIT_DATE}", [ntopng professional date])
 DUMMY=`cd ./pro; ${MAKE} build`
@@ -568,7 +482,7 @@ AS_VAR_IF(with_hiredis, yes, [
     else
       pkg-config --exists hiredis
       if test "$?" -ne 1; then
-      HIREDIS_INC="`pkg-config --cflags hiredis` -I/usr/include/hiredis"
+      HIREDIS_INC="`pkg-config --cflags hiredis`"
       if test $SYSTEM = "FreeBSD" && $FREEBSD_VERSION != "15"; then
 	dnl> Note: on freebsd 15 .a is not installed
         HIREDIS_LIB="/usr/local/lib/libhiredis.a"