Luca, here are some of the other patches that I'm using on the Fedora ntop.
Some by me, but some figured out by Patrice.
(order is important to some patches)
ntop-nolibs.patch (better detection of libraries)
ntop-fix-missing-js.patch (fix missing javascript files on installed
directories)
ntop-configure-mysql.patch (fix detection of mysql)
ntop-fix-cflags.patch (disable extra cflags information)
ntop-rrd-cleanup.patch (cleanup rrd lib/include detection)
ntop-LINUXfedora.patch (fix LIBS vs LDFLAGS cleanup in LINUXfedora)
_________________________________________________________________
Exercise your brain! Try Flexicon.
http://games.msn.com/en/flexicon/default.htm?icid=flexicon_hmemailtaglinemarch07
--- ntop/configure.in.orig 2004-12-21 05:07:08.000000000 +0100
+++ ntop/configure.in 2005-05-19 11:07:21.000000000 +0200
@@ -2198,10 +2198,8 @@
AC_CHECK_LIB([c], [ceil], , [AC_CHECK_LIB([m], [ceil])])
dnl> Networking libraries
-AC_CHECK_LIB([nsl], [main])
-AC_CHECK_LIB([xnet], [main])
-AC_CHECK_LIB([socket], [main])
-AC_CHECK_LIB([resolv], [main])
+AC_SEARCH_LIBS([gethostbyname], [nsl resolv])
+AC_SEARCH_LIBS([socket], [xnet socket])
dnl> Multithreading libraries
AC_CHECK_LIB(pthread, pthread_create, , [
@@ -2223,9 +2223,9 @@
dnl>AC_CHECK_LIB([wrap], [hosts_access])
dnl> XML dump (plugin)
-AC_CHECK_LIB([glib], [g_date_julian])
-AC_CHECK_LIB([xml2], [xmlCheckVersion])
-AC_CHECK_LIB([gdome], [gdome_di_saveDocToFile])
+AC_CHECK_LIB([glib-2.0], [g_date_get_julian], [:])
+AC_CHECK_LIB([xml2], [xmlCheckVersion], [:])
+AC_CHECK_LIB([gdome], [gdome_di_saveDocToFile], [:])
dnl> Functions and types
AC_FUNC_ALLOCA
--- ntop/configure.in.orig 2007-02-06 14:50:26.000000000 -0700
+++ ntop/configure.in 2007-02-07 01:33:14.000000000 -0700
@@ -1924,7 +1924,7 @@
if test ".${ac_cv_header_glib_h}" = ".yes" &&
test ".${ac_cv_header_glibconfig_h}" = ".yes" &&
test ".${ac_cv_header_gdome_h}" = ".yes" &&
- test ".${ac_cv_lib_glib_g_date_julian}" = ".yes" &&
+ test ".${ac_cv_lib_glib_2_0_g_date_get_julian}" = ".yes" &&
test ".${ac_cv_lib_xml2_xmlCheckVersion}" = ".yes" &&
test ".${ac_cv_lib_gdome_gdome_di_saveDocToFile}" = ".yes"; then
AC_MSG_RESULT(ok)
@@ -1940,7 +1940,7 @@
echo "* gdome.h...${ac_cv_header_gdome_h}"
echo "* libgdome.so or libgdome.a...${ac_cv_lib_gdome_gdome_di_saveDocToFile}"
echo "* glib.h...${ac_cv_header_glib_h}"
- echo "* libglib.so or libglib.a...${ac_cv_lib_glib_g_date_julian}"
+ echo "* libglib.so or libglib.a...${ac_cv_lib_glib_2_0_g_date_get_julian}"
echo "* glibconfig.h...${ac_cv_header_glibconfig_h}"
echo "*"
echo "* (yes means it was found, no means it was not found)"
--- ntop/Makefile.am 2006-06-13 09:52:26.000000000 -0600
+++ ntop.edit/Makefile.am 2007-03-07 16:11:11.000000000 -0700
@@ -86,7 +86,9 @@
html/*.css html/*.dtd \
html/statsicons \
html/statsicons/flags html/statsicons/os \
- html/statsicons/flags/*.gif html/statsicons/os/*.gif
+ html/statsicons/flags/*.gif html/statsicons/os/*.gif \
+ html/PlotKit html/PlotKit/*.js \
+ html/MochiKit html/MochiKit/*.js
WEBFILES = `cat www/FILES`
PLUGINSFILES = `cat plugins/FILES`
--- ntop/configure.in.mysql 2007-03-07 12:32:30.000000000 +0100
+++ ntop/configure.in 2007-03-11 00:50:07.000000000 +0100
@@ -144,13 +144,13 @@
AC_ARG_ENABLE(mysql,
[ --enable-mysql Enable usage of mysql [[default=enabled]]],
- if test "x$enableval" = xyes; then
- ac_with_mysql="no"
- else
- echo "x$enableval"
+ [if test "x$enableval" = xyes; then
ac_with_mysql="yes"
- fi,
- ac_with_mysql="yes")
+ else
+dnl echo "x$enableval"
+ ac_with_mysql="no"
+ fi],
+ [ac_with_mysql="yes"])
AC_ARG_ENABLE(void,
[ +----------------------------------------------------------------------------+])
--- ntop/Makefile.am.orig 2007-03-14 15:19:34.000000000 -0600
+++ ntop/Makefile.am 2007-03-16 10:26:31.000000000 -0600
@@ -44,7 +44,7 @@
AWK = @AWK@
CC = @CC@
CCLD = @CCLD@
-AM_CFLAGS = @CFLAGS@
+AM_CFLAGS =
AM_LDFLAGS= @LDFLAGS@
--- ntop/plugins/Makefile.am.rrd 2007-03-16 23:15:08.000000000 +0100
+++ ntop/plugins/Makefile.am 2007-03-16 23:15:16.000000000 +0100
@@ -32,10 +32,6 @@
SUFFIXES = .so
[EMAIL PROTECTED]@
-RRD_INC=-I${RRD_HOME}/include
-RRD_LIB=-L${RRD_HOME}/lib -lrrd_th
-
#
# Where to install the plugin
#
--- ntop/Makefile.am.rrd 2007-03-16 23:01:00.000000000 +0100
+++ ntop/Makefile.am 2007-03-16 23:01:00.000000000 +0100
@@ -33,10 +33,6 @@
DEFS = @DEFS@
INCS = @INCS@
[EMAIL PROTECTED]@
-RRD_INC=-I${RRD_HOME}/include
-RRD_LIB=-L${RRD_HOME}/lib -lrrd_th
-
INCLUDES = -I. $(INCS) ${RRD_INC}
LIBS =
BASE_LIBS = @LIBS@ ${RRD_LIB}
@@ -44,8 +40,9 @@
AWK = @AWK@
CC = @CC@
CCLD = @CCLD@
-AM_CFLAGS =
-AM_LDFLAGS= @LDFLAGS@
+
+#AM_CFLAGS =
+#AM_LDFLAGS=
DISTCLEANFILES = trivialcompilemessage *.db #* *~ *.log
--- ntop/configure.in.rrd 2007-03-16 23:01:00.000000000 +0100
+++ ntop/configure.in 2007-03-16 23:01:00.000000000 +0100
@@ -1229,6 +1229,8 @@
RRD_HOME=/usr/local/rrdtool
fi
+RRD_LIB="-L${RRD_HOME}/lib -lrrd_th"
+
if test -f "$RRD_HOME/lib/librrd_th.so"; then
AC_MSG_RESULT(Found RRD)
else
@@ -1242,11 +1244,18 @@
if test ".${ac_cv_lib_rrd_th_main}" != ".yes"; then
AC_MSG_ERROR(Unable to find RRD at $RRD_HOME: please use --with-rrd-home=DIR);
AC_MSG_ERROR(RRD source can be downloaded from http://www.rrdtool.org/);
- fi
+ else
+ RRD_LIB=
+ fi
fi
fi
fi
+RRD_INC=
+if test -d "${RRD_HOME}/include"; then
+ RRD_INC="-I${RRD_HOME}/include"
+fi
+
dnl> The failed recheck stuff below is courtesy of Chris Turbeville [EMAIL PROTECTED]
dnl> Chris developed this for Solaris 9, confirming work I had done earlier for FreeBSD
dnl> And thank to Julien TOUCHE [EMAIL PROTECTED] for the OpenBSD dependencies
@@ -2328,7 +2337,8 @@
AC_SUBST(CFG_RUN_DIR)
AC_SUBST(SCRIPTVER)
AC_SUBST(SO_VERSION_PATCH)
-AC_SUBST(RRD_HOME)
+AC_SUBST(RRD_LIB)
+AC_SUBST(RRD_INC)
AC_CONFIG_FILES([Makefile])
--- ntop/configureextra/LINUXfedora.fix 2007-03-16 22:54:56.000000000 +0100
+++ ntop/configureextra/LINUXfedora 2007-03-16 22:59:31.000000000 +0100
@@ -16,12 +16,12 @@
# Note - this assumes you've installed the RH rpms:
# glib, glib-devel, libxml2, libxml2-devel
# and the gdome2 and gdome2-devel rpms from http://gdome2.cs.unibo.it/
-if test -f /usr/lib/pkgconfig/glib-2.0.pc; then
- LDFLAGS="${LDFLAGS} "`pkg-config --libs glib-2.0`
+if pkg-config --exists --print-errors glib-2.0; then
+ LIBS="${LIBS} "`pkg-config --libs glib-2.0`
CPPFLAGS="${CPPFLAGS} "`pkg-config --cflags-only-I glib-2.0`
else
if test -f /usr/lib/libglib.so; then
- LDFLAGS="${LDFLAGS} -lglib"
+ LIBS="${LIBS} -lglib"
fi
if test -d /usr/include/glib-1.2; then
CPPFLAGS="${CPPFLAGS} -I/usr/include/glib-1.2"
@@ -33,8 +33,8 @@
CPPFLAGS="${CPPFLAGS} -I/usr/lib/glib/include"
fi
fi
-if test -f /usr/lib/pkgconfig/gdome2.pc; then
- LDFLAGS="${LDFLAGS} "`pkg-config --libs gdome2`
+if pkg-config --exists --print-errors gdome2; then
+ LIBS="${LIBS} "`pkg-config --libs gdome2`
CPPFLAGS="${CPPFLAGS} "`pkg-config --cflags-only-I gdome2`
else
if test -d /usr/include/libgdome; then
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev