gnucap-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] Autotools build system


From: al davis
Subject: Re: [Gnucap-devel] Autotools build system
Date: Fri, 19 Jun 2009 21:19:08 -0400
User-agent: KMail/1.11.4 (Linux/2.6.26-1-amd64; KDE/4.2.4; x86_64; ; )

> > I consider choosing which plugins to static link to be
> > something a regular user building the program should be
> > able to do.  This is not supported by autotools as far as I
> > know.

With a plain Makefile, I would just edit the Makefile to add the 
files I want to include.

On Sunday 14 June 2009, Kevin Bowling wrote:
> I believe we can set conditionals.  For example, in
> configure.in:
>
> AM_CONDITIONAL(STATICPSS, test "$enable_staticpss" = yes)
>
> When the user specifies ./configure --enable-staticpss, this
> variable will be passed to the Makefile.
>
> In the plugin directory's Makefile.am (gnucap/plugins/pss):
>
> if STATICPSS
> lib_LIBRARIES = libpss.a
> libpss_a_SOURCES = pss.cc
> endif
>
> In the main Makefile.am:
> if STATICPSS
> gnucap_LDADD += $(top_builddir)/plugins/pss/libpss.a
> gnucap_CPPFLAGS += -I $(top_builddir)/plugins/pss/pss.h
> endif
>
> This is a bit simplified, but I think a solution using
> something like this would be elegant.  We would need to set
> defaults for which modules to build, but could also parse
> --disable-<x> statements to remove core static modules.

You can't list the plugins in the main Makefile.  You can't know 
the entire list of possible plugins.

This rule applies to the program source too.  The core has no 
listing of what plugins might be used.

The only way I can think of to let the user specify what plugins 
to static link is to let the user explicitly list  them, 
somewhere, or to include a file containing such a list.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]