X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=configure.ac;h=4d966009bb0b03a744ad8ddb4eed6db76b7eb1be;hb=33f1e407ef000297e7665ceb91f102952c73b4e2;hp=e0be4bd47ff6e93b703dc826d3638e670f216bfc;hpb=48b4d7e9bad7fc9f734886136a05d579ae57f114;p=rrdtool.git diff --git a/configure.ac b/configure.ac index e0be4bd..4d96600 100644 --- a/configure.ac +++ b/configure.ac @@ -102,26 +102,6 @@ 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]) -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 ]], [[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 - ] - ) -]) -AM_CONDITIONAL(BUILD_LIBWRAP,[test $have_libwrap != no]) - AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no]) AC_ARG_ENABLE(rrd_graph,AS_HELP_STRING([--disable-rrd_graph],[disable all rrd_graph functions]), @@ -226,7 +206,7 @@ AC_CHECK_FUNC(round, , AC_CHECK_LIB(m, round)) 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" @@ -514,25 +494,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_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]) +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_RRDGRAPH,[test $enable_rrd_graph != no])