]> granicus.if.org Git - sudo/commitdiff
use krb5-config to determine Kerberos V details if it exists
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 2 Apr 2003 18:44:52 +0000 (18:44 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 2 Apr 2003 18:44:52 +0000 (18:44 +0000)
configure.in

index d131cd3413aab4c218f8d833dc5c8782aa1f60a0..de2b20454c106a7b62b7df8c4a79e403a7416055 100644 (file)
@@ -1770,8 +1770,18 @@ fi
 
 dnl
 dnl Kerberos V
-dnl
-if test -n "$with_kerb5"; then
+dnl There is an easy way and a hard way...
+dnl
+if test "$with_kerb5" = "yes"; then
+    AC_CHECK_PROG(KRB5CONFIG, krb5-config, yes, "")
+    if test -n "$KRB5CONFIG"; then
+       AC_DEFINE(HAVE_KERB5, 1, [Define if you use Kerberos V.])
+       AUTH_OBJS="${AUTH_OBJS} kerb5.o"
+       CPPFLAGS="$CPPFLAGS `krb5-config --cflags`"
+       SUDO_LIBS="$SUDO_LIBS `krb5-config --libs`"
+    fi
+fi
+if test -n "$with_kerb5" -a -z "$KRB5CONFIG"; then
     AC_DEFINE(HAVE_KERB5, 1, [Define if you use Kerberos V.])
     dnl
     dnl Use the specified directory, if any, else search for correct inc dir