AC_INIT(rlm_eap_tnc.c)
AC_REVISION($Revision$)
AC_DEFUN(modname,[rlm_eap_tnc])

if test x$with_[]modname != xno; then

	AC_CHECK_LIB(TNCS, exchangeTNCCSMessages)
	if test "x$ac_cv_lib_tncs_exchangetnccsmessages" != xyes; then
		AC_MSG_WARN([the TNCS library isn't found!])
		fail="$fail -lTNCS"
	fi

	targetname=modname
else
	targetname=
	echo \*\*\* module modname is disabled.
fi

dnl  Don't change this section.
if test x"$fail" != x""; then
	if test x"${enable_strict_dependencies}" = x"yes"; then
		AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
	else
		AC_MSG_WARN([silently not building ]modname[.])
		AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]); 
		targetname=""
	fi
fi

AC_SUBST(eap_tnc_cflags)
AC_SUBST(eap_tnc_ldflags)

AC_SUBST(targetname)
AC_OUTPUT(Makefile)
