[postgis-devel] Re: $libdir and pg_config --pkglibdir compatibility

strk strk at keybit.net
Thu Nov 20 09:58:05 PST 2003


pramsey wrote:
>    Right. Cracking the "source code independant" install might prove 
> hard (but not necessarily impossible) The main trouble is that many 
> binary packages do not include all the headers we need in the 
> postgresql-devel package. So as a result, no amount of crafy configure 
> scripting will make things work -- the headers simply are not available.
>    Requiring the source code at least guarantees all the components are 
> around.
> Paul

You are right. Well, we might officially require source code but then
allow out-of-sources build for hackers ;) Anyway, the problem now
is about postgis.sql being unstable. 

I modified the Makefile again.
I dropped call to postgresql install-lib rule and copied it
locally modifying installation prefixes. Based on PG version
these are now $(libdir) OR $(pkglibdir). Accordingly MODULE_FILENAME
is an absolute path OR $$libdir.

NOTE that this will change installation directory from previous
postgis versions, thus leaving stale libs around and REQUIRING
a postgis.sql re-source to use the new library. As an alternative
we might omit the $$libdir and let DBA decide wheter to add $(libdir)
in their DYNAMIC LIBRARY PATH to make transition softer. Default
DYNAMIC LIBRARY PATH is $$libdir.

Comments welcome.

--strk;

> 
> strk wrote:
> 
> > PG7.2 documentaions explains that IF you specify a library to be
> > loaded without a trailing '/' that lib is searched in the directories
> > specified by the run-time configuration directive DYNAMIC_LIBRARY_PATH,
> > which defaults to just $libdir, which in turn resolves to what
> > pg_config --pkglibdir reports.
> > 
> > PG7.1 documentation says nothing about $lidir, and does not list
> > --pkglibdir among its valid arguments.
> > 
> > This means that PG7.1 can not have this nice mobility feature.
> > But from PG7.2 on we can use pg_config --pkglibdir (or a more
> > internal equivalent variable) to find library installation prefix.
> > 
> > NOTE that current behaviour is rely on postgresql Makefile for
> >      the install-lib rule. If the author of this file is still
> >      around I'd ask him/her for help about this.
> > 
> > --strk;
> 
> 
> -- 
>        __
>       /
>       | Paul Ramsey
>       | Refractions Research
>       | Email: pramsey at refractions.net
>       | Phone: (250) 885-0632
>       \_



More information about the postgis-devel mailing list