[geos-devel] Python/Swig/Configure Bug
cfis at savagexi.com
Fri Aug 31 16:43:00 EDT 2007
I think there is a mistake in the patch - it *always* disables SWIG.
From the patch:
if test x"$use_python" = xtrue || test x"$use_ruby" = xtrue; then
if test x"$SWIG" = x; then
if test x"$use_swig" = xtrue; then
AM_CONDITIONAL(ENABLE_SWIG, [ test x"$use_swig" = xtrue ])
I think the issue is the test against $SWIG. I changed it to this:
if test -n x"$SWIG"x; then
And that seemed to do the trick....note my autoconf/bash knowledge is
next to non-existent so please verify.
> 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:
geos_wrap.cxx: ../geos.i ruby.i
$(SWIG) -c++ -ruby -autorename -o $@ $<
else # !ENABLE_SWIG
@echo "SWIG is disabled, can't build geos_wrap.cxx"
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.
> One more thing - I also tweaked the Ruby macro so that the build fails
> if the Ruby executable isn't found. Since the user is explicitly trying
> to build with --enable-ruby, it seems silly to push on regardless if the
> ruby interpreter isn't found.
Sounds good to me.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20070831/46bdc441/smime.bin
More information about the geos-devel