Re: [HACKERS] Fix linking of OpenLDAP libraries - Mailing list pgsql-patches

From Martijn van Oosterhout
Subject Re: [HACKERS] Fix linking of OpenLDAP libraries
Date
Msg-id 20060908194746.GM5479@svana.org
Whole thread Raw
In response to Re: [HACKERS] Fix linking of OpenLDAP libraries  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Fri, Sep 08, 2006 at 03:20:00PM -0400, Tom Lane wrote:
> "Albe Laurenz" <all@adv.magwien.gv.at> writes:
> > I did not only add them to the Makefile for interfaces/libpq,
> > but also everywhere something is linked against libpq in case
> > somebody links static.

> If we do need to start mentioning all of libpq's dependencies everywhere
> it's linked, I think it's time for a generic solution to that, instead
> of hacking each such place over again every time a new dependency pops up.

The business of having to include every single dependancy when linking
static is quite irritating. It has almost reached the point where
people are just giving up static linking because it's too much of a
pain.

However, if we do want to support it, the way you do it is by extending
pg_config to do something like:

pg_config --dynamic-lick   => returns -lpq
pg_config --static-link    => returns -lpq <plus other libs>

That way only people who actually want static linking need be bothered.

Have a ncie day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Fix linking of OpenLDAP libraries
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Fix linking of OpenLDAP libraries