[mapserver-dev] OT: Help is configure

Stephen Woodbridge woodbri at swoodbridge.com
Wed Aug 20 16:19:32 EDT 2008


Daniel,

Thanks, I can use this and it would be great if we can get 
MS_VERSION_NUM added. I opened a ticket:

http://trac.osgeo.org/mapserver/ticket/2750

and cc you on it.

-Steve W

Daniel Morissette wrote:
> You could look at the way the Apache version string is parsed in 
> MapServer's configure.in.
> 
> To mkae this simpler in the future, perhaps it's time to add 
> MS_VERSION_NUM to mapserver.h similar to what we have in GDAL, e.g.
> 
> #ifndef MS_VERSION_MAJOR
> #  define MS_VERSION_MAJOR    5
> #  define MS_VERSION_MINOR    2
> #  define MS_VERSION_REV      0
> #endif
> 
> #ifndef MS_VERSION_NUM
> #  define MS_VERSION_NUM 
> (MS_VERSION_MAJOR*10000+MS_VERSION_MINOR*100+MS_VERSION_REV)
> #endif
> 
> Then your code could use
> 
> #if MS_VERSION_NUM >= 50200 /* Use OGR Style C API */
> 
> If you file a ticket and there are no objections then I'll add this. We 
> could also backport to 5.2.1 to make this useful immediately.
> 
> Daniel
> 
> 
> 
> Stephen Woodbridge wrote:
>> Hi all,
>>
>> Could someone familiar with configure scripts help me with how to 
>> detect which version of code I'm trying configure and build with. I 
>> have a C application that links with mapserver.a and occasionally I 
>> run into changes like below that I need to detect and set an 
>> appropriate DEFINE so I can code around this if #ifdef blocks.
>>
>>
>> 5.0.3
>> int msQueryByPoint(mapObj *map, int qlayer, int mode, pointObj p, 
>> double buffer)
>>
>> 5.2.0
>> int msQueryByPoint(mapObj *map, int qlayer, int mode, pointObj p, 
>> double buffer, int maxresults)
>>
>>
>>
>> I have a very basic automake, autoconf script that works ok, but I 
>> need to figure out how to add code to check for the above or to check 
>> if the mapserver version is 5.2.0 or greater.
>>
>> Any help, suggestions or pointers would be appreciated.
>>
>> Thanks,
>>   -Steve W
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
> 
> 



More information about the mapserver-dev mailing list