From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adrian Ho <ml+postgresql@03s.net>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x
Date: Tue, 06 Jul 2021 10:47:45 -0400
Message-ID: <1677203.1625582865@sss.pgh.pa.us> (raw)
In-Reply-To: <cc729116-2a2d-9edd-a32d-4066b92e4a75@03s.net>
References: <17083-a19190d9591946a7@postgresql.org>
<1666182.1625579201@sss.pgh.pa.us>
<cc729116-2a2d-9edd-a32d-4066b92e4a75@03s.net>
Adrian Ho <ml+postgresql@03s.net> writes:
> On 6/7/21 9:46 pm, Tom Lane wrote:
>> As for the patch itself, I'm wondering about
>> + LDAP_LIBS_FE="${ac_lib:+-l}$ac_lib $EXTRA_LDAP_LIBS"
>> That seems undesirably intimate with the implementation details
>> of AC_SEARCH_LIBS. Surely there's a better way?
> Hmmm, good point, my Autotools-fu is not very strong. I'll see if
> there's a blessed way of doing the above, otherwise I'll probably have
> to test each library separately in an AC_CHECK_LIB cascade instead.
Looking at the Autoconf docs, what AC_SEARCH_LIBS is specified to do is
"Prepend `-lLIBRARY' to `LIBS' for the first library found to contain
FUNCTION". So I'd suggest
* Save contents of LIBS and set it to empty
* Run AC_SEARCH_LIBS
* LDAP_LIBS_FE="$LIBS $EXTRA_LDAP_LIBS"
* Restore LIBS
I think we have some instances of that pattern already.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, ml+postgresql@03s.net, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x
In-Reply-To: <1677203.1625582865@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox