Mapserver compilation flags should be added to the SWIG command line

Umberto Nicoletti umberto.nicoletti at GMAIL.COM
Mon Aug 28 11:47:08 EDT 2006


I have posted a similar mail today (search for Defines in swig
interface files in the subject) . Tamas, sorry for the double posting,
I missed this one.

I appear to recall that it was once agreed that swig interface files
should not have defines in them, but I at the moment the only
reference I found is here:

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=895#c2
(end of first para)

Sean Gillies probably knows better.

At this point C# is the only language that has 100% correct
compilation today. Java mapscript had the flags passed to swig, but
they were removed a long time ago.
Other laguages like ruby and python require the user to generate the
interface by running swig by hand. This makes it much difficult to
pass defines to swig as the user should have to copy them from the
Makefile or alternatively we should provide and mantain Makefiles for
all mapscripts.

This is the list of defines (still) in the swig interface files:

swiginc/image.i:#if GD2_VERS > 1

Not sure about this one, maybe it is right.....

swiginc/image.i:#ifdef USE_GD_GIF
swiginc/image.i:#ifdef USE_GD_PNG
swiginc/image.i:#ifdef USE_GD_JPEG
swiginc/image.i:#ifdef USE_GD_WBMP

These were added by Sean in July 04.

swiginc/point.i:#ifdef USE_POINT_Z_M
swiginc/point.i:#ifdef USE_POINT_Z_M
swiginc/point.i:#ifdef USE_POINT_Z_M
swiginc/point.i:#ifdef USE_POINT_Z_M
swiginc/point.i:#ifdef USE_POINT_Z_M
swiginc/point.i:#ifdef USE_POINT_Z_M

These are rarely used and they are not a real problem, at least for 4.10

swiginc/shape.i:#ifdef USE_GEOS
swiginc/shape.i:#ifdef USE_GEOS

These were added by sdlime on his lates rework of geos code this june.

I can try to take care of the defines in image.i and maybe steve of
those in shape.i, but I dunno if I'm going or if we should do it for
for 4.10?

Umberto


On 8/28/06, Daniel Morissette <dmorissette at mapgears.com> wrote:
> Tamas Szekeres wrote:
> > Folks,
> >
> > Currently most of the SWIG bindings does not add mapserver compilation
> > flags to the
> > SWIG command line and therefore the interface might not be generated
> > properly.
> > For example missing -DUSE_POINT_Z_M will prevent from generating z and m
> > members
> > for pointObj etc.
> >
> > I've added a bug for this issue:
> > http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1881
> >
> > And fixed for C#
> >
>
> Does something need to be done for this for the other wrappers? There
> used to be a 'mapscriptvars' file with all the compile flags used by the
> Perl Makefile. Is this not used by the other bindings?
>
> Daniel
> --
> Daniel Morissette
> http://www.mapgears.com/
>



More information about the mapserver-dev mailing list