readline in rrd_open.c reads the file in 8 KB blocks, and calls realloc for
[rrdtool.git] / configure.ac
index c21395a..afe8e4d 100644 (file)
@@ -137,11 +137,11 @@ char *strchr (), *strrchr ();
 
 
 dnl Define library subdirectory names here.
-CGI_LIB_DIR=libraries/cgilib-0.4
-FREETYPE_LIB_DIR=libraries/freetype-2.0.5
-ART_LIB_DIR=libraries/libart_lgpl-2.3.7
-PNG_LIB_DIR=libraries/libpng-1.2.0
-ZLIB_LIB_DIR=libraries/zlib-1.1.3
+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 substitute them in all the files listed in AC_OUTPUT
 AC_SUBST(CGI_LIB_DIR)
@@ -151,6 +151,12 @@ AC_SUBST(FREETYPE_LIB_DIR)
 AC_SUBST(ZLIB_LIB_DIR)
 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 Check for Perl.
 AC_PATH_PROG(PERL, perl, no)
 if test "x$PERL" = "xno"; then
@@ -161,7 +167,7 @@ else
        SO_EXT=`$PERL -e 'use Config; if (defined $Config{so} and $Config{so} ne 'a') {print "$Config{so}\n"} else {print "so\n"};'`
        AC_MSG_RESULT($SO_EXT)
         AC_MSG_CHECKING(for the C compiler perl wants to use to build its modules)
-        PROBLEMCC=`$PERL -e 'use Config; map {if (-x "$_/$Config{cc}"){exit 0}} split /:/, $ENV{PATH};print $Config{cc}'`
+        PROBLEMCC=`$PERL -e 'use Config; ($cc = $Config{cc}) =~ s/\s.*//; exit 0 if -x $cc; map {if (-x "$_/$cc"){exit 0}} split /:/, $ENV{PATH};print $Config{cc}'`
         if test x$PROBLEMCC != x; then
                 AC_MSG_RESULT(no)
                 echo Could not find the Compiler: '"'$PROBLEMCC'"'
@@ -224,7 +230,8 @@ AC_PROG_LIBTOOL
 
 dnl Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.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)
+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
@@ -241,7 +248,7 @@ AC_PATH_PROGS(TROFF, groff troff)
 dnl Does the compiler like -Wall and -pedantic?
 if test "x$GCC" = "xyes"; then
   oCFLAGS=$CFLAGS
-  CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline"
+  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,
@@ -272,7 +279,7 @@ AC_FUNC_VPRINTF
 dnl for each function found we get a definition in config.h 
 dnl of the form HAVE_FUNCTION
 
-AC_CHECK_FUNCS(strerror snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday)
+AC_CHECK_FUNCS(tzset opendir readdir chdir chroot getuid setlocale strerror strerror_r snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday)
 
 dnl HP-UX 11.00 does not have finite but does have isfinite as a macro
 AC_CHECK_FUNCS(fpclassify, ,
@@ -409,22 +416,24 @@ AC_IEEE([out of the box], works, , , ,
        AC_IEEE([with the -mieee switch], mswitch, , , ,
          [CFLAGS="$_cflags -q float=rndsngl"
          AC_IEEE([with the -q float=rndsngl switch], qswitch, , , ,
-           [CFLAGS="$_cflags -OPT:IEEE_comparisons=ON"
-           AC_IEEE([with the -OPT:IEEE_comparisons=ON switch], ieeecmpswitch, , , ,
-             [CFLAGS=$_cflags
-             AC_IEEE([with fpsetmask(0)], mask,
-               [#include <floatingpoint.h>], [fpsetmask(0)],
-               [AC_DEFINE(MUST_DISABLE_FPMASK)
-              PERLFLAGS="CCFLAGS=-DMUST_DISABLE_FPMASK"],
-               [AC_IEEE([with signal(SIGFPE,SIG_IGN)], sigfpe,
-                 [#include <signal.h>], [signal(SIGFPE,SIG_IGN)],
-                 [AC_DEFINE(MUST_DISABLE_SIGFPE)
-                 PERLFLAGS="CCFLAGS=-DMUST_DISABLE_SIGFPE"],           
-                 AC_MSG_ERROR([
+           [CFLAGS="$_cflags -OPT:IEEE_NaN_inf=ON"
+           AC_IEEE([with the -OPT:IEEE_NaN_inf=ON switch], ieeenaninfswitch, , , ,
+             [CFLAGS="$_cflags -OPT:IEEE_comparisons=ON"
+             AC_IEEE([with the -OPT:IEEE_comparisons=ON switch], ieeecmpswitch, , , ,
+               [CFLAGS=$_cflags
+               AC_IEEE([with fpsetmask(0)], mask,
+                 [#include <floatingpoint.h>], [fpsetmask(0)],
+                 [AC_DEFINE(MUST_DISABLE_FPMASK)
+                PERLFLAGS="CCFLAGS=-DMUST_DISABLE_FPMASK"],
+                 [AC_IEEE([with signal(SIGFPE,SIG_IGN)], sigfpe,
+                   [#include <signal.h>], [signal(SIGFPE,SIG_IGN)],
+                   [AC_DEFINE(MUST_DISABLE_SIGFPE)
+                   PERLFLAGS="CCFLAGS=-DMUST_DISABLE_SIGFPE"],         
+                   AC_MSG_ERROR([
 Your Compiler does not do propper IEEE math ... Please find out how to
 make IEEE math work with your compiler and let me know (oetiker@ee.ethz.ch).
 Check config.log to see what went wrong ...
-]))])])])])])])])])
+]))])])])])])])])])])
 
 
 AC_CONFIG_FILES([examples/shared-demo.pl                       \
@@ -439,8 +448,9 @@ AC_CONFIG_FILES([examples/shared-demo.pl                    \
           libraries/cgilib-0.4/Makefile                 \
           libraries/libart_lgpl-2.3.7/Makefile         \
           libraries/libpng-1.2.0/Makefile              \
-          libraries/zlib-1.1.3/Makefile                        \
+          libraries/zlib-1.1.4/Makefile                        \
           libraries/freetype-2.0.5/Makefile            \
+          libraries/afm/Makefile                       \
           src/Makefile                                 \
           bindings/Makefile                             \
           bindings/tcl/Makefile                                \
@@ -452,7 +462,7 @@ AC_OUTPUT
 AC_MSG_CHECKING(in)
 AC_MSG_RESULT(and out again)
 
-echo $ECHO_N "ordering CD from http://ee-staff.ethz.ch/~oetiker/wish $ECHO_C" 1>&6
+echo $ECHO_N "ordering CD from http://people.ee.ethz.ch/~oetiker/wish $ECHO_C" 1>&6
 sleep 1
 echo $ECHO_N ".$ECHO_C" 1>&6
 sleep 1
@@ -474,7 +484,7 @@ echo "If you want to install the perl"
 echo "modules in site-perl, try 'make site-perl-install'."
 echo 
 echo "       ... that wishlist is NO JOKE. If you find RRDtool useful"
-echo "make me happy. Go to http://ee-staff.ethz.ch/~oetiker/wish and"
+echo "make me happy. Go to http://people.ee.ethz.ch/~oetiker/wish and"
 echo "place an order."
 echo 
 echo "                               -- Tobi Oetiker <tobi@oetiker.ch>"