[geos-devel] Python/Swig/Configure Bug

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Fri Aug 31 21:13:50 EDT 2007


On Fri, 2007-08-31 at 14:43 -0600, Charlie Savage wrote:

> I think the issue is the test against $SWIG.  I changed it to this:
> 
> 	if test -n x"$SWIG"x; then
> 		use_swig=true
> 	fi
> 
> 
> And that seemed to do the trick....note my autoconf/bash knowledge is 
> next to non-existent so please verify.

Yes, you're right there. My version of SWIG was too old to run through
the entire process so this didn't show up in my test builds :(

> > By default, configure will not attempt to build the python or ruby
> > wrappers unless they are specifically enabled with --enable-python or
> > --enable-ruby. I have left the Makefiles in swig/python and swig/ruby as
> > they were so standard make rules should apply - so if geos_wrap.cxx
> > already exists and the timestamp is later than geos.i then the existing
> > (checked in) wrappers should be used. 
> 
> That's a great idea (and blindingly obvious - not sure why it didn't 
> occur to me) - except if SWIG was disabled it didn't work.  Before:
> 
> if ENABLE_SWIG
> 
> geos_wrap.cxx: ../geos.i ruby.i
> 	$(SWIG) -c++ -ruby -autorename -o $@ $<
> 
> else # !ENABLE_SWIG
> 
> geos_wrap.cxx:
> 	@echo "SWIG is disabled, can't build geos_wrap.cxx"
> 	false
> 
> endif # ENABLE_SWIG
> 
> Notice the dependency isn't setup correctly if !ENABLE_SWIG. So the 
> build would continue on its merry way.  It seems to me if you've 
> modified the *.i files and you don't have SWIG, then the build should 
> blow up with an appropriate error message.  So I have fixed both the 
> python and ruby automake files and checked them in.

Looks good from here.


ATB,

Mark.

-- 
ILande - Open Source Consultancy
http://www.ilande.co.uk





More information about the geos-devel mailing list