sync ldap detection from 0.8.5
authorPaul Mangan <paul@claws-mail.org>
Fri, 4 Oct 2002 09:31:59 +0000 (09:31 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 4 Oct 2002 09:31:59 +0000 (09:31 +0000)
ChangeLog.claws
configure.in

index 005dc1e91cff243acd53534f0cecc4472d5f05db..d21c6f5b4d94740f4aa53df4db5ed1b2f9ceb6a8 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-04 [paul]      0.8.3claws44
+
+       * configure.in
+               sync the LDAP detection from 0.8.5
+
 2002-10-02 [christoph] 0.8.3claws43
 
        * po/de.po
index aa20638bb9f5bc644148b79f21782bf8bf065c0a..8f397eb3e82a7540f65f164c986f2800d08eaab5 100644 (file)
@@ -10,7 +10,7 @@ MINOR_VERSION=8
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws43
+EXTRA_VERSION=claws44
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
@@ -173,30 +173,32 @@ if test "$ac_cv_enable_ldap" = yes; then
        AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
        AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
        AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
-       AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber")
+       AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
+                    $LDAP_LIBS)
 
        dnl we need libpthread for sylpheed ldap,  until we find
        dnl a better way to handle ldap requests asynchronously...
        AC_CHECK_LIB(pthread, pthread_create, LDAP_LIBS="$LDAP_LIBS -lpthread")
 
-       dnl the check for the headers 
        AC_CHECK_HEADERS(ldap.h lber.h pthread.h,
                         [ ac_cv_enable_ldap=yes ],
                         [ ac_cv_enable_ldap=no ])
-       AC_MSG_CHECKING([whether ldap headers were detected])
+
+       if test "$ac_cv_enable_ldap" = yes; then
+               AC_CHECK_LIB(ldap, ldap_open,
+                            [ ac_cv_enable_ldap=yes ],
+                            [ ac_cv_enable_ldap=no ],
+                            $LDAP_LIBS)
+       fi
+
+       AC_MSG_CHECKING([whether ldap library is available])
        AC_MSG_RESULT($ac_cv_enable_ldap)
 
        if test "$ac_cv_enable_ldap" = yes; then
-               AC_CHECK_LIB(ldap, ldap_open, [ 
-                               ac_cv_enable_ldap=yes
-                               CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
-                               LDAP_LIBS="$LDAP_LIBS -lldap `$GLIB_CONFIG --libs gthread`"
-                               AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
-                               AC_SUBST(LDAP_LIBS)
-                               ], 
-                               [ ac_cv_enable_ldap=no ], $LDAP_LIBS )
-               AC_MSG_CHECKING([whether ldap libs were detected])
-               AC_MSG_RESULT($ac_cv_enable_ldap)
+               CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
+               LDAP_LIBS="$LDAP_LIBS -lldap `$GLIB_CONFIG --libs gthread`"
+               AC_DEFINE(USE_LDAP, 1, Define LDAP support in addressbook.)
+               AC_SUBST(LDAP_LIBS)
        fi
 else
        AC_MSG_RESULT(no)