Commit a06b4b67 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Added configure option to build with rrdtool-1.2.x

parent 89d76022
......@@ -18,11 +18,20 @@ bwmd:
Notes:
------
When building BWM Tools with the --with-rrdtool-source option, you MUST
1. 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.
2. If you're building BWM Tools with the --with-rrdtool-source options, and
you're using rrdtool 1.2.x you might need to add the --disable-rrdcgi option
if the configure complains about cgilib.
3. Furthermore the rrdtool directory is only built, it is not cleaned when
running make clean, nor is it installed when running make install. If you
need to run a make command on it, CD into it and do it from there.
Requirements
------------
......
......@@ -25,6 +25,7 @@ GLIB_CFLAGS=@GLIB_CFLAGS@
RRDTOOL_INCLUDEDIR=@RRDTOOL_INCLUDEDIR@
RRDTOOL_LIBS=@RRDTOOL_LIBS@
RRDTOOL_LDADDS=@RRDTOOL_LDADDS@
RRDTOOL_VER=@RRDTOOL_VER@
LOG_DIR=@localstatedir@/bwm_tools
......@@ -32,11 +33,11 @@ bin_PROGRAMS = bwm_graph
bwm_graph_SOURCES = bwm_graph.c graph.c
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_CFLAGS = $(RRDTOOL_INCLUDEDIR) -I$(top_srcdir)/include $(GLIB_CFLAGS) -DLOG_DIR=\"$(LOG_DIR)\" -DRRDTOOL_VER=$(RRDTOOL_VER) $(AM_CFLAGS)
bwm_graph_LDFLAGS = $(GLIB_LIBS) $(RRDTOOL_LIBS)
# Build rrdtool if we need it
$(top_builddir)/rrdtool/src/.libs/librrd.a:
$(top_builddir)/rrdtool/src/librrd.la:
$(MAKE) $(AM_MAKEFLAGS) -C ../rrdtool
......@@ -201,11 +201,12 @@ EXTRA_DIST = graph.h
RRDTOOL_INCLUDEDIR = @RRDTOOL_INCLUDEDIR@
RRDTOOL_LIBS = @RRDTOOL_LIBS@
RRDTOOL_LDADDS = @RRDTOOL_LDADDS@
RRDTOOL_VER = @RRDTOOL_VER@
LOG_DIR = @localstatedir@/bwm_tools
bwm_graph_SOURCES = bwm_graph.c graph.c
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_CFLAGS = $(RRDTOOL_INCLUDEDIR) -I$(top_srcdir)/include $(GLIB_CFLAGS) -DLOG_DIR=\"$(LOG_DIR)\" -DRRDTOOL_VER=$(RRDTOOL_VER) $(AM_CFLAGS)
bwm_graph_LDFLAGS = $(GLIB_LIBS) $(RRDTOOL_LIBS)
all: all-am
......@@ -510,7 +511,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am
# Build rrdtool if we need it
$(top_builddir)/rrdtool/src/.libs/librrd.a:
$(top_builddir)/rrdtool/src/librrd.la:
$(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.
......
......@@ -488,6 +488,7 @@ int writeGraphs(GList *graphSources, struct graphOptions_t *options)
int result = 0;
char **prdata;
int xsize, ysize;
double ymin, ymax;
int numParams = 0;
char *lineColors[] = {"ff0033","3300ff","993399","cc9900",NULL};
int curColor = 0;
......@@ -626,15 +627,22 @@ int writeGraphs(GList *graphSources, struct graphOptions_t *options)
ADD_SINGLE_PARAM(params,numParams,"COMMENT:%s\\c","Graph generated by bwm_tools v"PACKAGE_VERSION" (http://bwm-tools.lbsd.net)");
// Call rrd tool
optind = 0; opterr = 0;
optind = 0; opterr = 0;
// Lets make sure we call it correctly
#if (RRDTOOL_VER == 0)
result = rrd_graph(numParams,params,&prdata,&xsize,&ysize);
#elif (RRDTOOL_VER == 2)
result = rrd_graph(numParams,params,&prdata,&xsize,&ysize,NULL,&ymin,&ymax);
#else
#warning Your version of rrdtool is not supported
#endif
if (result < 0)
{
fprintf(stderr,"Failed to create RRD graph %s: %s\n",options->outputFile,rrd_get_error());
result = -1;
}
else
printf("done\n");
printf("done (%dx%d)\n",xsize,ysize);
// Free memory
for (i = 0; i < numParams; i++)
......
......@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2004-01-24'
timestamp='2004-03-12'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
......@@ -197,12 +197,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
amd64:OpenBSD:*:*)
echo x86_64-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
cats:OpenBSD:*:*)
echo arm-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
......@@ -239,10 +245,24 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit 0 ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
case $UNAME_RELEASE in
*4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
......@@ -280,11 +300,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha*:OpenVMS:*:*)
echo alpha-hp-vms
......@@ -832,6 +853,9 @@ EOF
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
......
......@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2004-01-05'
timestamp='2004-03-12'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
......@@ -237,7 +237,7 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m68000 | m68k | m88k | mcore \
| m32r | m32rle | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
......@@ -262,7 +262,7 @@ case $basic_machine in
| pyramid \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
......@@ -308,7 +308,7 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| m32r-* \
| m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
......@@ -336,7 +336,7 @@ case $basic_machine in
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
......@@ -363,6 +363,9 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
......@@ -442,12 +445,20 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
cr16c)
basic_machine=cr16c-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
......@@ -1070,7 +1081,7 @@ case $basic_machine in
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv9 | sparcv9b)
sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
......@@ -1143,8 +1154,9 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
......
......@@ -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_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_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 RRDTOOL_VER 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.
......@@ -1046,6 +1046,7 @@ Optional Packages:
both]
--with-tags[=TAGS]
include additional configurations [automatic]
--with-rrdtool2 Specify that you want BWM Tools built against rrdtool 1.2.x
--with-rrdtool-source Specify that you have the rrdtool sources in the main build dir
--with-xml-prefix=PFX Prefix where libxml is installed (optional)
--with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)
......@@ -3754,7 +3755,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 3757 "configure"' > conftest.$ac_ext
echo '#line 3758 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
......@@ -5326,7 +5327,7 @@ fi
 
 
# Provide some information about the compiler.
echo "$as_me:5329:" \
echo "$as_me:5330:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
......@@ -6360,11 +6361,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6363: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6364: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:6367: \$? = $ac_status" >&5
echo "$as_me:6368: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
......@@ -6593,11 +6594,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6596: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6597: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:6600: \$? = $ac_status" >&5
echo "$as_me:6601: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
......@@ -6653,11 +6654,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6656: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6657: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:6660: \$? = $ac_status" >&5
echo "$as_me:6661: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -8837,7 +8838,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 8840 "configure"
#line 8841 "configure"
#include "confdefs.h"
 
#if HAVE_DLFCN_H
......@@ -8935,7 +8936,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 8938 "configure"
#line 8939 "configure"
#include "confdefs.h"
 
#if HAVE_DLFCN_H
......@@ -11114,11 +11115,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11117: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11118: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:11121: \$? = $ac_status" >&5
echo "$as_me:11122: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
......@@ -11174,11 +11175,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11177: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11178: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:11181: \$? = $ac_status" >&5
echo "$as_me:11182: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -12535,7 +12536,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 12538 "configure"
#line 12539 "configure"
#include "confdefs.h"
 
#if HAVE_DLFCN_H
......@@ -12633,7 +12634,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 12636 "configure"
#line 12637 "configure"
#include "confdefs.h"
 
#if HAVE_DLFCN_H
......@@ -13460,11 +13461,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13463: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13464: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:13467: \$? = $ac_status" >&5
echo "$as_me:13468: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
......@@ -13520,11 +13521,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13523: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13524: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:13527: \$? = $ac_status" >&5
echo "$as_me:13528: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -15554,11 +15555,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15557: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15558: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15561: \$? = $ac_status" >&5
echo "$as_me:15562: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
......@@ -15787,11 +15788,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15790: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15791: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15794: \$? = $ac_status" >&5
echo "$as_me:15795: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
......@@ -15847,11 +15848,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15850: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15851: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:15854: \$? = $ac_status" >&5
echo "$as_me:15855: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -18031,7 +18032,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 18034 "configure"
#line 18035 "configure"
#include "confdefs.h"
 
#if HAVE_DLFCN_H
......@@ -18129,7 +18130,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 18132 "configure"
#line 18133 "configure"
#include "confdefs.h"
 
#if HAVE_DLFCN_H
......@@ -19489,6 +19490,22 @@ fi
 
 
 
# get version of rrdtool from user
# Check whether --with-rrdtool2 or --without-rrdtool2 was given.
if test "${with_rrdtool2+set}" = set; then
withval="$with_rrdtool2"
RRDTOOL_VER=2
else
RRDTOOL_VER=0
fi;
# rrdtool version 1.x.x
# Check whether --with-rrdtool-source or --without-rrdtool-source was given.
if test "${with_rrdtool_source+set}" = set; then
withval="$with_rrdtool_source"
......@@ -19497,12 +19514,12 @@ if test "${with_rrdtool_source+set}" = set; then
 
subdirs="$subdirs rrdtool"
 
RRDTOOL_LDADDS="\$(top_builddir)/rrdtool/src/.libs/librrd.a"
RRDTOOL_LDADDS="\$(top_builddir)/rrdtool/src/librrd.la"
RRDTOOL_INCLUDEDIR="-I\$(top_builddir)/rrdtool/src"
 
else
 
echo "$as_me:$LINENO: checking for rrd_create in -lrrd" >&5
echo "$as_me:$LINENO: checking for rrd_create in -lrrd" >&5
echo $ECHO_N "checking for rrd_create in -lrrd... $ECHO_C" >&6
if test "${ac_cv_lib_rrd_rrd_create+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
......@@ -19570,27 +19587,33 @@ if test $ac_cv_lib_rrd_rrd_create = yes; then
have_librrd=yes
fi
 
if test x"$have_librrd" = x
then
echo
echo "* - ERROR -"
echo "* You need the development libraries and headers"
echo "* for rrdtool. Normally you can download a"
echo "* package called rrdtool-devel for your"
echo "* distribution, install it and everything should"
echo "* be fine"
echo "*"
echo "* Alternatively, follow these instructions..."
echo "* 1. Download, uncompress and extract rrdtool to the top BWM Tools directory"
echo "* 2. Symlink it, like this -> ln -s rrdtool-x.x.x rrdtool"
echo "* 3. Re-run ./configure with -> --with-rrdtool-source"
exit 1
fi
RRDTOOL_LIBS="-lm -lrrd"
if test x"$have_librrd" = x
then
echo
echo "* - ERROR -"
echo "* You need the development libraries and headers"
echo "* for rrdtool. Normally you can download a"
echo "* package called rrdtool-devel for your"
echo "* distribution, install it and everything should"
echo "* be fine"
echo "*"
echo "* Alternatively, follow these instructions..."
echo "* 1. Download, uncompress and extract rrdtool-1.x.x to the top BWM Tools directory"
echo "* 2. Symlink it, like this -> ln -s rrdtool-1.x.x rrdtool"
echo "* 3. Re-run ./configure with -> --with-rrdtool-source"
echo "*"
echo "* Note:"
echo "* For rrdtool-1.2.x you must add the --with-rrdtool2 flag and possibly"
echo "* also the --disable-rrdcgi flag"
echo "*"
exit 1
fi
RRDTOOL_LIBS="-lm -lrrd"
 
fi;
 
 
# Checks for header files.
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
......@@ -24126,6 +24149,7 @@ 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,@RRDTOOL_VER@,$RRDTOOL_VER,;t t
s,@ALLOCA@,$ALLOCA,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@PKG_CONFIG@,$PKG_CONFIG,;t t
......
......@@ -42,34 +42,52 @@ AC_CHECK_LIB([menu], [new_menu])
AC_CHECK_LIB([ncurses], [curses_version])
AC_CHECK_LIB([panel], [panel_window])
# get version of rrdtool from user
AC_ARG_WITH([rrdtool2],
[ --with-rrdtool2 Specify that you want BWM Tools built against rrdtool 1.2.x],
[
RRDTOOL_VER=2
],
[
RRDTOOL_VER=0
])
# rrdtool version 1.x.x
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_LDADDS="\$(top_builddir)/rrdtool/src/.libs/librrd.a"
RRDTOOL_LDADDS="\$(top_builddir)/rrdtool/src/librrd.la"
RRDTOOL_INCLUDEDIR="-I\$(top_builddir)/rrdtool/src"
],
[
AC_CHECK_LIB([rrd], [rrd_create],have_librrd=yes,,"-lm")
if test x"$have_librrd" = x
then
echo
echo "* - ERROR -"
echo "* You need the development libraries and headers"
echo "* for rrdtool. Normally you can download a"
echo "* package called rrdtool-devel for your"
echo "* distribution, install it and everything should"
echo "* be fine"
echo "*"
echo "* Alternatively, follow these instructions..."
echo "* 1. Download, uncompress and extract rrdtool to the top BWM Tools directory"
echo "* 2. Symlink it, like this -> ln -s rrdtool-x.x.x rrdtool"
echo "* 3. Re-run ./configure with -> --with-rrdtool-source"
exit 1
fi
RRDTOOL_LIBS="-lm -lrrd"
AC_CHECK_LIB([rrd], [rrd_create],have_librrd=yes,,"-lm")
if test x"$have_librrd" = x
then
echo
echo "* - ERROR -"
echo "* You need the development libraries and headers"
echo "* for rrdtool. Normally you can download a"
echo "* package called rrdtool-devel for your"
echo "* distribution, install it and everything should"
echo "* be fine"
echo "*"
echo "* Alternatively, follow these instructions..."
echo "* 1. Download, uncompress and extract rrdtool-1.x.x to the top BWM Tools directory"
echo "* 2. Symlink it, like this -> ln -s rrdtool-1.x.x rrdtool"
echo "* 3. Re-run ./configure with -> --with-rrdtool-source"
echo "*"
echo "* Note:"
echo "* For rrdtool-1.2.x you must add the --with-rrdtool2 flag and possibly"
echo "* also the --disable-rrdcgi flag"
echo "*"
exit 1
fi
RRDTOOL_LIBS="-lm -lrrd"
])