4 dnl Check if the dog is alive
7 AC_DEFUN([AC_CHECK_KERBEROS2],[
10 [ --with-krb4=dir use kerberos 4 in dir],
14 [ --with-krb4-lib=dir use kerberos 4 libraries in dir],
15 [if test "$withval" = "yes" -o "$withval" = "no"; then
16 AC_MSG_ERROR([No argument for --with-krb4-lib])
19 AC_ARG_WITH(krb4-include,
20 [ --with-krb4-include=dir use kerberos 4 headers in dir],
21 [if test "$withval" = "yes" -o "$withval" = "no"; then
22 AC_MSG_ERROR([No argument for --with-krb4-include])
27 dnl Check for kerberos4
30 if test X"$with_krb4" != "Xno" -a X"$with_krb4" != "Xyes" ; then
31 if test X"$with_krb4_lib" = "X"; then
32 with_krb4_lib="$with_krb4/lib"
34 if test X"$with_krb4_include" = "X"; then
35 with_krb4_include="$with_krb4/include"
39 AC_MSG_CHECKING(probing for kerberos 4)
40 AC_CACHE_VAL(ac_cv_found_krb4,[
41 if test "X$with_krb4" = "Xyes"; then
42 for krblibs in "" /usr/heimdal /usr/athena /usr/kerberos /usr/local; do
43 AC_CHECK_KRB4_2($krblibs, $with_krb4_lib, $with_krb4_include)
45 elif test "X$with_krb4" != "Xno" -a "X$with_krb4" != "Xyes"; then
46 AC_CHECK_KRB4_2($with_krb4, $with_krb4_lib, $with_krb4_include)
49 if test $ac_cv_found_krb4 != no; then
52 KRB4_INC_DIR=$ac_cv_krb4_where_inc
53 KRB4_LIB_DIR=$ac_cv_krb4_where_lib
55 if test "X$KRB4_INC_DIR" != "X" ; then
56 KRB4_INC_FLAGS="-I${KRB4_INC_DIR}"
58 KRB4_LIB_LIBS="$ac_cv_krb4_extralib"
59 if test "X$KRB4_LIB_DIR" != "X" ; then
60 KRB4_LIB_DIR="-L${KRB4_LIB_DIR}"
62 KRB4_LIB_FLAGS="$KRB4_LIB_DIR $KRB4_LIB_LIBS"
68 AC_SUBST(KRB4_LIB_DIR)
69 AC_SUBST(KRB4_INC_DIR)
70 AC_SUBST(KRB4_INC_FLAGS)
71 AC_SUBST(KRB4_LIB_LIBS)
72 AC_SUBST(KRB4_LIB_FLAGS)
78 AC_DEFUN([AC_CHECK_KRB4_2],[
79 AC_MSG_RESULT(started)
85 AC_MSG_CHECKING(for Kerberos 4 libs in $klib)
86 AC_KRB4_LIB_WHERE1($klib)
88 if test "$ac_cv_found_krb4_lib" != "no" ; then
90 AC_MSG_RESULT([found, looking for include files])
92 if test X$3 != "X"; then
93 AC_MSG_CHECKING(for Kerberos 4 headers in $3)
94 AC_KRB4_INC_WHERE1($3)
95 if test "$ac_cv_found_krb4_inc" = "yes"; then
98 AC_MSG_RESULT(not found)
101 for j in "" kerberos "kerberosIV"; do
102 if test -n "$1"; then
103 if test -n "$j"; then
109 if test -n "$j"; then
113 AC_MSG_CHECKING(for Kerberos 4 headers in $d)
114 AC_KRB4_INC_WHERE1($d)
115 if test "$ac_cv_found_krb4_inc" = "yes"; then
119 AC_MSG_RESULT(not found)
124 if test "$ac_cv_found_krb4_inc" = "yes"; then
125 ac_cv_krb4_where_inc=$d
128 AC_DEFINE(KERBEROS, 1, [define if you have kerberos])
129 AC_DEFINE(HAVE_KRB4, 1, [define if you have kerberos 4])
133 ac_cv_found_krb4_lib=no
135 AC_MSG_CHECKING(will use Kerberos 4)