a133f8603b9d696bae94d5b6c8177cffd210a84f
[freeradius.git] / src / modules / rlm_mschap / configure.ac
1 AC_INIT(rlm_mschap.c)
2 AC_REVISION($Revision$)
3 AC_DEFUN(modname,[rlm_mschap])
4
5 if test x$with_[]modname != xno; then
6
7         AC_PROG_CC
8         AC_PROG_CPP
9
10         FR_SMART_CHECK_INCLUDE(membership.h)
11         if test "x$ac_cv_header_membership_h" = "xyes"; then
12                 AC_DEFINE([HAVE_MEMBERSHIP_H],[1],[Build with Apple Open Directory support])
13                 mschap_sources+="opendir.c"
14                 mod_ldflags+=" -framework DirectoryService" 
15         fi
16         targetname=modname
17 else
18         targetname=
19         echo \*\*\* module modname is disabled.
20 fi
21
22 if test x"$fail" != x""; then
23         if test x"${enable_strict_dependencies}" = x"yes"; then
24                 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
25         else
26                 AC_MSG_WARN([silently not building ]modname[.])
27                 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]); 
28                 targetname=""
29         fi
30 fi
31
32 AC_SUBST(mschap_sources)
33 AC_SUBST(mod_ldflags)
34 AC_SUBST(mod_cflags)
35 AC_SUBST(targetname)
36
37 AC_CONFIG_HEADER(config.h)
38 AC_OUTPUT(rlm_mschap.mk)
39