Re: unixware and --with-ldap - Mailing list pgsql-hackers

From Albe Laurenz
Subject Re: unixware and --with-ldap
Date
Msg-id 52EF20B2E3209443BC37736D00C3C1380BE7980E@EXADV1.host.magwien.gv.at
Whole thread Raw
In response to unixware and --with-ldap  (ohp@pyrenet.fr)
Responses Re: unixware and --with-ldap
Re: unixware and --with-ldap
List pgsql-hackers
> Here's the diff for configure.in that works for me.

I have a concern about this patch:

>       if test "$enable_thread_safety" = yes; then
>         # on some platforms ldap_r fails to link without PTHREAD_LIBS
>         AC_CHECK_LIB(ldap_r, ldap_simple_bind, [],
>              [AC_MSG_ERROR([library 'ldap_r' is required for
LDAP])],
> !            [$PTHREAD_LIBS])
>         LDAP_LIBS_FE="-lldap_r"
>       else
> !       LDAP_LIBS_FE="-lldap"
>       fi
> --- 1122,1139 ----
>       if test "$enable_thread_safety" = yes; then
>         # on some platforms ldap_r fails to link without PTHREAD_LIBS
>         AC_CHECK_LIB(ldap_r, ldap_simple_bind, [],
>              [AC_MSG_ERROR([library 'ldap_r' is required for
LDAP])],
> !            [$PTHREAD_LIBS $EXTRA_LDAP_LIBS])
>         LDAP_LIBS_FE="-lldap_r"
>       else
> !       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
>       fi

You left out the case where --enable_thread_safety is specified.
In that case, the frontend has to be linked with libldap_r.so
instead of libldap.so.

Does libldap_r.so _not_ require any extra libraries for linking?

If it does require extra libraries, are they the same as for the
thread-unsafe library (on Linux, that is the case)?

If libldap_r.so does require the same libs, please add $EXTRA_LDAP_LIBS
to the 'LDAP_LIBS_FE="-lldap_r"' line as well.

If libldap_r.so requires different additional libraries, a second
variable would be in place.

Could you test compiling with --enable_thread_safety ?

Yours,
Laurenz Albe


pgsql-hackers by date:

Previous
From: "Hiroshi Saito"
Date:
Subject: invalid input syntax for type timestamp.
Next
From: "Albe Laurenz"
Date:
Subject: Re: Security leak with trigger functions?