On Thu, 2005-06-02 at 02:37 -0400, Jakub Jelinek wrote:
On Thu, Jun 02, 2005 at 07:16:18AM +0100, Mike Hearn wrote:
> Libs: $(foo) -lbar -lbaz
>
> Where foo could be defined internally as either "" in the portable
> upstream version or "--as-needed" in the downstream version.
Note that it would need to be
Libs: $(foo) -lbar -lbaz $(no_foo)
foo = --as-needed
no_foo = --no-as-needed
or better
Libs: -lbar
NeededLibs: -lbaz
where pkg-config collects the various groups together, dedupes and then
either issues --as-needed ... --no-as-needed around them (gnu-ld) or
just put them there (non-gnu-ld).
Not rocket science.. and takes those 2 days ;)