Hi Nicolas,

* Nicolas Bock wrote on Mon, Nov 15, 2010 at 05:11:26PM CET:
> (1) I can use C++ and rewrite the function header as a template.
> (2) I can define a macro for the preprocessor that is either defined
> as "float" or "double" and then compile the function source twice, the
> first time with $CC -DFLOAT=float and the second time with $CC
> -DFLOAT=double.
> 
> Is option (2) possible within automake without excessive hackery?

Yes.

> Is it advisable? Is there a third option that I might want to
> consider?

I'd say it's normal mumbo jumbo.  See 'info Automake true'.

bin_PROGRAMS = foo
foo_SOURCES = ... (other sources)
foo_LDADD = libfood.a libfoof.a

noinst_LIBRARIES = libfood.a libfoof.a
libfood_a_SOURCES = bar.c
libfoof_a_SOURCES = $(libfood_a_SOURCES)
libfood_a_CPPFLAGS = -DFLOAT=float

Hope that helps.

Cheers,
Ralf

Reply via email to