misc fixes to get rrdtool working without included libraries.
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Mon, 19 Jan 2004 23:17:00 +0000 (23:17 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Mon, 19 Jan 2004 23:17:00 +0000 (23:17 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@232 a5681a0c-68f1-0310-ab6d-d61299d08faa

MakeMakefile
Makefile.am
NEWS
README
bindings/Makefile.am
bindings/perl-shared/Makefile.PL
bindings/perl-shared/RRDs.xs
bindings/tcl/Makefile.am
configure.ac
doc/rrdcgi.pod
libraries/Makefile.am

index 28c62ed..59d098f 100755 (executable)
@@ -14,19 +14,19 @@ PERL
 }
 
 
 }
 
 
-if vcheck 1.4.2 "libtool --version"
+if vcheck 1.5 "libtool --version"
 then
 then
-  echo "get a copy of GNU libtool >= 1.4.2"
+  echo "get a copy of GNU libtool >= 1.5"
   exit 1
 fi
 
   exit 1
 fi
 
-if vcheck 1.7  "automake-1.7 --version"
+if vcheck 1.7.9  "automake --version"
 then
 then
-  echo "get a copy of GNU automake >= 1.7"
+  echo "get a copy of GNU automake >= 1.7.9"
   exit 1
 fi
 
   exit 1
 fi
 
-if vcheck 2.54 "autoconf --version"
+if vcheck 2.58 "autoconf --version"
 then
   echo "get a copy of GNU autoconf >= 2.54"
   exit 1
 then
   echo "get a copy of GNU autoconf >= 2.54"
   exit 1
@@ -36,22 +36,25 @@ set -x
 find . -name Makefile | xargs rm -f
 find . -name "*.la" | xargs rm -f
 find . -name Makefile.in | xargs rm -f
 find . -name Makefile | xargs rm -f
 find . -name "*.la" | xargs rm -f
 find . -name Makefile.in | xargs rm -f
+find . -name .libs | xargs rm -r
+find . -name .debs | xargs rm -r
 
 
 
 
-
-# wget ftp://ftp.gnu.org/gnu/libtool/libtool-1.4.2.tar.gz
+rm -rf config
+mkdir config
+# wget ftp://ftp.gnu.org/gnu/libtool/libtool-1.5.tar.gz
 libtoolize --copy --force
 libtoolize --copy --force
-cp ltmain.sh config
+#cp ltmain.sh config
 
 
-# wget ftp://sources.redhat.com/pub/automake/automake-1.5.tar.gz
+# wget ftp://sources.redhat.com/pub/automake/automake-1.7.9.tar.gz
 # 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.
 # 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
-autoheader --warnings=all
-automake-1.7 --foreign --add-missing --force-missing --copy 
-
-# wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.52.tar.gz
-autoconf 
+aclocal -I /usr/pack/libtool-1.5-to/share/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
+autoheader --warnings=all --force  
 
 
 
 
index ea6447a..8951c77 100644 (file)
@@ -2,7 +2,7 @@
 RSYNC = rsync --rsh=ssh
 
 # build the following subdirectories
 RSYNC = rsync --rsh=ssh
 
 # build the following subdirectories
-SUBDIRS = libraries src bindings doc examples
+SUBDIRS = src bindings doc examples
 
   # the following files are not mentioned in any other Makefile
 EXTRA_DIST = COPYRIGHT CHANGES NT-BUILD-TIPS.txt TODO CONTRIBUTORS THREADS \
 
   # the following files are not mentioned in any other Makefile
 EXTRA_DIST = COPYRIGHT CHANGES NT-BUILD-TIPS.txt TODO CONTRIBUTORS THREADS \
diff --git a/NEWS b/NEWS
index b8347f2..43222db 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,10 @@ RRDTOOL NEWS
 In this file I am noting the Major changes to rrdtool
 for details check the cvs ChangeLog
 
 In this file I am noting the Major changes to rrdtool
 for details check the cvs ChangeLog
 
+2004/01/20 Tobi Oetiker <tobi@oetiker.ch>
+  Ripped out all foreign libraries and adapted
+  Configure and Makefiles and accordingly.
+
 2002/03/26 Peter Speck <speck@ruc.dk>
   Contribution of an svg output routine for the new gfx graphing part
 
 2002/03/26 Peter Speck <speck@ruc.dk>
   Contribution of an svg output routine for the new gfx graphing part
 
diff --git a/README b/README
index dba9e27..47f727f 100644 (file)
--- a/README
+++ b/README
@@ -14,8 +14,33 @@ values collected over a definable time period.
 To compile:
 -----------
 
 To compile:
 -----------
 
-  sh configure
+  you need the following libraries installed on your system.
+
+   cgilib-0.5.tar.gz
+   freetype-2.1.5.tar.gz
+   libart_lgpl-2.3.16.tar.gz
+   libpng-1.2.5.tar.gz
+   zlib-1.2.1.tar.gz
+
+  you can either get these libraries directly from their original sites
+  or you can get copies from 
+
+   http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs
+
+  if the libraries are not installed in standard places you may need
+  to set CPPFLAGS and LDFLAGS accordingly. This will be improved in further
+  editions of this developers series. Here is an example call.
+
+  env CPPFLAGS="-I/scratch/oetiker/cgilib-0.5 \
+                -I/scratch/oetiker/lib/include/libart-2.0 \
+                -I/scratch/oetiker/lib/include \
+                -I/scratch/oetiker/lib/include/freetype2" \
+       LDFLAGS="-L/scratch/oetiker/lib/lib -R/scratch/oetiker/lib/lib \
+                -L/scratch/oetiker/cgilib-0.5" \
+      ./configure --prefix=/scratch/oetiker/lib
+
   make             <------ GNU make
   make             <------ GNU make
+
   make install     <------ GNU make
 
 This will configure, compile and install RRDtool in
   make install     <------ GNU make
 
 This will configure, compile and install RRDtool in
@@ -24,11 +49,6 @@ place, use
 
   sh configure --prefix=/some/other/RRDtool-dir
 
 
   sh configure --prefix=/some/other/RRDtool-dir
 
-If you prefer to live with shared libraries, make sure you add the
---enable-shared option to your configure call.
-
-  sh configure --enable-shared
-
 The configure script will try to find your perl installation (5.004
 preferred). If it does not find it, you can still build RRDtool but no perl
 modules will be generated.
 The configure script will try to find your perl installation (5.004
 preferred). If it does not find it, you can still build RRDtool but no perl
 modules will be generated.
@@ -40,8 +60,8 @@ directory, you can also use
 
   make site-perl-install
 
 
   make site-perl-install
 
-will install the perl modules whereever you keep your local perl modules.
-Doing this reliefs you from using 'use lib' in your scripts.
+this will install the perl modules whereever you keep your local perl
+modules. Doing this reliefs you from using 'use lib' in your scripts.
 
 Configure will also look for an TCL installation on your system. If it finds
 one it will build a TCL interface for rrdtool. If you keep tcl in a non
 
 Configure will also look for an TCL installation on your system. If it finds
 one it will build a TCL interface for rrdtool. If you keep tcl in a non
@@ -113,7 +133,7 @@ Use GNU   diff --unified --recursive olddir newdir   to build your patches.
 
 The latest Version:
 -------------------
 
 The latest Version:
 -------------------
-Is available from http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool/
+Is available from http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
 
 
 Tobias Oetiker <oetiker@ee.ethz.ch>
 
 
 Tobias Oetiker <oetiker@ee.ethz.ch>
index facb915..d2eaad3 100644 (file)
@@ -1,7 +1,7 @@
 SUBDIRS = tcl
 
 # the following files are not mentioned in any other Makefile
 SUBDIRS = tcl
 
 # the following files are not mentioned in any other Makefile
-EXTRA_DIST = $(shell for A in $(srcdir)/perl-*; do cat $$A/MANIFEST | sed -e s,^,$$A/, ; done)
+EXTRA_DIST = $(shell for A in perl-*; do cat $$A/MANIFEST | sed -e s,^,$$A/, ; done)
 
 # lets schedule the perl stuff for installation
 # the special call to install-sh is because the -d switch is not portable
 
 # lets schedule the perl stuff for installation
 # the special call to install-sh is because the -d switch is not portable
index 76a8154..2b59fdb 100644 (file)
@@ -4,7 +4,7 @@ use Config;
 # the contents of the Makefile that is written.
 
 # Specify the location of the archive containing PIC compiled object files.
 # 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_private"  ;
+my $librrd = "-L../../src/.libs/ -lrrd"  ;
 
 WriteMakefile(
     'NAME'         => 'RRDs',
 
 WriteMakefile(
     'NAME'         => 'RRDs',
index da77457..bf108e3 100644 (file)
@@ -277,7 +277,7 @@ rrd_times(start, end)
          char *start
          char *end
        PREINIT:
          char *start
          char *end
        PREINIT:
-               struct  time_value start_tv, end_tv;
+               struct  rrd_time_value start_tv, end_tv;
                char    *parsetime_error = NULL;
                time_t  start_tmp, end_tmp;
        PPCODE:
                char    *parsetime_error = NULL;
                time_t  start_tmp, end_tmp;
        PPCODE:
index ca726b7..7fd7012 100644 (file)
@@ -14,7 +14,7 @@ TCL_LD_SEARCH_FLAGS = @TCL_LD_SEARCH_FLAGS@
 GD_LIB_DIR       = $(top_srcdir)/@GD_LIB_DIR@
 
 SRC_DIR            = $(top_srcdir)/src
 GD_LIB_DIR       = $(top_srcdir)/@GD_LIB_DIR@
 
 SRC_DIR            = $(top_srcdir)/src
-INCLUDES           = -I$(TCL_PREFIX)/include -I$(SRC_DIR)  -I$(GD_LIB_DIR)
+AM_CPPFLAGS        = -I$(TCL_PREFIX)/include -I$(SRC_DIR)  -I$(GD_LIB_DIR)
 LIBDIRS            = -L$(libdir) -L$(SRC_DIR)  -L../src/.libs
 LIB_RUNTIME_DIR    = $(libdir)
 
 LIBDIRS            = -L$(libdir) -L$(SRC_DIR)  -L../src/.libs
 LIB_RUNTIME_DIR    = $(libdir)
 
index bbed6da..a7ff714 100644 (file)
@@ -10,7 +10,7 @@ AC_INIT(src/rrd_tool.c)
 AC_CONFIG_AUX_DIR(config)
 AC_CANONICAL_TARGET([])
 AM_INIT_AUTOMAKE(rrdtool, 1.1.0)
 AC_CONFIG_AUX_DIR(config)
 AC_CANONICAL_TARGET([])
 AM_INIT_AUTOMAKE(rrdtool, 1.1.0)
-AM_CONFIG_HEADER(config/config.h)
+AM_CONFIG_HEADER(config.h)
 
 dnl all our local stuff like install scripts and include files
 dnl is in there
 
 dnl all our local stuff like install scripts and include files
 dnl is in there
@@ -136,26 +136,55 @@ char *strchr (), *strrchr ();
 ])
 
 
 ])
 
 
-dnl Define library subdirectory names here.
-CGI_LIB_DIR=cgilib-0.4
-FREETYPE_LIB_DIR=freetype-2.0.5
-ART_LIB_DIR=libart_lgpl-2.3.7
-PNG_LIB_DIR=libpng-1.2.0
-ZLIB_LIB_DIR=zlib-1.1.4
+
+dnl Check for the compiler and static/shared library creation.
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_LIBTOOL
+
+dnl Checks for header files.
+AC_HEADER_STDC
+AC_HEADER_DIRENT
+AC_CHECK_HEADERS(sys/stat.h sys/types.h fcntl.h time.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/time.h sys/times.h sys/param.h sys/resource.h float.h)
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_HEADER_TIME
+AC_STRUCT_TM
 
 dnl substitute them in all the files listed in AC_OUTPUT
 
 dnl substitute them in all the files listed in AC_OUTPUT
-AC_SUBST(CGI_LIB_DIR)
-AC_SUBST(ART_LIB_DIR)
-AC_SUBST(PNG_LIB_DIR)
-AC_SUBST(FREETYPE_LIB_DIR)
-AC_SUBST(ZLIB_LIB_DIR)
 AC_SUBST(PERLFLAGS)
 
 AC_SUBST(PERLFLAGS)
 
-INCLUDED_LIB(cgi,cgiInit)
-INCLUDED_LIB(art_lgpl,art_vpath_add_point)
-INCLUDED_LIB(png,png_access_version_number)
-INCLUDED_LIB(freetype,FT_Init_FreeType)
-INCLUDED_LIB(z,zlibVersion)
+dnl Checks for libraries.
+AC_CHECK_FUNC(acos, , AC_CHECK_LIB(m, acos))
+
+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_MSG_ERROR([
+############################################################################
+I could not find a working copy of $4. Check config.log for hints on why
+this is the case. Maybe you need to set LDFLAGS appropriately so that the
+linker can find lib$1. If you have not installed $4, you can get it
+either from its original home on
+
+   $6
+
+Or you can find an archive copy on
+
+   http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs
+
+The last tested version of $4 is $5.
+############################################################################
+])] )
+]
+)
+EX_CHECK_ALL(cgi,        cgiInit,                   cgi.h,                  cgilib,      0.5,    http://www.infodrom.org/projects/cgilib)
+EX_CHECK_ALL(art_lgpl_2, art_vpath_add_point,       libart_lgpl/libart.h,   libart_lgpl, 2.3.16, ftp://ftp.gnome.org/pub/GNOME/sources/libart_lgpl/2.3/)
+EX_CHECK_ALL(z,          zlibVersion,               zlib.h,                 zlib,        1.2.1,  http://www.gzip.org/zlib/)
+EX_CHECK_ALL(png,        png_access_version_number, png.h,                  libpng,      1.2.5,  http://prdownloads.sourceforge.net/libpng/)
+EX_CHECK_ALL(freetype,   FT_Init_FreeType,          ft2build.h,             freetype,    2.1.5,  http://prdownloads.sourceforge.net/freetype/)
 
 dnl Check for Perl.
 AC_PATH_PROG(PERL, perl, no)
 
 dnl Check for Perl.
 AC_PATH_PROG(PERL, perl, no)
@@ -219,27 +248,7 @@ AC_SUBST(TCL_SHLIB_SUFFIX)
 AC_SUBST(TCL_PACKAGE_PATH)
 AC_SUBST(TCL_LD_SEARCH_FLAGS)
 
 AC_SUBST(TCL_PACKAGE_PATH)
 AC_SUBST(TCL_LD_SEARCH_FLAGS)
 
-dnl Check for the compiler and static/shared library creation.
-AC_PROG_CC
-AC_PROG_CPP
-
-dnl don't build a shared library ...
-dnl this can be changed when running configure
-AC_DISABLE_SHARED
-AC_PROG_LIBTOOL
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_HEADER_DIRENT
-AC_CHECK_HEADERS(sys/stat.h sys/types.h fcntl.h time.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/time.h sys/times.h sys/param.h sys/resource.h float.h)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_HEADER_TIME
-AC_STRUCT_TM
 
 
-dnl Checks for libraries.
-AC_CHECK_FUNC(acos, , AC_CHECK_LIB(m, acos))
 
 dnl Check for nroff
 AC_PATH_PROGS(NROFF, gnroff nroff)
 
 dnl Check for nroff
 AC_PATH_PROGS(NROFF, gnroff nroff)
@@ -444,13 +453,6 @@ AC_CONFIG_FILES([examples/shared-demo.pl                   \
           examples/cgi-demo.cgi                                \
           examples/Makefile                            \
           doc/Makefile                                 \
           examples/cgi-demo.cgi                                \
           examples/Makefile                            \
           doc/Makefile                                 \
-          libraries/Makefile                            \
-          libraries/cgilib-0.4/Makefile                 \
-          libraries/libart_lgpl-2.3.7/Makefile         \
-          libraries/libpng-1.2.0/Makefile              \
-          libraries/zlib-1.1.4/Makefile                        \
-          libraries/freetype-2.0.5/Makefile            \
-          libraries/afm/Makefile                       \
           src/Makefile                                 \
           bindings/Makefile                             \
           bindings/tcl/Makefile                                \
           src/Makefile                                 \
           bindings/Makefile                             \
           bindings/tcl/Makefile                                \
index 30c6692..9089c52 100644 (file)
@@ -111,7 +111,7 @@ folks to figure out than "-2weeks".
 =item RRD::GRAPH I<rrdgraph arguments>
 
 This tag creates the RRD graph defined in its argument and then gets
 =item RRD::GRAPH I<rrdgraph arguments>
 
 This tag creates the RRD graph defined in its argument and then gets
-replaced by an appropriate E<lt>IMGE<gt> tag referring to the graph.
+replaced by an appropriate E<lt>IMG<gt> tag referring to the graph.
 The B<--lazy> option in RRD graph can be used to make sure that graphs
 are only regenerated when they are out of date. The arguments
 to the B<RRD::GRAPH> tag work as described in the B<rrdgraph> manual page.
 The B<--lazy> option in RRD graph can be used to make sure that graphs
 are only regenerated when they are out of date. The arguments
 to the B<RRD::GRAPH> tag work as described in the B<rrdgraph> manual page.
index 8b1b16d..3d30d55 100644 (file)
@@ -13,7 +13,7 @@ endif
 if !USE_INSTALLED_libpng
 BUILD_LIBPNG=$(LIBPNG)
 endif
 if !USE_INSTALLED_libpng
 BUILD_LIBPNG=$(LIBPNG)
 endif
-if !USE_INSTALLED_libart_lgpl
+if !USE_INSTALLED_libart_lgpl_2
 BUILD_LIBART=$(LIBART)
 endif
 if !USE_INSTALLED_libfreetype
 BUILD_LIBART=$(LIBART)
 endif
 if !USE_INSTALLED_libfreetype