[collectd] Question about buildinga plugin
Florian Forster
octo at verplant.org
Fri Oct 6 17:23:43 CEST 2006
Hi Nathan,
On Thu, Oct 05, 2006 at 05:13:06PM -0600, Nathan Blackham wrote:
> If I understand correctly, I need to put a line in the configure.in file
> like this:
> AC_COLLECTD([name], [disable], [module], [description])
>
> and then add something like this in the
> Makefile.am:
> if BUILD_MODULE_NAME
> pkglib_LTLIBRARIES += name.la
> name_la_SOURCES = name.c
> name_la_LDFLAGS = -module -avoid-version
> collectd_LDADD += "-dlopen" name.la
> collectd_DEPENDENCIES += name.la
> endif
>
> Plus this plugin needs extra libraries installed. Is there anything special
> that I need to do to include them? I know if i compile the file on the
> command line with gcc I add a -l(library) flag to it.
>
> Is that all that I need to do?
No, you need to:
- Check for the library in the configure script (in `configure.in'; see
how it's done for `libmysqlclient' and do it likewise)
It's all a little autoconf-magic, so if you don't want to get into
that mess I don't blame you.. Just send the patch and I'll take care
of that..
- Add something like this into the `Makefile.am' (again, take the MySQL-
plugin as a reference):
-- 8< --
if BUILD_WITH_LIB<name>
name_la_LDFLAGS += -l<name>
endif
-- >8 --
> I would like to build it into a debain package as well. I am using
> 3.10.1 to build it against.
I'd suggest you download the source package, replace the source tarball
with an selfmade one (hint: `make dist`) and add a new package in the
`debian/control' file. It sounds easy (and is, if you have done it
before ;)
Regards,
-octo
--
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20061006/7e069d5d/attachment.pgp
More information about the collectd
mailing list