Thoughts on a mapserver-config script...

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Thu Jun 7 22:50:33 EDT 2007


Frank Warmerdam wrote:
> Steve Lime wrote:
>> I checked on how GDAL did this and copied that process over to 
>> mapserver in
>> the main branch. Doing a 'make' will create a mapserver-config script now
>> although it likely needs tweaking...
> 
> Steve,
> 
> This looks promising on a preliminary review.
> 
> I notice that "mapserver-config --libs" does not include -lmap.  
> Shouldn't it?
> I also think the value of this is somewhat limited yet since we don't have
> a concept of installing mapserver yet.  So we can't actually point things
> at the installed location of the mapserver library (or include files).

Steve,

mapserver-config --cflags might contian too much or we might want to add 
some additional options like:

--copts     this would return just compiler options like: -g -O2 etc
--includes  this would return just the -I parameters
--defines   this would return just the -D parameters

This would allow a little better fine grain control over how this data 
is used by other programs that are linking to mapserver.

Thanks! this is a cool addition to mapserver.

Frank,

I'm actually using this right now. I have a small project where the 
build process is:

./configure --with-mapserver=/path/to/mapserver-build-dir

I then use mapserver-config to get the variables and I add 
/path/to/mapserver to the -I and -L variables so my make file picks up 
map.h and links with libmap.a (soon to be libmapserver.a I guess).

It works pretty slick.

-Steve W

> Also, I think a config switch that reports the full version string like
> the following would be nice.  Though I can't see exactly how this would
> be accomplished without some substantial changes since this is normally
> constructed based on macros in maperror.c.
> 
>  OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ 
> SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER 
> SUPPORTS=WCS_SERVER INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE 
> DEBUG=MSDEBUG
> 
> Best regards,



More information about the mapserver-dev mailing list