[Date Prev][Date Next] [Chronological] [Thread] [Top]

Kerberos tweaks to configure.in (ITS#1372)



Full_Name: Booker C. Bense
Version: 2.0.15
OS: Solaris
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (171.64.13.91)


When using --enable-kbind, configure.in incorrectly overwrites the value
of the --with-kerberos arguement. This is only an issue if you have
multiple versions of kerberos installed and you want to have Openldap
choose the correct one. 

The second issue is that for MIT versions of kerberos > 1.1 the name
of the crypto library has changed from -lcrypto to -lk5crypto. I've included
a patch which fixes both problems. 

P.S. why is string_to_key still in UD? 

--- openldap-2.0.15/configure.in        Tue Sep 18 09:12:10 2001
+++ openldap-2.0.15.dirty/configure.in  Thu Oct  4 15:07:09 2001
@@ -340,7 +340,9 @@
        if test $ol_with_kerberos = no ; then
                AC_MSG_ERROR([options require --with-kerberos])
        fi
-       ol_with_kerberos=yes
+       if test -z $ol_with_kerberos ; then
+               ol_with_kerberos=yes
+       fi
 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
        if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
                AC_MSG_WARN([Kerberos detection enabled unnecessarily]);
@@ -790,14 +792,18 @@
                        krb5_impl=heimdal
                else
                        krb5_impl=mit
+dnl Check for kerberos 1.1.* vs 1.0 
+                       AC_CHECK_LIB(k5crypto, main,
+                               [k5crypto_lib=k5crypto],
+                               [k5crypto_lib=crypto])
                fi
 
                if test $krb5_impl = mit; then
                        AC_CHECK_LIB(krb5, main,
                                [have_krb5=yes
-                               KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"],
+                               KRB5_LIBS="-lkrb5 -l$k5crypto_lib -lcom_err"],
                                [have_krb5=no],
-                               [-lcrypto -lcom_err])
+                               [-l$k5crypto_lib -lcom_err])
 
                elif test $krb5_impl = heimdal; then
                        AC_CHECK_LIB(krb5, main,
@@ -836,14 +842,14 @@
 
 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
        $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
-
+
        AC_CHECK_HEADERS(kerberosIV/krb.h kerberosIV/des.h)
 
        if test $ac_cv_header_kerberosIV_krb_h = yes ; then
                if test $krb5_impl = mit; then
                        AC_CHECK_LIB(krb4, main, [have_k425=yes
                                KRB4_LIBS="-lkrb4 -ldes425"], [have_k425=no],
-                               [-ldes425 -lkrb5 -lcrypto -lcom_err])
+                               [-ldes425 -lkrb5 -l$k5crypto_lib -lcom_err])
 
                elif test $krb5_impl = heimdal; then
                        AC_CHECK_LIB(krb4, main, [have_k425=yes