3 AC_REVISION($Revision$)
4 AC_DEFUN(modname,[rlm_otp])
7 if test x$with_[]modname != xno; then
9 dnl put configuration checks here.
10 dnl set $fail to what's missing, on fatal errors.
11 dnl use AC_MSG_WARN() on important messages.
13 dnl test for almost-c99 compliant compiler
14 AC_CHECK_HEADER(inttypes.h, ,
15 [ fail="$fail inttypes.h" ]
18 dnl mostly for openssl
19 AC_ARG_WITH(rlm-otp-lib-dir,
20 [ --with-rlm-otp-lib-dir directory for otp libs],
21 otp_ldflags="$otp_ldflags -L$withval")
22 AC_ARG_WITH(rlm-otp-include-dir,
23 [ --with-rlm-otp-include-dir directory for otp includes],
24 otp_cflags="$otp_cflags -I$withval")
27 dnl # extra argument: --openssl-includes=dir
29 AC_ARG_WITH(openssl-includes,
30 [ --with-openssl-includes=DIR Directory to look for OpenSSL include files],
33 SMART_CFLAGS="$SMART_CFLAGS -I$withval"
38 targetname=modname # keep this! Don't change!
40 targetname= # keep this! Don't change!
41 echo \*\*\* module modname is disabled. # keep this! Don't change!
44 dnl Don't change this section.
45 if test x"$fail" != x""; then
46 if test x"${enable_strict_dependencies}" = x"yes"; then
47 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
49 AC_MSG_WARN([silently not building ]modname[.])
50 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
55 otp_cflags="$otp_cflags -DOTP_MODULE_NAME=\\\"modname\\\" $SMART_CFLAGS"
56 otp_cflags="$otp_cflags -DFREERADIUS"
60 AC_SUBST(targetname) # keep this! Don't change!
61 AC_OUTPUT(Makefile) # keep this! Don't change!