[postgis-devel] --with-libfoo

Sandro Santilli strk at keybit.net
Mon Aug 4 06:33:10 PDT 2014


On Mon, Aug 04, 2014 at 02:24:55PM +0100, Mark Cave-Ayland wrote:
> On 04/08/14 09:01, Sandro Santilli wrote:
> 
> >On Fri, Aug 01, 2014 at 02:29:27PM -0700, Paul Ramsey wrote:
> >>Hey devs,
> >>I had to do a build for Solaris recently, and ended up having to patch configure.ac to do it, because of the way we reference external libraries.
> >>Basically, we assume that any external library will be installed in /some/prefix/lib and /some/prefix/include. So we only expect to need /some/prefix in our configuration in order to find the necessary parts.
> >>In solaris 64 bit, the includes are are in /some/prefix/include but the libraries are in /home/prefix/lib/64.
> >>I noted that cmake has this general idea baked into their patterns for extension libraries, the expectation that include and lib paths be declared independently.
> >>In the end, I changed
> >>—with-projdir
> >>to
> >>—with-proj-includedir
> >>and
> >>—with-proj-libdir
> >>
> >>I’d like to do a similar thing to trunk. I could try and keep the old syntax around, or just remove it in favor of the split syntax.
> >>
> >>Thoughts?
> >
> >Please try to keep the old syntax around too, shouldn't be hard
> >(just have the --with-xxxdir processed first)
> >
> >If you're up for some fun, having a PGIS_FIND_PACKAGE m4 macro
> >might help making these things easier to maintain.
> 
> Yeah. I'm interested to how someone managed to build PROJ.4 in this
> way, as it goes beyond a simple --prefix into configure. Before
> jumping in, do we know the configure options that were passed to
> PROJ.4 when it was built in this way?
> 
> Plus I agree with Sandro; if this is a common problem on platforms
> such as Solaris then maybe there is already an existing macro we can
> use to resolve the issue?

In Gnash we made our own:
http://git.savannah.gnu.org/cgit/gnash.git/tree/macros/gnashpkgtool.m4#n276

It provides --with-xx-incl and --with-xx-libs, and uses pkg-config
if available, unless "cross_compiling".

But it's not necessarely something that well-made to copy ...

--strk;



More information about the postgis-devel mailing list