Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x
Дата
Msg-id 1677203.1625582865@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x  (Adrian Ho <ml+postgresql@03s.net>)
Ответы Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x  (Adrian Ho <ml+postgresql@03s.net>)
Список pgsql-bugs
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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17084: Wrong results of distinct node.
Следующее
От: Pantelis Theodosiou
Дата:
Сообщение: Re: BUG #17084: Wrong results of distinct node.