summaryrefslogtreecommitdiffstats
path: root/src/external/pac_responder.m4
blob: 49d5cbb6d38c55cfc3740ad9243c227907ebb7b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
AC_SUBST(NDR_KRB5PAC_CFLAGS)
AC_SUBST(NDR_KRB5PAC_LIBS)

AC_ARG_ENABLE([pac-responder],
              [AS_HELP_STRING([--enable-pac-responder],
                              [build pac responder])],
              [build_pac_responder=$enableval],
              [build_pac_responder=yes])

ndr_krb5pac_ok=no
krb5_version_ok=no
if test x$build_pac_responder == xyes
then
    PKG_CHECK_MODULES(NDR_KRB5PAC, ndr_krb5pac, ndr_krb5pac_ok=yes,
        AC_MSG_WARN([Cannot build pac responder without libndr_krb5pac]))

    AC_PATH_PROG(KRB5_CONFIG, krb5-config)
    AC_MSG_CHECKING(for supported MIT krb5 version)
    KRB5_VERSION="`$KRB5_CONFIG --version`"
    case $KRB5_VERSION in
        Kerberos\ 5\ release\ 1.9* | \
        Kerberos\ 5\ release\ 1.10* | \
        Kerberos\ 5\ release\ 1.11*)
            krb5_version_ok=yes
            AC_MSG_RESULT([yes])
            ;;
        *)
            AC_MSG_RESULT([no])
            AC_MSG_WARN([Cannot build authdata plugin with this version of
                         MIT Kerberos, please use 1.9.x or later])
    esac
fi

AM_CONDITIONAL([BUILD_PAC_RESPONDER], [test x$build_pac_responder = xyes -a x$ndr_krb5pac_ok = xyes -a x$krb5_version_ok = xyes ])
AM_COND_IF([BUILD_PAC_RESPONDER],
           [AC_DEFINE_UNQUOTED(HAVE_PAC_RESPONDER, 1, [Build with the PAC responder])])