From: niki Date: Fri, 16 Dec 2005 17:14:09 +0000 (+0000) Subject: cleanup on sensors X-Git-Tag: collectd-3.6.0~51 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=56a554e81fb63c3aff7fbab6d1b2c7b7cc35809e;p=collectd.git cleanup on sensors --- diff --git a/configure.in b/configure.in index 81988ebb..f1fcbe53 100644 --- a/configure.in +++ b/configure.in @@ -296,19 +296,14 @@ AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes") AC_ARG_WITH(lm-sensors, AC_HELP_STRING([--with-lm-sensors@<:@=PFX@:>@], [Path to lm_sensors.]), [ - # given.. - if test "x$withval" != "xno" + if test "x$withval" != "xno" && test "x$withval" != "xyes" then - if test "x$withval" != "xyes" - then - LDFLAGS="$LDFLAGS -L$withval/lib" - CPPFLAGS="$CPPFLAGS -I$withval/include" - with_lm_sensors="yes" - fi + LDFLAGS="$LDFLAGS -L$withval/lib" + CPPFLAGS="$CPPFLAGS -I$withval/include" + with_lm_sensors="yes" fi ], [ - # not given.. if test "x$ac_system" = "xLinux" then with_lm_sensors="yes" @@ -320,17 +315,24 @@ if test "x$with_lm_sensors" = "xyes" then AC_CHECK_LIB(sensors, sensors_init, [ - with_lm_sensors="yes" AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).]) ], - [with_lm_sensors="no (not found)"]) + [with_lm_sensors="no (libsensors not found)"]) AC_CHECK_HEADERS(sensors/sensors.h, [ - with_lm_sensors="yes" AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the header file.]) ], - [with_lm_sensors="no (not found)"]) + [with_lm_sensors="no (sensors/sensors.h not found)"]) +fi +if test "x$with_lm_sensors" = "xyes" +then + collect_lm_sensors=1 +else + collect_lm_sensors=0 fi +AC_DEFINE_UNQUOTED(COLLECT_LM_SENSORS, [$collect_lm_sensors], + [Wether or not to use sensors library]) +AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")