openbsd-ports/mail/evolution/patches/patch-configure_in
2003-05-25 22:10:22 +00:00

59 lines
2.1 KiB
Plaintext

$OpenBSD: patch-configure_in,v 1.5 2003/05/25 22:10:22 marcm Exp $
--- configure.in.orig Mon Mar 31 08:32:50 2003
+++ configure.in Fri Apr 4 11:07:05 2003
@@ -86,7 +86,8 @@ AC_CHECK_HEADERS(alloca.h)
dnl check for socklen_t (in Unix98)
AC_MSG_CHECKING(for socklen_t)
-AC_TRY_COMPILE([#include <sys/socket.h>
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/socket.h>
socklen_t x;
],[],[AC_MSG_RESULT(yes)],[
AC_TRY_COMPILE([#include <sys/socket.h>
@@ -652,26 +653,36 @@ if test "x$with_krb5" != "xno"; then
mitlibs="-lkrb5 -lk5crypto -lcom_err -lgssapi_krb5"
heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken -lgssapi"
+ openbsdkerblibs="-lkrb5 -lcrypto -lasn1 -lcom_err -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",
+ [
+ LDFLAGS="$LDFLAGS_save -L$with_krb5/lib $openbsdkerblibs"
+ AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$openbsdkerblibs", ac_cv_lib_kerberos5=no)
+ ])
])
LDFLAGS="$LDFLAGS_save"
])
if test "$ac_cv_lib_kerberos5" != "no"; then
AC_DEFINE(HAVE_KRB5)
- if test "$ac_cv_lib_kerberos5" == "$mitlibs"; then
- KRB5_CFLAGS="-I$with_krb5/include"
- msg_krb5="yes (MIT)"
- AC_DEFINE(HAVE_MIT_KRB5)
+ if test "$ac_cv_lib_kerberos5" == "$openbsdkerblibs"; then
+ KRB5_CFLAGS="-I$with_krb5/include/kerberosV"
+ msg_krb5="yes (OpenBSD)"
else
- KRB5_CFLAGS="-I$with_krb5/include/heimdal"
- msg_krb5="yes (Heimdal)"
- AC_DEFINE(HAVE_HEIMDAL_KRB5)
+ if test "$ac_cv_lib_kerberos5" == "$mitlibs"; then
+ KRB5_CFLAGS="-I$with_krb5/include"
+ msg_krb5="yes (MIT)"
+ AC_DEFINE(HAVE_MIT_KRB5)
+ else
+ KRB5_CFLAGS="-I$with_krb5/include/heimdal"
+ msg_krb5="yes (Heimdal)"
+ AC_DEFINE(HAVE_HEIMDAL_KRB5)
+ fi
fi
KRB5_LDFLAGS="-L$with_krb5/lib $ac_cv_lib_kerberos5"
fi