rlm_eap: add eap_chbind.c to build
[freeradius.git] / src / modules / rlm_pam / configure.in
1 AC_PREREQ([2.53])
2 AC_INIT(rlm_pam.c)
3 AC_REVISION($Revision$)
4 AC_DEFUN(modname,[rlm_pam])
5
6 if test x$with_[]modname != xno; then
7
8         AC_PROG_CC
9         AC_PROG_CPP
10
11         AC_CHECK_LIB(dl, dlopen,
12                 [ pam_ldflags="-ldl" ]
13         )
14
15         AC_CHECK_LIB(pam, pam_start,
16                 [ pam_ldflags="-lpam $pam_ldflags" ],
17                 [ fail=$fail" libpam" ],
18                 [ $pam_ldflags ]
19         )
20
21 dnl #
22 dnl #   Yes, these DO have to be on seperate lines,
23 dnl #   otherwise autoheader won't pick them up.
24 dnl #
25         AC_CHECK_HEADERS( \
26                         security/pam_appl.h \
27                         pam/pam_appl.h \
28                         )
29         pam_cflags="-I."
30
31         targetname=modname
32 else
33         targetname=
34         echo \*\*\* module modname is disabled.
35 fi
36
37 if test x"$fail" != x""; then
38         if test x"${enable_strict_dependencies}" = x"yes"; then
39                 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
40         else
41                 AC_MSG_WARN([silently not building ]modname[.])
42                 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
43                 targetname=""
44         fi
45 fi
46
47 AC_SUBST(pam_ldflags)
48 AC_SUBST(pam_cflags)
49 AC_SUBST(targetname)
50 AC_CONFIG_HEADER(config.h)
51 AC_OUTPUT(Makefile)