2 AC_REVISION($Revision$)
3 AC_DEFUN(modname,[rlm_x99_token])
5 if test x$with_[]modname != xno; then
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.
11 dnl test for almost-c99 compliant compiler
12 AC_CHECK_HEADER(inttypes.h, ,
13 [ fail="$fail inttypes.h" ]
16 dnl mostly for openssl
17 AC_ARG_WITH(rlm-x99-token-lib-dir,
18 AC_HELP_STRING([--with-rlm-x99-token-lib-dir],
19 [directory for x99_token libs]),
20 x99_token_ldflags="$x99_token_ldflags -L$withval")
21 AC_ARG_WITH(rlm-x99-token-include-dir,
22 AC_HELP_STRING([--with-rlm-x99-token-include-dir],
23 [directory for x99_token includes]),
24 x99_token_cflags="$x99_token_cflags -I$withval")
28 LIBS="$LIBS $x99_token_ldflags"
29 AC_CHECK_LIB(crypto, des_cbc_encrypt,
30 [ x99_token_ldflags="$x99_token_ldflags -lcrypto" ],
31 [ fail="$fail des_cbc_encrypt" ]
35 targetname=modname # keep this! Don't change!
37 targetname= # keep this! Don't change!
38 echo \*\*\* module modname is disabled. # keep this! Don't change!
41 dnl Don't change this section.
42 if test x"$fail" != x""; then
43 if test x"${enable_strict_dependencies}" = x"yes"; then
44 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
46 AC_MSG_WARN([silently not building ]modname[.])
47 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
52 x99_token_cflags="$x99_token_cflags -DX99_MODULE_NAME=\\\"modname\\\""
53 x99_token_cflags="$x99_token_cflags -DFREERADIUS"
54 AC_SUBST(x99_token_cflags)
55 AC_SUBST(x99_token_ldflags)
57 dnl AC_CONFIG_HEADER(config.h)
59 AC_SUBST(targetname) # keep this! Don't change!
60 AC_OUTPUT(Makefile) # keep this! Don't change!