On 06/25/2012 11:32 AM, Sandro Santilli wrote:

Autotools do something like this:

DEFAULT_INCLUDES = -I. -I$(top_builddir)/include -I$(top_builddir)/include/geos
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
         $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)

Where DEFAULT_INCLUDES is automatically generated and $(CPPFLAGS)
and $(CXXFLAGS) are the ones you eventually override.

In PostGIS we don't have this double definition so it won't work:

         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<

I guess we could add a $(DEFAULT_INCLUDES) right before the CFLAGS.
Then you could use:

  make CFLAGS=...

Note that "CFLAGS=... make" has no effect on either PostGIS or GEOS
(autotools-based) for me.


No, it is a configure problem. Sorry, I didn't explain it right. The command is "CFLAGS=... LDFLAGS=... configure". After that, all following "makes" include those paths before all system generated paths. The problem arises when in an earlier path there is an older version of a library or header file. I don't see a simple solution.

Jan
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to