3 AC_REVISION($Revision$)
4 AC_DEFUN(modname,[rlm_krb5])
6 if test x$with_[]modname != xno; then
11 dnl extra argument: --with-rlm-krb5-lib-dir
13 AC_ARG_WITH(rlm-krb5-lib-dir,
14 [ --with-rlm-krb5-lib-dir=DIR Directory for krb5 library files []],
17 AC_MSG_ERROR(Need rlm-krb5-lib-dir)
22 rlm_krb5_lib_dir="$withval"
27 dnl extra argument: --with-rlm-krb5-include-dir
29 AC_ARG_WITH(rlm-krb5-include-dir,
30 [ --with-rlm-krb5-include-dir=DIR Directory for krb5 include files []],
33 AC_MSG_ERROR(Need rlm-krb5-include-dir)
38 rlm_krb5_include_dir="$withval"
43 dnl extra argument: --enable-heimdal-krb5
44 AC_ARG_ENABLE(heimdal-krb5,
45 [ --enable-heimdal-krb5 Enable if you have heimdal krb5],
46 [ case "$enableval" in
48 krb5_h_cflags="-DHEIMDAL_KRB5"
53 smart_try_dir=$rlm_krb5_include_dir
54 FR_SMART_CHECK_INCLUDE(krb5.h)
56 smart_try_dir=$rlm_krb5_lib_dir
58 FR_SMART_CHECK_LIB(k5crypto, krb5_encrypt_data)
59 if test "x$ac_cv_lib_k5crypto_krb5_encrypt_data" = "xyes"; then
60 krb5libcrypto="-lk5crypto"
63 FR_SMART_CHECK_LIB(crypto, DH_new)
64 if test "x$ac_cv_lib_crypto_DH_new" = "xyes"; then
65 krb5libcrypto="-lcrypto"
68 if test x$krb5libcrypto = x; then
69 AC_MSG_WARN([neither krb5 'k5crypto' nor 'crypto' libraries are found!])
72 FR_SMART_CHECK_LIB(com_err, set_com_err_hook)
73 if test "x$ac_cv_lib_com_err_set_com_err_hook" != "xyes"; then
74 AC_MSG_WARN([the comm_err library isn't found!])
77 FR_SMART_CHECK_LIB(krb5, krb5_init_context)
78 if test "x$ac_cv_lib_krb5_krb5_init_context" != "xyes"; then
85 echo \*\*\* module modname is disabled.
88 if test x"$fail" != x""; then
89 if test x"${enable_strict_dependencies}" = x"yes"; then
90 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
92 AC_MSG_WARN([silently not building ]modname[.])
93 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
98 krb5_ldflags=$SMART_LIBS
99 krb5_cflags="${krb5_h_cflags} $SMART_CFLAGS"
101 AC_SUBST(krb5_cflags)
102 AC_SUBST(krb5_ldflags)