diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-12-26 17:40:49 +0100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2021-07-09 07:27:09 +0200 |
commit | 32dd2daa56c294e40ff7efea482c9eac536d8cbb (patch) | |
tree | bc4166508feee9647671830778837555844fa7db /configure.ac | |
parent | Update comments about EGD to include prngd. (diff) | |
download | openssh-32dd2daa56c294e40ff7efea482c9eac536d8cbb.tar.xz openssh-32dd2daa56c294e40ff7efea482c9eac536d8cbb.zip |
Support finding Kerberos via pkg-config
This makes cross compilation easier.
Diffstat (limited to '')
-rw-r--r-- | configure.ac | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 3a14c2a73..a79be8157 100644 --- a/configure.ac +++ b/configure.ac @@ -4580,6 +4580,44 @@ AC_ARG_WITH([kerberos5], AC_DEFINE([KRB5], [1], [Define if you want Kerberos 5 support]) KRB5_MSG="yes" + AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no]) + use_pkgconfig_for_krb5= + if test "x$PKGCONFIG" != "xno"; then + AC_MSG_CHECKING([if $PKGCONFIG knows about kerberos5]) + if "$PKGCONFIG" krb5; then + AC_MSG_RESULT([yes]) + use_pkgconfig_for_krb5=yes + else + AC_MSG_RESULT([no]) + fi + fi + if test "x$use_pkgconfig_for_krb5" = "xyes"; then + K5CFLAGS=`$PKGCONFIG --cflags krb5` + K5LIBS=`$PKGCONFIG --libs krb5` + CPPFLAGS="$CPPFLAGS $K5CFLAGS" + + AC_MSG_CHECKING([for gssapi support]) + if "$PKGCONFIG" krb5-gssapi; then + AC_MSG_RESULT([yes]) + AC_DEFINE([GSSAPI], [1], + [Define this if you want GSSAPI + support in the version 2 protocol]) + GSSCFLAGS="`$PKGCONFIG --cflags krb5-gssapi`" + GSSLIBS="`$PKGCONFIG --libs krb5-gssapi`" + CPPFLAGS="$CPPFLAGS $GSSCFLAGS" + else + AC_MSG_RESULT([no]) + fi + AC_MSG_CHECKING([whether we are using Heimdal]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <krb5.h> + ]], [[ char *tmp = heimdal_version; ]])], + [ AC_MSG_RESULT([yes]) + AC_DEFINE([HEIMDAL], [1], + [Define this if you are using the Heimdal + version of Kerberos V5]) ], + [AC_MSG_RESULT([no]) + ]) + else AC_PATH_TOOL([KRB5CONF], [krb5-config], [$KRB5ROOT/bin/krb5-config], [$KRB5ROOT/bin:$PATH]) @@ -4656,6 +4694,7 @@ AC_ARG_WITH([kerberos5], [ CPPFLAGS="$oldCPP" ]) fi + fi if test -n "${rpath_opt}" ; then LDFLAGS="$LDFLAGS ${rpath_opt}${KRB5ROOT}/lib" fi |