dcc325a95e9e38c44ff5767163a72c3613908228
[freeradius.git] / src / modules / rlm_x99_token / configure.in
1 AC_INIT(x99_rlm.c)
2 AC_REVISION($Revision$)
3 AC_DEFUN(modname,[rlm_x99_token])
4
5 if test x$with_[]modname != xno; then
6
7         dnl put configuration checks here.  
8         dnl set $fail to what's missing, on fatal errors.
9         dnl use AC_MSG_WARN() on important messages.
10
11         AC_CHECK_LIB(crypto, des_cbc_encrypt,
12                 [ x99_token_ldflags="$x99_token_ldflags -lcrypto" ],
13                 [ fail="$fail des_cbc_encrypt" ]
14         )
15         dnl test for almost-c99 compliant compiler
16         AC_CHECK_HEADER(inttypes.h, ,
17                 [ fail="$fail inttypes.h" ]
18         )
19
20         targetname=modname     # keep this!  Don't change!
21 else
22         targetname=            # keep this!  Don't change!
23         echo \*\*\* module modname is disabled.  # keep this!  Don't change!
24 fi
25
26 dnl  Don't change this section.
27 if test x"$fail" != x""; then
28         if test x"${enable_strict_dependencies}" = x"yes"; then
29                 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
30         else
31                 AC_MSG_WARN([silently not building ]modname[.])
32                 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]); 
33                 targetname=""
34         fi
35 fi
36
37 x99_token_cflags="$x99_token_cflags -DX99_MODULE_NAME=\\\"modname\\\""
38 x99_token_cflags="$x99_token_cflags -DFREERADIUS"
39 AC_SUBST(x99_token_cflags)
40 AC_SUBST(x99_token_ldflags)
41
42 dnl AC_CONFIG_HEADER(config.h)
43
44 AC_SUBST(targetname)  # keep this!  Don't change!
45 AC_OUTPUT(Makefile)  # keep this!  Don't change!