X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=configure.ac;h=125cba1e2096f5fa9c75578b958f2a926f463227;hp=04f9a110a5915530feae47fad11a605bfbfa6f58;hb=1b49fb240828c4fd668cd5cecc57feed5c693ba0;hpb=aa56e3d752ed647bc1f7b877304da7fceb650e0c diff --git a/configure.ac b/configure.ac index 04f9a11..125cba1 100644 --- a/configure.ac +++ b/configure.ac @@ -367,7 +367,7 @@ CONFIGURE_PART(Resolve Portability Issues) dnl Do we need getopt_long build_getopt=no -RRD_GETOPT_LONG="#" +RRD_GETOPT_LONG="LIBC_HAS_GETOPT_LONG" AC_CHECK_FUNC(getopt_long,[],[ RRD_GETOPT_LONG="getopt_long" build_getopt=yes @@ -468,6 +468,24 @@ AC_LANG_POP(C) CONFIGURE_PART(Find 3rd-Party Libraries) +AC_ARG_ENABLE(libdbi,[ --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_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 + ] + ) +]) +AM_CONDITIONAL(BUILD_LIBDBI,[test $have_libdbi != no]) AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no]) @@ -873,7 +891,7 @@ AC_CONFIG_FILES([examples/Makefile]) AC_CONFIG_FILES([doc/Makefile]) AC_CONFIG_FILES([po/Makefile.in]) AC_CONFIG_FILES([src/Makefile]) -AC_CONFIG_FILES([src/librrd.sym]) +AC_CONFIG_FILES([src/librrd.sym.in]) AC_CONFIG_FILES([src/librrd.pc]) AC_CONFIG_FILES([bindings/Makefile]) AC_CONFIG_FILES([bindings/tcl/Makefile]) @@ -926,6 +944,7 @@ echo " Build Python Bindings: $enable_python" echo " Build rrdcgi: $enable_rrdcgi" echo " Build librrd MT: $enable_pthread" echo " Link with libintl: $enable_libintl" +echo " With libDBI: $have_libdbi" echo echo " Libraries: $ALL_LIBS" echo