On Tue, Jul 08, 2008 at 05:23:21PM +0100, [EMAIL PROTECTED] wrote:
> 
> The per-platform code is quite substantial, could something like the
> Makefile.am below be made to work?

most likely no, as the variable used in the "if" for automake is an automake
conditional variable defined by AM_CONDITIONAL and not a make variable.

> AM_CFLAGS  = -D_LARGEFILE64_SOURCE -I$(top_builddir)/include
> -I$(top_builddir)/libmetrics -I$(top_builddir)/lib 

libmetrics and lib are most likely not needed either (they are not public
and are only meant to be used to support internal modules that rely in
libmetrics)

> if LINUX
> modio_os_SOURCES        = io_helper_linux.c
> endif
> if SOLARIS
> modio_os_SOURCES        = io_helper_solaris.c
> endif
> 
> if modio_os_SOURCES

if you don't care about portability, this might work using a GNU ifdef of the
variable above 

ifdef modio_os_SOURCES

> if STATIC_BUILD
> noinst_LTLIBRARIES      = libmodio.la
> libmodio_la_SOURCES     = mod_io.c $(modio_os_SOURCES)
> libmodio_la_LDFLAGS     = -export-all-symbols
> else
> pkglib_LTLIBRARIES    = modio.la
> modio_la_SOURCES = mod_io.c $(modio_os_SOURCES)
> modio_la_LDFLAGS = -module -avoid-version
> modio_la_LIBADD = $(top_builddir)/libmetrics/libmetrics.la

linking with libmetrics shouldn't be needed for your module.

other than that, automake and other autotools questions are offtopic to this
list and could be better answered by some real experts somewhere else, but
unless you really need to statically link your module into ganglia (not needed
in Solaris or Linux) it will be probably better to use your own build system
and the public ganglia headers/library to link against externally.

Carlo

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to