dnl What method of locking to use?
undefine([locking])dnl
AC_ARG_WITH(locking,
-[ --with-locking=LOCKTYPE specify the file locking method])
+[ --with-locking=LOCKTYPE specify the file locking method
+ (one of dot, fcntl, flock, lockf)])
if test x"$with_locking" = x"dot"; then
LOCKTYPE="dot"
HESIOD_INCLUDES="-I$with_hesiod/include"
HESIOD_LIBS="-L$with_hesiod/lib"
fi
- AC_CHECK_FUNC(res_send, ,
- AC_CHECK_LIB(resolv, res_send))
- AC_CHECK_LIB(hesiod, hes_resolve, [HESIOD_LIBS="$HESIOD_LIBS -lhesiod"],
- [AC_MSG_ERROR(Hesiod library not found)], $HESIOD_LIBS)
+ AC_CHECK_FUNC(res_send,
+ [AC_CHECK_LIB(hesiod, hes_resolve,
+ [HESIOD_LIBS="$HESIOD_LIBS -lhesiod"],
+ [AC_MSG_ERROR(Hesiod library not found)],
+ $HESIOD_LIBS)],
+ [AC_CHECK_LIB(hesiod, hes_resolve,
+ [HESIOD_LIBS="$HESIOD_LIBS -lhesiod -lresolv"],
+ [AC_MSG_ERROR(Hesiod library not found)],
+ $HESIOD_LIBS -lresolv)])
+
fi
AC_SUBST(HESIOD_INCLUDES)dnl
AC_SUBST(HESIOD_LIBS)dnl
elif test -d /usr/include/kerberosIV; then
KRB4_INCLUDES="-I/usr/include/kerberosIV"
fi
- AC_CHECK_LIB(krb4, krb_rd_req,
- [KRB4_LIBS="$KRB4_LIBS -lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err"],
- [AC_CHECK_LIB(krb, krb_rd_req,
- [KRB4_LIBS="$KRB4_LIBS -lkrb -ldes"],
- [AC_MSG_ERROR(Kerberos 4 libraries not found)],
- $KRB4_LIBS -ldes)],
- $KRB4_LIBS -ldes425 -lkrb5 -lcrypto -lcom_err)
+dnl First, check if we have -lk5crypto, since that means we have a recent krb5
+
+ AC_CHECK_LIB(k5crypto, krb5_encrypt,
+ [AC_CHECK_LIB(krb4, krb_rd_req,
+ [KRB4_LIBS="$KRB4_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
+ [AC_MSG_ERROR(Kerberos 4 compatibility libraries not found)],
+ $KRB4_LIBS -ldes425 -lkrb5 -lk5crypto -lcom_err)],
+
+ [AC_CHECK_LIB(krb4, krb_rd_req,
+ [KRB4_LIBS="$KRB4_LIBS -lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err"],
+ [AC_CHECK_LIB(krb, krb_rd_req,
+ [KRB4_LIBS="$KRB4_LIBS -lkrb -ldes"],
+ [AC_MSG_ERROR(Kerberos 4 libraries not found)],
+ $KRB4_LIBS -ldes)],
+ $KRB4_LIBS -ldes425 -lkrb5 -lcrypto -lcom_err)],
+ $KRB4_LIBS)
+
fi
AC_SUBST(KRB4_INCLUDES)dnl
AC_SUBST(KRB4_LIBS)dnl