Markus Neteler wrote:

> >> > LOC_CHECK_LIBS checks for a specific symbol, so it should be
> >> > straightforward to check for a symbol which is only present in 3.x.
> >>
> >> Something like this?
> >> [nete...@localhost grass70]$ svn diff configure.in
> >
> >> +  
> >> LOC_CHECK_LIBS(geos,GEOSGeom_createLinearRing,GEOS,$GEOS_CFLAGS,$GEOS_LIBS,,,,)
> >
> > Probably:
> >
> >        
> > LOC_CHECK_LIBS(geos,GEOSGeom_createLinearRing,GEOS,$GEOS_LIBS,GEOS_LIBS)
> 
> I have submitted that.
> 
> Locally it fails for me, according to config.log the following line is 
> missing:
> #include <geos_c.h>

That line isn't supposed to be there.

> If I extract the test manually, it find the function 
> GEOSGeom_createLinearRing()
> but complains about:
> 
> gcc -o conftest -g -Wall -Werror-implicit-function-declaration
> -fno-common -mtune=nocona -m64 -minline-all-stringops
> -L/usr/local/lib -lgeos -Wl,--no-undefined -Wl,--export-dynamic
> -L/usr/lib64 conftest.c -lgeos
> conftest.c:7: error: conflicting types for �GEOSGeom_createLinearRing�
> /usr/local/include/geos_c.h:237: error: previous declaration of
> �GEOSGeom_createLinearRing� was here
> 
> In /usr/local/include/geos_c.h it is
> extern GEOSGeometry GEOS_DLL *GEOSGeom_createLinearRing(GEOSCoordSequence* s);
> 
> but in conftest.c it is:
> char GEOSGeom_createLinearRing();
> 
> No idea how to fix the test in configure.in.

Library checks merely check that the function is exported by the
library. The declaration doesn't need to have the correct type, as the
linker doesn't perform any type checking.

Note that the library checks only work with exported functions. They
won't work with macros or inline functions, as those don't exist in
the library.

-- 
Glynn Clements <[email protected]>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to