summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2019-01-23 15:07:10 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2019-01-23 15:07:10 -0600
commit0bdff5e8868e5cab3d9f1170cc789a0a1dcf97d3 (patch)
tree9d71926c8b247c910c7e0cc4da3c74a9be4c5d4a
parent02c48abf9334a783ffcf2009d6042a1036c8a8ed (diff)
downloadulab-0bdff5e8868e5cab3d9f1170cc789a0a1dcf97d3.tar.gz
ulab-0bdff5e8868e5cab3d9f1170cc789a0a1dcf97d3.zip
Find Heimdal kerberos in multidev packages on Debian and Ubuntu
-rw-r--r--clients/tde/configure.in.in44
1 files changed, 43 insertions, 1 deletions
diff --git a/clients/tde/configure.in.in b/clients/tde/configure.in.in
index 7a8a6da..b004c73 100644
--- a/clients/tde/configure.in.in
+++ b/clients/tde/configure.in.in
@@ -36,4 +36,46 @@ if test x$PKGCONFIGFOUND = xyes; then
fi
AC_SUBST(LIB_FFTS)
-AM_CONDITIONAL(with_included_ffts, [test x$included_ffts = xyes]) \ No newline at end of file
+AM_CONDITIONAL(with_included_ffts, [test x$included_ffts = xyes])
+
+#------------------------------------------------------------------
+#
+# Check for heimdal kerberos
+#
+#------------------------------------------------------------------
+PKG_CHECK_MODULES(KRB5, krb5, have_krb5=yes, have_krb5=no)
+if test "x$have_krb5" = "xno"; then
+ # Try to find krb5 without pkg-config file (required for older distros)
+ AC_MSG_CHECKING(krb5)
+ AC_FIND_FILE(krb5.h, [\
+ /usr/local/include/heimdal /usr/local/include \
+ /usr/include/heimdal /usr/include \
+ ], krb5_includes)
+ if test "x$krb5_includes" != "xNO"; then
+ krb5_multiarch="`gcc -print-multiarch 2>/dev/null`"
+ AC_FIND_FILE(libkrb5.so, [\
+ /usr/local/lib/$krb5_multiarch/heimdal /usr/local/lib64/heimdal /usr/local/lib/heimdal \
+ /usr/local/lib/$krb5_multiarch /usr/local/lib64 /usr/local/lib \
+ /usr/lib/$krb5_multiarch/heimdal /usr/lib64/heimdal /usr/lib/heimdal \
+ /usr/lib/$krb5_multiarch /usr/lib64 /usr/lib \
+ ], krb5_libs)
+ if test "x$krb5_libs" != "xNO"; then
+ AC_MSG_RESULT([libraries $krb5_libs, headers $krb5_includes])
+ CPPFLAGS="$CPPFLAGS -I$krb5_includes"
+ CFLAGS="$CFLAGS -I$krb5_includes"
+ LDFLAGS="$LDFLAGS -L$krb5_libs"
+ AC_CHECK_HEADER(krb5.h, have_krb5=yes)
+ fi
+ fi
+ if test "x$have_krb5" != "xno"; then
+ KRB5_CFLAGS="-I$krb5_includes"
+ KRB5_LIBS="-L$krb5_libs -lkrb5"
+ AC_SUBST(KRB5_CFLAGS)
+ AC_SUBST(KRB5_LIBS)
+ else
+ AC_MSG_RESULT(no)
+ fi
+fi
+if test "x$have_krb5" = "xno"; then
+ AC_MSG_ERROR([krb5 library is needed but not found on our system])
+fi