summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 635dd21)
raw | patch | inline | side by side (parent: 635dd21)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 14 Mar 2004 20:58:32 +0000 (20:58 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 14 Mar 2004 20:58:32 +0000 (20:58 +0000) |
diff --git a/program/MakeMakefile b/program/MakeMakefile
index 59d098f1e0a22161fa2518284f4af2b382d78c08..6e2250a610f5cef459d19a67f3954c402b4fad58 100755 (executable)
--- a/program/MakeMakefile
+++ b/program/MakeMakefile
exit 1
fi
-if vcheck 1.7.9 "automake --version"
+#if vcheck 1.8.2 "automake --version"
+#then
+# if vcheck 1.8.2 "automake-1.8 --version"
+# then
+# echo "get a copy of GNU automake >= 1.8.2"
+# exit 1
+# else
+# automake=automake-1.8
+# aclocal="aclocal-1.8 --acdir=/usr/share/aclocal-1.8 -I /usr/share/aclocal/"
+# fi
+#else
+# automake="automake"
+# aclocal="aclocal -I /usr/pack/libtool-1.5-to/share/aclocal"
+#fi
+
+if vcheck 1.7.9 "automake --version"
then
- echo "get a copy of GNU automake >= 1.7.9"
- exit 1
+ if vcheck 1.7.9 "automake-1.7 --version"
+ then
+ echo "get a copy of GNU automake >= 1.79"
+ exit 1
+ else
+ automake=automake-1.7
+ aclocal="aclocal-1.7 --acdir=/usr/share/aclocal-1.7 -I /usr/share/aclocal/"
+ fi
+else
+ automake="automake"
+ aclocal="aclocal -I /usr/pack/libtool-1.5-to/share/aclocal"
fi
if vcheck 2.58 "autoconf --version"
find . -name .debs | xargs rm -r
-rm -rf config
-mkdir config
# wget ftp://ftp.gnu.org/gnu/libtool/libtool-1.5.tar.gz
libtoolize --copy --force
#cp ltmain.sh config
# If autoconf generates undefined MACRO errors, it may be unable
# to find libtool.m4. Add the -I flag to aclocal to specify the
# directory location of this file.
-aclocal -I /usr/pack/libtool-1.5-to/share/aclocal
-automake --foreign --add-missing --force-missing --copy --warnings=all
+$aclocal
+$automake --foreign --add-missing --force-missing --copy --warnings=all
# wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.58.tar.gz
autoconf --warnings=all --force
rm config.h.in
diff --git a/program/acinclude.m4 b/program/acinclude.m4
index 08785921dd7d3a040376e1a692d939694ad98a0f..6c50060a8846e241efa792b218fc50d150cae39a 100644 (file)
--- a/program/acinclude.m4
+++ b/program/acinclude.m4
# ---------------------------------------------
# Contributed by Mat Zimmermann
#
-AC_DEFUN(INCLUDED_LIB,
+AC_DEFUN([INCLUDED_LIB],
[
use_installed_lib$1=
AC_ARG_WITH([lib$1],
index d2eaad343ed20f301fdc2275b603dbfa4614b61d..d723caf389240f46fa482b0a9570797b9a23715e 100644 (file)
cd perl-piped && $(PERL) Makefile.PL $(PERL_MAKE_OPTIONS)
perl_shared: perl-shared/Makefile
- cd perl-shared && $(MAKE)
+ cd perl-shared && $(MAKE) RPATH=$(prefix)/lib
perl-shared/Makefile: perl-shared/Makefile.PL
cd perl-shared && $(PERL) Makefile.PL $(PERLFLAGS) $(PERL_MAKE_OPTIONS)
index 2b59fdb0eccab426679915fd5e4a5f1148e2e5f4..598fc99f72e05cc7fb40252f47778afb901da9ec 100644 (file)
# the contents of the Makefile that is written.
# Specify the location of the archive containing PIC compiled object files.
-my $librrd = "-L../../src/.libs/ -lrrd" ;
+my $R = $^O eq 'Linux' ? "-Wl,--rpath -Wl," : "-R" ;
+my $librrd = "-L../../src/.libs/ $R\$(RPATH) -lrrd";
WriteMakefile(
'NAME' => 'RRDs',
'INC' => '-I../../src -I../../libraries/gd1.3',
# where to look for the necessary libraries
# Perl will figure out which one is valid
- 'depend' => {'RRDs.c' => "../../src/.libs/librrd_private.a"},
+ 'depend' => {'RRDs.c' => "../../src/.libs/librrd.a"},
'dynamic_lib' => {'OTHERLDFLAGS' => "$librrd -lm"},
'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }
);
index 6ee4b3d36cb21e5712e6bcc8054724a14cbb1f6d..fbb885ad839f20a4a9ff60165a860b6e5fa67570 100644 (file)
is also valid.
-
The RRDs::times function takes two parameters: a "start" and "end" time.
-These should be specified in the U<AT-STYLE TIME SPECIFICATION> format
-used by rrdtool. See the U<rrdfetch> documentation for a detailed
+These should be specified in the B<AT-STYLE TIME SPECIFICATION> format
+used by rrdtool. See the B<rrdfetch> documentation for a detailed
explanation on how to specify time.
=head2 Error Handling
index 8154a11a8f8413c0da99555f95238164bb25eeab..7b6c016aba44d848cbc47bbc08a7dc82c9c17250 100755 (executable)
for (my $t=$START+1;
$t<$START+$STEP*$RUNS;
$t+=$STEP+int((rand()-0.5)*7)){
- $counter += 2500*sin($t/2000)*$STEP;
+ $counter += int(2500*sin($t/2000)*$STEP);
my $data = (1000+500*sin($t/1000)).":".
(1000+900*sin($t/2330)).":".
(2000*cos($t/1550)).":".
print "".localtime($start)," ";
$start += $step;
foreach my $val (@$line) {
- printf "%12.1f", $val;
+ if (not defined $val){
+ printf "%12s", "UNKNOWN";
+ } else {
+ printf "%12.1f", $val;
+ }
}
print "\n";
}
diff --git a/program/configure.ac b/program/configure.ac
index a7ff714812cfacea22f437b8140c7a7e7862bc2b..254ad3d11643b383154f075a07bde42c9a7f5c9a 100644 (file)
--- a/program/configure.ac
+++ b/program/configure.ac
dnl
dnl tell automake the this script is for rrdtool
-AC_INIT(src/rrd_tool.c)
-AC_CONFIG_AUX_DIR(config)
-AC_CANONICAL_TARGET([])
-AM_INIT_AUTOMAKE(rrdtool, 1.1.0)
+AC_INIT([rrdtool],[1.1.0])
+AM_INIT_AUTOMAKE
+AC_CANONICAL_TARGET
AM_CONFIG_HEADER(config.h)
+# AC_CONFIG_AUX_DIR(config)
dnl all our local stuff like install scripts and include files
dnl is in there
AC_PREFIX_DEFAULT( /usr/local/rrdtool-1.1.0 )
dnl Minimum Autoconf version required.
-AC_PREREQ(2.52)
+AC_PREREQ(2.58)
dnl At the TOP of the HEADER
dnl Checks for libraries.
AC_CHECK_FUNC(acos, , AC_CHECK_LIB(m, acos))
-AC_DEFUN(EX_CHECK_ALL,
+AC_DEFUN([EX_CHECK_ALL],
[ AC_CHECK_LIB($1,$2,
- [ AC_CHECK_HEADER($3,[LIBS="-l$1 ${LIBS}"],AC_MSG_ERROR([Adjust CPPFLAGS so that the $4 header $3 gets found])) ],
+ [ AC_CHECK_HEADER($3,[LIBS="-l$1 ${LIBS}"],[
+ [ $echo "#include <$3>" | $CC -E - > /dev/null ]
+ AC_MSG_ERROR([Adjust CPPFLAGS so that the $4 header $3 AND its dependencies gets found])
+ ] ) ],
[ AC_MSG_ERROR([
############################################################################
I could not find a working copy of $4. Check config.log for hints on why
oCFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -W"
AC_CACHE_CHECK(if we can use GCC-specific compiler options, rd_cv_gcc_opt,
- [AC_TRY_COMPILE( , return 0 ,
- rd_cv_gcc_opt=yes,
- rd_cv_gcc_opt=no )
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0 ]])],[rd_cv_gcc_opt=yes],[rd_cv_gcc_opt=no ])
]
)
if test $rd_cv_gcc_opt = no; then
@@ -293,32 +294,28 @@ AC_CHECK_FUNCS(tzset opendir readdir chdir chroot getuid setlocale strerror stre
dnl HP-UX 11.00 does not have finite but does have isfinite as a macro
AC_CHECK_FUNCS(fpclassify, ,
[AC_MSG_CHECKING(for fpclassify with <math.h>)
- AC_TRY_LINK([#include <math.h>], [float f = 0.0; fpclassify(f)],
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_FPCLASSIFY), AC_MSG_RESULT(no))])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[float f = 0.0; fpclassify(f)]])],[AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_FPCLASSIFY)],[AC_MSG_RESULT(no)])])
AC_CHECK_FUNCS(finite, ,
[AC_CHECK_FUNCS(isfinite, ,
[AC_MSG_CHECKING(for isfinite with <math.h>)
- AC_TRY_LINK([#include <math.h>], [float f = 0.0; isfinite(f)],
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_ISFINITE), AC_MSG_RESULT(no))])])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[float f = 0.0; isfinite(f)]])],[AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_ISFINITE)],[AC_MSG_RESULT(no)])])])
AC_CHECK_FUNCS(isinf, ,
[AC_MSG_CHECKING(for isinf with <math.h>)
- AC_TRY_LINK([#include <math.h>], [float f = 0.0; isinf(f)],
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_ISINF), AC_MSG_RESULT(no))])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[float f = 0.0; isinf(f)]])],[AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_ISINF)],[AC_MSG_RESULT(no)])])
dnl what does realloc do if it gets called with a NULL pointer
AC_CACHE_CHECK([if realloc can deal with NULL], rd_cv_null_realloc,
-[AC_TRY_RUN([#include <stdlib.h>
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
int main(void){
char *x = NULL;
x = realloc (x,10);
if (x==NULL) return 1;
return 0;
- }],
- [rd_cv_null_realloc=yes],[rd_cv_null_realloc=nope],:)])
+ }]])],[rd_cv_null_realloc=yes],[rd_cv_null_realloc=nope],[:])])
if test x"$rd_cv_null_realloc" = xnope; then
AC_DEFINE(NO_NULL_REALLOC)
AC_C_BIGENDIAN
-AC_DEFUN(AC_IEEE,
+AC_DEFUN([AC_IEEE],
AC_MSG_CHECKING([if IEEE math works $1])
AC_CACHE_VAL([rd_cv_ieee_$2],
-[AC_TRY_RUN([$3
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[$3
#if HAVE_MATH_H
# include <math.h>
if (! inf > 0) {printf ("not inf > 0 ... "); return 1;}
if (! -inf < 0) {printf ("not -inf < 0 ... "); return 1;}
return 0;
- }],
-
-rd_cv_ieee_$2=yes,
-rd_cv_ieee_$2=no,
-:)])
+ }]])],[rd_cv_ieee_$2=yes],[rd_cv_ieee_$2=no],[:])])
dnl these we run regardles is cached or not
if test x${rd_cv_ieee_$2} = "xyes"; then
AC_MSG_RESULT(yes)
index 261e8c77d19a1ee297ca444d1bee0dc7a623f032..3fc96a41645880ad271be227f8755216adceef55 100644 (file)
--- a/program/doc/Makefile.am
+++ b/program/doc/Makefile.am
imandir = $(prefix)/man/man1
iman_DATA = $(MAN)
-all-local: link txt man html
+all-local: link txt man html-local
.src.pod:
perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print <F>; close F} else {print}' $< > $@
man: $(MAN)
-html: $(HTML)
+html-local: $(HTML)
txt: $(TXT)
-pdf: $(PDF)
+pdf-local: $(PDF)