From 56a554e81fb63c3aff7fbab6d1b2c7b7cc35809e Mon Sep 17 00:00:00 2001 From: niki Date: Fri, 16 Dec 2005 17:14:09 +0000 Subject: [PATCH] cleanup on sensors --- configure.in | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) 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") -- 2.30.2