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