[geos-devel] Python/Swig/Configure Bug

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Thu Aug 30 02:46:51 EDT 2007

On Wed, 2007-08-29 at 23:30 -0600, Charlie Savage wrote:
> This patch from Mark does not work as intended:
> http://lists.refractions.net/pipermail/geos-devel/2007-February/002816.html
> If you have Python, then --enable-python will *always* be considered 
> true, even if you say --disable-python.  Thus ./configure will always go 
> out and query the python executable for path info and such.  And I 
> assume build the bindings also, although I haven't verified that.
> So this is a better situation that what the patch is trying to fix 
> (python is run even if you don't have python), but is hardly ideal.
> I'm not an autoconf expert, so I leave it to someone else to fix.
> Charlie

Hi Charlie,

Ah I see... it wasn't that the patch didn't work as intended, it was
that the actual python test macro was run regardless of whatever
command-line option was specified due to its position in the script.

Looking at the logic in the configure.in file, the logic looks strange
anyway since even if swig is not found, it still continues to check for
Python & Ruby. My thoughts are to reformat whats already there and
replace it with new logic that should go something like this:

	(SWIG check enabled by default)
	If SWIG is found then
		If Python enabled then
			Check for Python
			If Python is found then
				use_python = true
				use_python = false
			End If
			use_python = false
		End If

		If Ruby enabled then
			Check for Ruby
			If Ruby is found then
				use_ruby = true
				use_ruby = false
			End If
			use_ruby = false
		End If
	End If

If you're happy with this, let me know, and I'll post something later
today as it should only take a few mins to fix.

BTW I've seen some of your other PostGIS related postings, but am
currently extremely busy - they look interesting and I hope to review
them soon.



ILande - Open Source Consultancy

More information about the geos-devel mailing list