From 573351a2b8f4d890760c06ac03828a31ed19d124 Mon Sep 17 00:00:00 2001 From: kouril Date: Sun, 23 Nov 2003 22:38:38 +0000 Subject: [PATCH] Make configure work also with krb5 installations where the krb5-config command is not available (suppose only Heimdal libraries in this case) --- configure.in | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index 6dea290..be65ceb 100644 --- a/configure.in +++ b/configure.in @@ -44,14 +44,22 @@ AC_ARG_WITH(krb5, if test "x$with_krb5" != "xno" ; then AC_MSG_CHECKING([for Kerberos5 installation]) if test "x$with_krb5" != "x"; then - if test ! -x "$with_krb5/bin/krb5-config"; then - AC_MSG_ERROR([failed to find krb5-config in $with_krb5/bin]) + if test -x "$with_krb5/bin/krb5-config"; then + krb5_config_command="$with_krb5/bin/krb5-config" + else + # quick fix for OpenBSD installations where krb5-config is missing. + # OpenBSD uses Heimdal, so add libs for Heimdal (libcrypto from + # Openssl is supposed to be installed somewhere in the system) + KRB5_CPPFLAGS="-I$with_krb5/include" + KRB5_LDFLAGS="-L$with_krb5/lib -lkrb5 -lasn1 -lroken -lcrypt -lcrypto" + krb5_config_command="" fi - krb5_config_command="$with_krb5/bin/krb5-config" fi - KRB5_CPPFLAGS=`$krb5_config_command --cflags gssapi 2>/dev/null` - KRB5_LDFLAGS=`$krb5_config_command --libs gssapi 2>/dev/null` + if test -n "$krb5_config_command"; then + KRB5_CPPFLAGS=`$krb5_config_command --cflags gssapi 2>/dev/null` + KRB5_LDFLAGS=`$krb5_config_command --libs gssapi 2>/dev/null` + fi if test "x$KRB5_LDFLAGS" = "x"; then with_krb5=no AC_MSG_RESULT(no) -- 2.1.4