X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=2914b5acc394ddb56cfbb0c585c56cbc05dadb87;hb=63cbff115ba03717e81087d1419fc07c24d205c2;hp=443dbde0cd3eef5d1e535b3e2286c42175f0d14f;hpb=97e4d4b708fab4a513476b6462ee562c704bc711;p=collectd.git diff --git a/configure.in b/configure.in index 443dbde0..2914b5ac 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(collectd, 4.0.0) +AC_INIT(collectd, 4.0.3) AC_CONFIG_SRCDIR(src/collectd.c) AC_CONFIG_HEADERS(src/config.h) AM_INIT_AUTOMAKE(dist-bzip2) @@ -413,7 +413,17 @@ AC_CHECK_FUNCS(getgrgid getpwuid) AC_CHECK_FUNCS(getifaddrs) # Check for NAN -nan_type="none" +AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])], +[ + if test "x$withval" = "xno"; then + nan_type="none" + else if test "x$withval" = "xyes"; then + nan_type="zero" + else + nan_type="$withval" + fi; fi +], +[nan_type="none"]) if test "x$nan_type" = "xnone"; then AC_CACHE_CHECK([whether NAN is defined by default], [have_nan_default], @@ -436,9 +446,7 @@ static float foo = NAN; ) if test "x$have_nan_default" = "xyes" then - nan_type="default" - AC_DEFINE(NAN_STATIC_DEFAULT, 1, - [Define if NAN is defined by default and can initialize static variables.]) + nan_type="default" fi fi if test "x$nan_type" = "xnone"; then @@ -464,9 +472,7 @@ static float foo = NAN; ) if test "x$have_nan_isoc" = "xyes" then - nan_type="isoc99" - AC_DEFINE(NAN_STATIC_ISOC, 1, - [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.]) + nan_type="isoc99" fi fi if test "x$nan_type" = "xnone"; then @@ -498,14 +504,22 @@ static float foo = NAN; ) if test "x$have_nan_zero" = "xyes" then - nan_type="zero" - AC_DEFINE(NAN_ZERO_ZERO, 1, - [Define if NAN can be defined as (0.0 / 0.0)]) + nan_type="zero" fi fi -if test "x$nan_type" = "xnone"; then + +if test "x$nan_type" = "xdefault"; then + AC_DEFINE(NAN_STATIC_DEFAULT, 1, + [Define if NAN is defined by default and can initialize static variables.]) +else if test "x$nan_type" = "xisoc99"; then + AC_DEFINE(NAN_STATIC_ISOC, 1, + [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.]) +else if test "x$nan_type" = "xzero"; then + AC_DEFINE(NAN_ZERO_ZERO, 1, + [Define if NAN can be defined as (0.0 / 0.0)]) +else AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.]) -fi +fi; fi; fi # For mount interface #AC_CHECK_FUNCS(getfsent getvfsent) @@ -1219,6 +1233,32 @@ else fi AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes") +AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + LDFLAGS="$LDFLAGS -L$withval/lib" + CPPFLAGS="$CPPFLAGS -I$withval/include" + with_libnetsnmp="yes" + fi +], +[with_libnetsnmp="yes"]) +if test "x$with_libnetsnmp" = "xyes" +then + AC_CHECK_LIB(netsnmp, init_snmp, + [ + AC_DEFINE(HAVE_LIBSNMP, 1, [Define to 1 if you have the Net-SNMP library (-lnetsnmp).]) + ], [with_libnetsnmp="no (libnetsnmp not found)"]) +fi +if test "x$with_libnetsnmp" = "xyes" +then + AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, + [ + AC_DEFINE(HAVE_NET_SNMP_NET_SNMP_CONFIG_H, 1, [Define to 1 if you have the header file.]) + ], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"]) +fi +AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes") + AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to libupsclient.])], [ if test "x$withval" != "xno" && test "x$withval" != "xyes" @@ -1247,6 +1287,74 @@ then fi AM_CONDITIONAL(BUILD_WITH_LIBUPSCLIENT, test "x$with_libupsclient" = "xyes") +### BEGIN of check for libxmms ### +with_xmms_config="xmms-config" +with_xmms_prefix=0 +with_xmms_cflags="" +with_xmms_libs="" +AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])], +[ + if test "x$withval" != "xno" -a "x$withval" != "xyes" + then + if test -x "$withval/bin/xmms-config" + then + with_xmms_config="$withval/bin/xmms-config" + with_xmms_prefix=1 + fi + fi + if test "x$withval" = "xno" + then + with_libxmms="no" + else + with_libxmms="yes" + fi +], +[ + with_libxmms="yes" +]) +if test "x$with_libxmms" = "xyes" +then + with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null` + xmms_config_status=$? + + if test $xmms_config_status -ne 0 + then + with_libxmms="no" + fi +fi +if test "x$with_libxmms" = "xyes" +then + with_xmms_libs=`$with_xmms_config --libs 2>/dev/null` + xmms_config_status=$? + + if test $xmms_config_status -ne 0 + then + with_libxmms="no" + fi +fi +if test "x$with_libxmms" = "xyes" +then + AC_CHECK_LIB(xmms, xmms_remote_get_info, + [ + BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags" + BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs" + AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS) + AC_SUBST(BUILD_WITH_LIBXMMS_LIBS) + ], + [ + with_libxmms="no" + ], + [$with_xmms_libs]) +fi +with_libxmms_numeric=0 +if test "x$with_libxmms" = "xyes" +then + with_libxmms_numeric=1 +fi +AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).]) +AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes") +### END of check for libxmms ### + # Check for enabled/disabled features # @@ -1358,6 +1466,7 @@ AC_COLLECTD([unixsock], [disable], [module], [UNIX socket plugin]) AC_COLLECTD([users], [disable], [module], [user count statistics]) AC_COLLECTD([vserver], [disable], [module], [vserver statistics]) AC_COLLECTD([wireless], [disable], [module], [wireless link statistics]) +AC_COLLECTD([xmms], [disable], [module], [wireless link statistics]) AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile) @@ -1377,6 +1486,7 @@ Configuration: libiptc . . . . . . $with_libiptc libkstat . . . . . $with_kstat libmysql . . . . . $with_libmysql + libnetsnmp . . . . $with_libnetsnmp liboconfig . . . . $with_liboconfig liboping . . . . . $with_liboping libpcap . . . . . . $with_libpcap @@ -1386,6 +1496,7 @@ Configuration: libsensors . . . . $with_lm_sensors libstatgrab . . . . $with_libstatgrab libupsclient . . . $with_libupsclient + libxmms . . . . . . $with_libxmms Features: daemon mode . . . . $enable_daemon @@ -1432,5 +1543,6 @@ Configuration: users . . . . . . . $enable_users vserver . . . . . . $enable_vserver wireless . . . . . $enable_wireless + xmms . . . . . . . $enable_xmms EOF