modbus plugin: Fix a small memory leak in mb_config_add_datagroup().
[collectd.git] / configure.in
index 985e848..6d9ec65 100644 (file)
@@ -756,7 +756,7 @@ if test "x$nan_type" = "xnone"; then
       [[
 #include <stdlib.h>
 #include <math.h>
-static float foo = NAN;
+static double foo = NAN;
       ]],
       [[
        if (isnan (foo))
@@ -782,7 +782,7 @@ if test "x$nan_type" = "xnone"; then
 #include <stdlib.h>
 #define __USE_ISOC99 1
 #include <math.h>
-static float foo = NAN;
+static double foo = NAN;
       ]],
       [[
        if (isnan (foo))
@@ -816,7 +816,7 @@ if test "x$nan_type" = "xnone"; then
 #ifndef isnan
 # define isnan(f) ((f) != (f))
 #endif
-static float foo = NAN;
+static double foo = NAN;
       ]],
       [[
        if (isnan (foo))
@@ -1407,7 +1407,7 @@ then
        fi
        AC_CHECK_HEADERS(credis.h,
        [with_libcredis="yes"],
-       [with_libcredis="no ('credis.h' not found)"])
+       [with_libcredis="no (credis.h not found)"])
 fi
 if test "x$with_libcredis" = "xyes"
 then
@@ -2126,20 +2126,26 @@ fi
 if test "x$with_libmodbus" = "xuse_pkgconfig"
 then
        AC_MSG_NOTICE([Checking for modbus using $PKG_CONFIG])
-       $PKG_CONFIG --exists 'modbus' 2>/dev/null
+       libmodbus_pkgconfig_name='libmodbus'
+       $PKG_CONFIG --exists $libmodbus_pkgconfig_name 2>/dev/null
        if test $? -ne 0
        then
-               with_libmodbus="no (pkg-config doesn't know library)"
+               libmodbus_pkgconfig_name='modbus'
+               $PKG_CONFIG --exists $libmodbus_pkgconfig_name 2>/dev/null
+               if test $? -ne 0
+               then
+                       with_libmodbus="no (pkg-config doesn't know modbus or libmodbus)"
+               fi
        fi
 fi
 if test "x$with_libmodbus" = "xuse_pkgconfig"
 then
-       with_libmodbus_cflags="`$PKG_CONFIG --cflags 'modbus'`"
+       with_libmodbus_cflags="`$PKG_CONFIG --cflags $libmodbus_pkgconfig_name`"
        if test $? -ne 0
        then
                with_libmodbus="no ($PKG_CONFIG failed)"
        fi
-       with_libmodbus_libs="`$PKG_CONFIG --libs 'modbus'`"
+       with_libmodbus_libs="`$PKG_CONFIG --libs $libmodbus_pkgconfig_name`"
        if test $? -ne 0
        then
                with_libmodbus="no ($PKG_CONFIG failed)"
@@ -2594,7 +2600,7 @@ then
        fi
        AC_CHECK_HEADERS(oping.h,
        [with_liboping="yes"],
-       [with_liboping="no ('oping.h' not found)"])
+       [with_liboping="no (oping.h not found)"])
 fi
 if test "x$with_liboping" = "xyes"
 then
@@ -2760,19 +2766,14 @@ then
 fi
 if test "x$with_libpcap" = "xyes"
 then
-       AC_CHECK_HEADERS(pcap.h,
-       [
-               AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
-       ], [with_libpcap="no (pcap.h not found)"])
+       AC_CHECK_HEADERS(pcap.h,,
+                        [with_libpcap="no (pcap.h not found)"])
 fi
 if test "x$with_libpcap" = "xyes"
 then
-       collect_libpcap=1
-else
-       collect_libpcap=0
+       AC_CHECK_HEADERS(pcap-bpf.h,,
+                        [with_libpcap="no (pcap-bpf.h not found)"])
 fi
-AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
-       [Wether or not to use the pcap library])
 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
 # }}}
 
@@ -3288,7 +3289,7 @@ then
        fi
        AC_CHECK_HEADERS(routeros_api.h,
        [with_librouteros="yes"],
-       [with_librouteros="no ('routeros_api.h' not found)"])
+       [with_librouteros="no (routeros_api.h not found)"])
 fi
 if test "x$with_librouteros" = "xyes"
 then
@@ -3487,7 +3488,7 @@ then
     if test "$?" != "0"
     then
       with_libstatgrab_pkg_config="no"
-      with_libstatgrab="no ($PKG_CONFIG doesn't know libstatgrab)"
+      with_libstatgrab="no (pkg-config doesn't know libstatgrab)"
       temp_result="not found"
     fi
     AC_MSG_RESULT([$temp_result])
@@ -3707,7 +3708,7 @@ then
        $PKG_CONFIG --exists 'libupsclient' 2>/dev/null
        if test $? -ne 0
        then
-               with_libupsclient="no (pkg-config doesn't know library)"
+               with_libupsclient="no (pkg-config doesn't know libupsclient)"
        fi
 fi
 if test "x$with_libupsclient" = "xuse_pkgconfig"
@@ -3932,7 +3933,7 @@ then
        $PKG_CONFIG --exists 'varnishapi' 2>/dev/null
        if test $? -ne 0
        then
-               with_libvarnish="no (pkg-config doesn't know library)"
+               with_libvarnish="no (pkg-config doesn't know varnishapi)"
        fi
 fi
 if test "x$with_libvarnish" = "xuse_pkgconfig"
@@ -4002,7 +4003,7 @@ then
        then
                with_libxml2="yes"
        else
-               with_libxml2="no (pkg-config doesn't know library)"
+               with_libxml2="no (pkg-config doesn't know libxml-2.0)"
        fi
 
        pkg-config --exists libvirt 2>/dev/null
@@ -4010,7 +4011,7 @@ then
        then
                with_libvirt="yes"
        else
-               with_libvirt="no (pkg-config doesn't know library)"
+               with_libvirt="no (pkg-config doesn't know libvirt)"
        fi
 fi
 if test "x$with_libxml2" = "xyes"
@@ -4127,7 +4128,7 @@ then
        $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
        if test "$?" != "0"
        then
-               with_libopenipmipthread="no ($PKG_CONFIG doesn't know OpenIPMIpthread)"
+               with_libopenipmipthread="no (pkg-config doesn't know OpenIPMIpthread)"
        fi
        AC_MSG_RESULT([$with_libopenipmipthread])
 fi
@@ -4188,7 +4189,11 @@ fi
 
 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
                [with_libnotify="yes"],
-               [with_libnotify="no ($LIBNOTIFY_PKG_ERRORS)"])
+               [if test "x$LIBNOTIFY_PKG_ERRORS" = "x"; then
+                        with_libnotify="no"
+                else
+                        with_libnotify="no ($LIBNOTIFY_PKG_ERRORS)"
+                fi])
 
 # Check for enabled/disabled features
 #