Re: unixware and --with-ldap

Поиск
Список
Период
Сортировка
От ohp@pyrenet.fr
Тема Re: unixware and --with-ldap
Дата
Msg-id Pine.UW2.4.53.0612141836500.3974@sun.pyrenet
обсуждение исходный текст
Ответ на Re: unixware and --with-ldap  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: unixware and --with-ldap  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Dear Tom,

Thanks for you advice.

Here's the diff for configure.in that works for me.
Best regards

---
*** configure.in.orig    jeu déc 14 18:35:27 2006
--- configure.in    jeu déc 14 18:35:37 2006
***************
*** 1122,1137 **** if test "$with_ldap" = yes ; then   _LIBS="$LIBS"   if test "$PORTNAME" != "win32"; then
!     AC_CHECK_LIB(ldap, ldap_bind, [], [AC_MSG_ERROR([library 'ldap' is required for LDAP])])
!     LDAP_LIBS_BE="-lldap"     if test "$enable_thread_safety" = yes; then       # on some platforms ldap_r fails to
linkwithout PTHREAD_LIBS       AC_CHECK_LIB(ldap_r, ldap_simple_bind, [],            [AC_MSG_ERROR([library 'ldap_r' is
requiredfor LDAP])],
 
!            [$PTHREAD_LIBS])       LDAP_LIBS_FE="-lldap_r"     else
!       LDAP_LIBS_FE="-lldap"     fi   else     AC_CHECK_LIB(wldap32, ldap_bind, [], [AC_MSG_ERROR([library 'wldap32'
isrequired for LDAP])])
 
--- 1122,1139 ---- if test "$with_ldap" = yes ; then   _LIBS="$LIBS"   if test "$PORTNAME" != "win32"; then
!     AC_CHECK_LIB(ldap, ldap_bind, [],
!     [AC_MSG_ERROR([library 'ldap' is required for LDAP])],
!     [$EXTRA_LDAP_LIBS])
!     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"     if test "$enable_thread_safety" = yes; then       # on some platforms
ldap_rfails 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   else     AC_CHECK_LIB(wldap32, ldap_bind, [],
[AC_MSG_ERROR([library'wldap32' is required for LDAP])])
 

On Mon, 11 Dec 2006, Tom Lane wrote:

> Date: Mon, 11 Dec 2006 11:26:14 -0500
> From: Tom Lane <tgl@sss.pgh.pa.us>
> To: Andrew Dunstan <andrew@dunslane.net>
> Cc: ohp@pyrenet.fr, pgsql-hackers list <pgsql-hackers@postgresql.org>
> Subject: Re: [HACKERS] unixware and --with-ldap
>
> Andrew Dunstan <andrew@dunslane.net> writes:
> > The right way to do this I think is to put an entry adjusting LIBS in
> > src/makefiles/Makefile.unixware, but first it looks like we need to
> > propagate the with-ldap switch into src/Makefile.global
>
> The Makefile is far too late --- this has to be adjusted at configure
> time, else configure will conclude that libldap isn't available.
> (I assume that Unixware's linker is sane enough that the link test
> will fail without the supporting libraries.)
>
> I'd be inclined to do something like add
>
>     EXTRA_LDAP_LIBS="-llber -lresolv"
>
> in src/template/unixware, and then in configure.in add this where
> needed:
>
> if test "$with_ldap" = yes ; then
>   _LIBS="$LIBS"
>   if test "$PORTNAME" != "win32"; then
>     AC_CHECK_LIB(ldap, ldap_bind, [$EXTRA_LDAP_LIBS], [AC_MSG_ERROR([library 'ldap' is required for LDAP])])
>     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
>     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, [$EXTRA_LDAP_LIBS],
>            [AC_MSG_ERROR([library 'ldap_r' is required for LDAP])],
>            [$PTHREAD_LIBS])
>       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
>     else
>       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
>     fi
>   else
>     AC_CHECK_LIB(wldap32, ldap_bind, [], [AC_MSG_ERROR([library 'wldap32' is required for LDAP])])
>     LDAP_LIBS_FE="-lwldap32"
>     LDAP_LIBS_BE="-lwldap32"
>   fi
>   LIBS="$_LIBS"
> fi
>
> I'm not in a position to test that though ...
>
>             regards, tom lane
>

-- 
Olivier PRENANT                    Tel: +33-5-61-50-97-00 (Work)
15, Chemin des Monges                +33-5-61-50-97-01 (Fax)
31190 AUTERIVE                       +33-6-07-63-80-64 (GSM)
FRANCE                          Email: ohp@pyrenet.fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Operator class group proposal
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Security leak with trigger functions?