[collectd] libmodbus build issue

Stefan Nickl stefan.nickl at googlemail.com
Sun Jan 22 19:01:13 CET 2012


There is another small problem with libmodbus 3.0.1, the pkgconfig file is
actually named "libmodbus.pc", however collectd's configure script looks
for "modbus". Fixed it like this:

--- configure.in.orig   2012-01-19 16:11:40.000000000 +0100
+++ configure.in        2012-01-19 16:12:41.000000000 +0100
@@ -2114,21 +2114,21 @@
 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
+       AC_MSG_NOTICE([Checking for libmodbus using $PKG_CONFIG])
+       $PKG_CONFIG --exists 'libmodbus' 2>/dev/null
        if test $? -ne 0
        then
-               with_libmodbus="no (pkg-config doesn't know modbus)"
+               with_libmodbus="no (pkg-config doesn't know libmodbus)"
        fi
 fi
 if test "x$with_libmodbus" = "xuse_pkgconfig"
 then
-       with_libmodbus_cflags="`$PKG_CONFIG --cflags 'modbus'`"
+       with_libmodbus_cflags="`$PKG_CONFIG --cflags 'libmodbus'`"
        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'`"
        if test $? -ne 0
        then
                with_libmodbus="no ($PKG_CONFIG failed)"

-- 
Cheers, Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20120122/bff8f188/attachment.html>


More information about the collectd mailing list