Commit 89d76022 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Fixed bug that prevented bwm_graph from being built without the build system including rrd.h

* Documented rare build case in which rrdtool does not build
parent 2539c6c5
......@@ -17,7 +17,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
SUBDIRS=$(subdirs) lib bwm_firewall bwm_graph bwmd bwm_monitor doc
SUBDIRS=lib bwm_firewall bwm_graph bwmd bwm_monitor doc
EXTRA_DIST=include/autoclass.h include/common.h include/flow.h include/flowControl.h include/ipq.h
EXTRA_DIST+=include/libipq.h include/misc.h include/report.h include/xmlConf.h
......@@ -146,7 +146,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
RRDTOOL_LIBS = @RRDTOOL_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
......@@ -199,7 +198,7 @@ sharedstatedir = @sharedstatedir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUBDIRS = $(subdirs) lib bwm_firewall bwm_graph bwmd bwm_monitor doc
SUBDIRS = lib bwm_firewall bwm_graph bwmd bwm_monitor doc
EXTRA_DIST = include/autoclass.h include/common.h include/flow.h \
include/flowControl.h include/ipq.h include/libipq.h \
include/misc.h include/report.h include/xmlConf.h
......
......@@ -16,6 +16,14 @@ bwmd:
Bandwidth management daemon, used to manage flows and log traffic stats
Notes:
------
When building BWM Tools with the --with-rrdtool-source option, you MUST
run configure and make from the top_srcdir, due to a build flaw in rrdtool
you CANNOT create a build directory, run ../configure --with-rrdtool-source
and think it will work as expected.
Requirements
------------
GLib >= 2.4.0
......
......@@ -144,7 +144,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
RRDTOOL_LIBS = @RRDTOOL_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
......
......@@ -22,14 +22,21 @@ EXTRA_DIST=graph.h
GLIB_LIBS=@GLIB_LIBS@
GLIB_CFLAGS=@GLIB_CFLAGS@
RRDTOOL_INCLUDEDIR=@RRDTOOL_INCLUDEDIR@
RRDTOOL_LIBS=@RRDTOOL_LIBS@
RRDTOOL_LDADDS=@RRDTOOL_LDADDS@
LOG_DIR=@localstatedir@/bwm_tools
bin_PROGRAMS = bwm_graph
bwm_graph_SOURCES = bwm_graph.c graph.c
bwm_graph_LDADD = $(top_builddir)/lib/libbwm.la
bwm_graph_CFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS) -DLOG_DIR=\"$(LOG_DIR)\" $(AM_CFLAGS)
bwm_graph_DEPENDENCIES = $(RRDTOOL_LDADDS)
bwm_graph_LDADD = $(top_builddir)/lib/libbwm.la $(RRDTOOL_LDADDS)
bwm_graph_CFLAGS = $(RRDTOOL_INCLUDEDIR) -I$(top_srcdir)/include $(GLIB_CFLAGS) -DLOG_DIR=\"$(LOG_DIR)\" $(AM_CFLAGS)
bwm_graph_LDFLAGS = $(GLIB_LIBS) $(RRDTOOL_LIBS)
# Build rrdtool if we need it
$(top_builddir)/rrdtool/src/.libs/librrd.a:
$(MAKE) $(AM_MAKEFLAGS) -C ../rrdtool
......@@ -72,7 +72,7 @@ PROGRAMS = $(bin_PROGRAMS)
am_bwm_graph_OBJECTS = bwm_graph-bwm_graph.$(OBJEXT) \
bwm_graph-graph.$(OBJEXT)
bwm_graph_OBJECTS = $(am_bwm_graph_OBJECTS)
bwm_graph_DEPENDENCIES = $(top_builddir)/lib/libbwm.la
am__DEPENDENCIES_1 =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
......@@ -145,7 +145,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
RRDTOOL_LIBS = @RRDTOOL_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
......@@ -199,10 +198,14 @@ subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
EXTRA_DIST = graph.h
RRDTOOL_INCLUDEDIR = @RRDTOOL_INCLUDEDIR@
RRDTOOL_LIBS = @RRDTOOL_LIBS@
RRDTOOL_LDADDS = @RRDTOOL_LDADDS@
LOG_DIR = @localstatedir@/bwm_tools
bwm_graph_SOURCES = bwm_graph.c graph.c
bwm_graph_LDADD = $(top_builddir)/lib/libbwm.la
bwm_graph_CFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS) -DLOG_DIR=\"$(LOG_DIR)\" $(AM_CFLAGS)
bwm_graph_DEPENDENCIES = $(RRDTOOL_LDADDS)
bwm_graph_LDADD = $(top_builddir)/lib/libbwm.la $(RRDTOOL_LDADDS)
bwm_graph_CFLAGS = $(RRDTOOL_INCLUDEDIR) -I$(top_srcdir)/include $(GLIB_CFLAGS) -DLOG_DIR=\"$(LOG_DIR)\" $(AM_CFLAGS)
bwm_graph_LDFLAGS = $(GLIB_LIBS) $(RRDTOOL_LIBS)
all: all-am
......@@ -505,6 +508,10 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-info-am
# Build rrdtool if we need it
$(top_builddir)/rrdtool/src/.libs/librrd.a:
$(MAKE) $(AM_MAKEFLAGS) -C ../rrdtool
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
......@@ -35,6 +35,7 @@
#include <time.h>
#include <unistd.h>
#include <rrd.h>
#include "common.h"
#include "graph.h"
#include "misc.h"
......
......@@ -145,7 +145,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
RRDTOOL_LIBS = @RRDTOOL_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
......
......@@ -147,7 +147,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
RRDTOOL_LIBS = @RRDTOOL_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
......
......@@ -464,7 +464,7 @@ ac_includes_default="\
#endif"
 
ac_subdirs_all="$ac_subdirs_all rrdtool"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL subdirs RRDTOOL_LIBS ALLOCA LIBOBJS PKG_CONFIG GLIB_CFLAGS GLIB_LIBS GLIB_GENMARSHAL GOBJECT_QUERY GLIB_MKENUMS XML2_CONFIG XML_CPPFLAGS XML_LIBS XML_CFLAGS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL subdirs RRDTOOL_LDADDS RRDTOOL_LIBS RRDTOOL_INCLUDEDIR ALLOCA LIBOBJS PKG_CONFIG GLIB_CFLAGS GLIB_LIBS GLIB_GENMARSHAL GOBJECT_QUERY GLIB_MKENUMS XML2_CONFIG XML_CPPFLAGS XML_LIBS XML_CFLAGS LTLIBOBJS'
ac_subst_files=''
 
# Initialize some variables set by options.
......@@ -19497,7 +19497,8 @@ if test "${with_rrdtool_source+set}" = set; then
 
subdirs="$subdirs rrdtool"
 
RRDTOOL_LIBS="\$(top_builddir)/rrdtool/src/.libs/librrd.a"
RRDTOOL_LDADDS="\$(top_builddir)/rrdtool/src/.libs/librrd.a"
RRDTOOL_INCLUDEDIR="-I\$(top_builddir)/rrdtool/src"
 
else
 
......@@ -24122,7 +24123,9 @@ s,@FFLAGS@,$FFLAGS,;t t
s,@ac_ct_F77@,$ac_ct_F77,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@subdirs@,$subdirs,;t t
s,@RRDTOOL_LDADDS@,$RRDTOOL_LDADDS,;t t
s,@RRDTOOL_LIBS@,$RRDTOOL_LIBS,;t t
s,@RRDTOOL_INCLUDEDIR@,$RRDTOOL_INCLUDEDIR,;t t
s,@ALLOCA@,$ALLOCA,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@PKG_CONFIG@,$PKG_CONFIG,;t t
......
......@@ -46,7 +46,8 @@ AC_ARG_WITH([rrdtool-source],
[ --with-rrdtool-source Specify that you have the rrdtool sources in the main build dir],
[
AC_CONFIG_SUBDIRS(rrdtool)
RRDTOOL_LIBS="\$(top_builddir)/rrdtool/src/.libs/librrd.a"
RRDTOOL_LDADDS="\$(top_builddir)/rrdtool/src/.libs/librrd.a"
RRDTOOL_INCLUDEDIR="-I\$(top_builddir)/rrdtool/src"
],
[
AC_CHECK_LIB([rrd], [rrd_create],have_librrd=yes,,"-lm")
......@@ -68,7 +69,7 @@ AC_ARG_WITH([rrdtool-source],
fi
RRDTOOL_LIBS="-lm -lrrd"
])
AC_SUBST(RRDTOOL_LIBS)
AC_SUBST(RRDTOOL_LDADDS RRDTOOL_LIBS RRDTOOL_INCLUDEDIR)
# Checks for header files.
AC_HEADER_STDC
......
......@@ -136,7 +136,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
RRDTOOL_LIBS = @RRDTOOL_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
......
......@@ -149,7 +149,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
RRDTOOL_LIBS = @RRDTOOL_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment