Code

added support for rrdgraph to use the yotta, zetta, zepto, yocto prefixes. Fix for...
[rrdtool.git] / configure.ac
index 06c0fb2096d0f2d54aa61490bb4b0a89f6e3cb7f..fbc99ae773fe46917c7c82ba39598e14876e6f7a 100644 (file)
@@ -13,14 +13,14 @@ AC_PREREQ(2.59)
 
 dnl the official version number is
 dnl a.b.c
-AC_INIT([rrdtool],[1.4.5])
+AC_INIT([rrdtool],[1.4.6])
 
 dnl for testing a numberical version number comes handy
 dnl the released version are
 dnl a.bccc
 dnl the devel versions will be something like
 dnl a.b999yymmddhh 
-NUMVERS=1.4004
+NUMVERS=1.4006
 AC_SUBST(NUMVERS)
 
 dnl for the linker to understand which versions the library are compatible with
@@ -31,7 +31,7 @@ dnl - if any functionality was removed do c++,r=0,a=0.
 dnl
 dnl see http://sourceware.org/autobook/autobook/autobook_91.html
 dnl 
-LIBVERS=5:4:1
+LIBVERS=5:4:2
 AC_SUBST(LIBVERS)
 
 AC_CANONICAL_TARGET
@@ -102,6 +102,8 @@ AC_DEFINE_UNQUOTED(RRDGRAPH_YLEGEND_ANGLE,${RRDGRAPH_YLEGEND_ANGLE:-90.0},
 AC_ARG_ENABLE(rrdcgi,AS_HELP_STRING([--disable-rrdcgi],[disable building of rrdcgi]),
 [],[enable_rrdcgi=yes])
 
+AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no])
+
 AC_ARG_ENABLE(rrd_graph,AS_HELP_STRING([--disable-rrd_graph],[disable all rrd_graph functions]),
 [enable_rrdcgi=no],[enable_rrd_graph=yes])
 
@@ -203,7 +205,7 @@ AC_CHECK_FUNC(acos, , AC_CHECK_LIB(m, acos))
 
 
 dnl add pic flag in any case this makes sure all our code is relocatable
-eval `./libtool --config | grep pic_flag`
+eval `./libtool --config | grep pic_flag=` 
 CFLAGS="$CFLAGS $pic_flag"
 
 
@@ -280,7 +282,7 @@ AC_CHECK_FUNCS(posix_fadvise)
 
 CONFIGURE_PART(Libintl Processing)
 
-AM_GNU_GETTEXT_VERSION(0.18)
+AM_GNU_GETTEXT_VERSION(0.17)
 AM_GNU_GETTEXT(external)
 
 CONFIGURE_PART(IEEE Math Checks)
@@ -491,46 +493,40 @@ AC_LANG_POP(C)
 
 CONFIGURE_PART(Find 3rd-Party Libraries)
 
-AC_ARG_ENABLE(libdbi,AS_HELP_STRING([--disable-libdbi],[do not build in support for libdbi]),[have_libdbi=no],[
-  XXX=$LIBS
-  LIBS="$LIBS -ldbi -ldl"
-  AC_MSG_CHECKING(for libdbi)
-  AC_LINK_IFELSE(
-    [AC_LANG_PROGRAM([[#include <dbi/dbi.h>]], 
-                     [[dbi_initialize(NULL)]]
-                    )
-    ],[AC_DEFINE(HAVE_LIBDBI,[1],[have got libdbi installed])
-       AC_MSG_RESULT([yes])
-       have_libdbi=yes
-    ],[LIBS=$XXX
-       AC_MSG_RESULT([no])
-       have_libdbi=no
-    ]
-  )
+have_libdbi=no
+
+AC_ARG_ENABLE(libdbi,AS_HELP_STRING([--disable-libdbi],[do not build in support for libdbi]),[],[
+    AC_CHECK_HEADER(dbi/dbi.h, [ 
+       AC_CHECK_LIB(dbi, dbi_initialize, [
+           AC_DEFINE(HAVE_LIBDBI,[1],[have got libdbi installed])
+           LIBS="${LIBS} -ldbi -ldl"
+           have_libdbi=yes
+       ])
+    ])
 ])
+
 AM_CONDITIONAL(BUILD_LIBDBI,[test $have_libdbi != no])
 
-AC_ARG_ENABLE(libwrap,
-  AS_HELP_STRING([--disable-libwrap],
-  [do not build in support for libwrap (tcp wrapper)]),
-  [have_libwrap=no],[
-    XXX=$LIBS
-    LIBS="$LIBS -lwrap"
-    AC_MSG_CHECKING(for libwrap)
-    AC_LINK_IFELSE(
-      [AC_LANG_PROGRAM([[#include "tcpd.h"]], [[hosts_access(NULL)]])
-    ],[AC_DEFINE(HAVE_LIBWRAP,[1],[have got libwrap installed])
-       AC_MSG_RESULT([yes])
-       have_libwrap=yes
-    ],[LIBS=$XXX
-       AC_MSG_RESULT([no])
-       have_libwrap=no
-    ]
-  )
+have_libwrap=no
+
+AC_ARG_ENABLE(libwrap, AS_HELP_STRING([--disable-libwrap], [do not build in support for libwrap (tcp wrapper)]),[],[ 
+    AC_CHECK_HEADER(tcpd.h,[       
+        AC_CHECK_FUNCS(hosts_access, [
+            AC_DEFINE(HAVE_LIBWRAP,[1],[have got libwrap installed])
+            have_libwrap=yes 
+        ],  
+        [
+            AC_CHECK_LIB(wrap, hosts_access, [
+               AC_DEFINE(HAVE_LIBWRAP,[1],[have got libwrap installed])
+               LIBS="${LIBS} -lwrap"
+               have_libwrap=yes
+            ])
+        ])
+    ])
 ])
-AM_CONDITIONAL(BUILD_LIBWRAP,[test $have_libwrap != no])
 
-AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no])
+
+AM_CONDITIONAL(BUILD_LIBWRAP,[test $have_libwrap != no])
 
 AM_CONDITIONAL(BUILD_RRDGRAPH,[test $enable_rrd_graph != no])