Updated to add gssapi libs, since this is what we use krb5 for :-)

2003-01-28  Jeffrey Stedfast  <fejj@ximian.com>

	* configure.in (HAVE_KRB5): Updated to add gssapi libs, since this
	is what we use krb5 for :-)

svn path=/trunk/; revision=19675
This commit is contained in:
Jeffrey Stedfast
2003-01-28 23:56:59 +00:00
committed by Jeffrey Stedfast
parent 83ac1fc7df
commit 9fec09fdf7
2 changed files with 31 additions and 21 deletions

View File

@ -1,3 +1,8 @@
2003-01-28 Jeffrey Stedfast <fejj@ximian.com>
* configure.in (HAVE_KRB5): Updated to add gssapi libs, since this
is what we use krb5 for :-)
2003-01-28 Rodney Dawes <dobey@ximian.com>
* tools/Makefile.am (EXTRA_DIST): s/bin_SCRIPTS/tools_SCRIPTS/

View File

@ -607,27 +607,32 @@ fi
dnl ********
dnl Kerberos
dnl ********
AC_ARG_WITH(krb5, [ --with-krb5=PREFIX Location of Kerberos 5 libs/includes])
AC_ARG_WITH(krb4, [ --with-krb4=PREFIX Location of Kerberos 4 libs/includes])
msg_krb5=no
if test ${with_krb5:=no} != no; then
LDFLAGS_save="$LDFLAGS"
AC_ARG_WITH(krb5, [ --with-krb5=PREFIX Location of Kerberos 5 libs/includes], with_krb5="$withval", with_krb5="no")
AC_ARG_WITH(krb4, [ --with-krb4=PREFIX Location of Kerberos 4 libs/includes], with_krb4="$withval", with_krb4="no")
mitlibs="-lkrb5 -lk5crypto -lcom_err"
heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken"
msg_krb5="no"
if test "$x{with_krb5}" != "xno"; then
LDFLAGS_save="$LDFLAGS"
mitlibs="-lkrb5 -lk5crypto -lcom_err -lgssapi_krb5"
heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken -lgssapi"
AC_CACHE_CHECK([for Kerberos 5], ac_cv_lib_kerberos5,
[
LDFLAGS="$LDFLAGS -L$with_krb5/lib $mitlibs"
AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$mitlibs",
[
LDFLAGS="$LDFLAGS_save -L$with_krb5/lib $heimlibs"
AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$heimlibs", ac_cv_lib_kerberos5=no)
AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$heimlibs", ac_cv_lib_kerberos5="no")
])
LDFLAGS="$LDFLAGS_save"
])
if test "$ac_cv_lib_kerberos5" != no; then
if test "$ac_cv_lib_kerberos5" != "no"; then
AC_DEFINE(HAVE_KRB5)
msg_krb5=yes
if test "$ac_cv_lib_kerberos5" == "$mitlibs"; then
msg_krb5="yes (MIT)"
else
msg_krb5="yes (Heimdal)"
fi
KRB5_CFLAGS="-I$with_krb5/include/krb5"
KRB5_LDFLAGS="-L$with_krb5/lib $ac_cv_lib_kerberos5"
fi
@ -636,13 +641,13 @@ else
AC_MSG_RESULT($with_krb5)
fi
msg_krb4=no
if test x${with_krb4:=no} != xno; then
msg_krb4="no"
if test "x${with_krb4}" != "xno"; then
LDFLAGS_save="$LDFLAGS"
AC_CACHE_CHECK(for Kerberos 4, ac_cv_lib_kerberos4,
[
ac_cv_lib_kerberos4=no
ac_cv_lib_kerberos4="no"
case $ac_cv_lib_kerberos5 in
*k5crypto*)
# Look for MIT krb5 compat krb4
@ -650,16 +655,16 @@ if test x${with_krb4:=no} != xno; then
AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb4 -ldes425 $KRB5_LDFLAGS")
;;
esac
if test "$ac_cv_lib_kerberos4" = no; then
if test "$ac_cv_lib_kerberos4" = "no"; then
# Look for KTH krb4
LDFLAGS="$LDFLAGS_save -L$with_krb4/lib -lkrb -lcrypto -lcom_err -lroken"
AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb -lcrypto -lcom_err -lroken")
fi
if test "$ac_cv_lib_kerberos4" = no; then
if test "$ac_cv_lib_kerberos4" = "no"; then
# Look for old MIT krb4
LDFLAGS="$LDFLAGS_save -L$with_krb4/lib -lkrb"
AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4=-lkrb,
AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb",
[
LDFLAGS="$LDFLAGS -ldes"
AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb -ldes")
@ -667,9 +672,9 @@ if test x${with_krb4:=no} != xno; then
fi
])
LDFLAGS="$LDFLAGS_save"
if test "$ac_cv_lib_kerberos4" != no; then
if test "$ac_cv_lib_kerberos4" != "no"; then
AC_DEFINE(HAVE_KRB4)
msg_krb4=yes
msg_krb4="yes"
if test -f "$with_krb4/include/krb.h" -o -f "$with_krb4/include/port-sockets.h"; then
KRB4_CFLAGS="-I$with_krb4/include"
fi
@ -677,7 +682,7 @@ if test x${with_krb4:=no} != xno; then
KRB4_CFLAGS="-I$with_krb4/include/kerberosIV"
fi
KRB4_LDFLAGS="-L$with_krb4/lib $ac_cv_lib_kerberos4"
CFLAGS_save="$CFLAGS"
CFLAGS="$CFLAGS $KRB4_CFLAGS"
AC_TRY_COMPILE([#include "krb.h"