[GRASS5] GRASS extensions build system, r.cva

Daniel Calvelo Aros dcalvelo at minag.gob.pe
Wed Mar 16 20:22:09 EST 2005


From: Benjamin Ducke <benducke at compuserve.de>
Sent: Wed, 16 Mar 2005 21:55:45 +0100
> I am trying to put together a build system
> for building GRASS modules and libraries externally and
> installing them into the binary installation tree.
> 
> As the recent discussion thread has shown, the necessary
> libs and header files are being installed by recent
> GRASS versions, so that this should in principle be possible.
> 
> Unfortunately, things seem to be a bit more complicated,
> because the build system still has to take into account
> some machine and OS dependent compile options,
> different C compiler names and options etc.

Have you thought about writing a grass-config executable to be included in the
grass binary? 

Several packages do this: they use the @vars@ markers expected by autoconf in
a very simple executable that responds to options such as '--libs',
'--include' and so on. It is intended to be used like this (totally fictitious
example to give an idea):

$ gcc module.c `grass-config --include --libs` -o module

where grass-config, upon receiving --include --libs arguments, outputs (to
stdout) the string '-I/usr/include/grass -L/usr/lib/grass -lgrass', thus
giving all compiler options. 

this scheme is used in gtk, gnome, wxWidgets and so on.

HTH, Daniel.




More information about the grass-dev mailing list