[Xapian-discuss] PHP bindings on a Mac

rm@fabula.de rm@fabula.de
Wed, 26 May 2004 15:22:53 +0200


On Wed, May 26, 2004 at 02:02:24PM +0100, Richard Boulton wrote:
> rm@fabula.de wrote:
> >Well, the easiest thing is: just put config.sub into the tarball. This file
> >can be easily distributed without any problems (it just 'canonicalize' the
> >configuration type). Since it doesn't depend on any local settings it's 
> >easy to distribute.
> 
> It's not that simple, unfortunately.  The php4/xapian/ directory is 
> currently created at build time, so for a VPATH build, it will be in the 
> build tree, not the source tree.  If config.sub was put into the 
> tarball, it would be placed into the source tree.

IMHU this is where config.sub belongs anyway -- config.sub is, like
'install.sh' and 'conifg.guess' part of the configuration machinery and
_not_ a file created during builds (see the xapian-core module. All files
mentioned live in the distributed tarball).

> "config.sub" is already in the tarball, incidentally.  It's just not 
> also in the tarball at "php4/xapian/config.sub", and even if it were it 
> wouldn't be found by the build process.  Suppose we are building 
> xapian-bindings in xapian-bindings/build/:

Yes, i know, i'm using it to build the guile bindings :-)

> The php4 build process (at "make" time) will create 
> "xapian-bindings/build/php4/xapian", populate it with source files and a 
> Makefile and configure script, and then run configure.  This configure 
> run is not a VPATH build, and even if it were, the source directory is 
> "xapian-bindings/build/php4/xapian/", so it will not look in 
> "xapian-bindings/php4/xapian/" for config.sub.

Autsch! Both Makefile and configure are supposed to be distributed! Rebuilding
them isn't a good idea (because it forces the user to have the same version
of automake/autoconf as the author of Makefile.am and confiigure.ac). 

> The problem is that swig generates an autotools proje, and expects us 
> to use it to build the bindings.  This prevents us distributing it in 
> pre-made form.  I think the best solution is to make our own autotools 
> project, and ignore the files generated by swig.  (Though this runs the 
> risk of being broken as new versions of swig appear.  We have to do work 
> to support new versions of swig anyway, often, so I don't think this is 
> a big loss.)

Hmm, is this swig or swig-php ? I don't remember such problems with the guile 
bindings. But i only build those from a VPATH. I'm pretty shure the config.sub
in xapian-bindings is found.

 RalfD

> -- 
> Richard
> 
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss@lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss