blob: e5095eb2438da88bc052b5b6bd0575c1e40676ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
AC_PREREQ([2.68])
AC_INIT(rlm_eap_tnc.c)
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_eap_tnc])
if test x$with_[]modname != xno; then
dnl extra argument: --with-eap-tnc-include-dir=DIR
eap_tnc_include_dir=
AC_ARG_WITH(eap-tnc-include-dir,
[AS_HELP_STRING([--with-eap-tnc-include-dir=DIR],
[Directory where the libtnc includes may be found])],
[case "$withval" in
no)
AC_MSG_ERROR(Need eap-tnc-include-dir)
;;
yes)
;;
*)
eap_tnc_include_dir="$withval"
;;
esac])
dnl extra argument: --with-eap-tnc-lib-dir=DIR
eap_tnc_lib_dir=
AC_ARG_WITH(eap-tnc-lib-dir,
[AS_HELP_STRING([--with-eap-tnc-lib-dir=DIR],
[Directory where the libtnc libraries may be found])],
[case "$withval" in
no)
AC_MSG_ERROR(Need eap-tnc-lib-dir)
;;
yes)
;;
*)
eap_tnc_lib_dir="$withval"
;;
esac])
dnl extra argument: --with-eap-tnc-dir=DIR
AC_ARG_WITH(eap-tnc-dir,
[AS_HELP_STRING([--with-eap-tnc-dir=DIR],
[Base directory where libtnc is installed])],
[case "$withval" in
no)
AC_MSG_ERROR(Need eap-tnc-dir)
;;
yes)
;;
*)
eap_tnc_lib_dir="$withval/lib"
eap_tnc_include_dir="$withval/include"
;;
esac])
dnl ############################################################
dnl # Check for eap-tnc includes
dnl ############################################################
smart_try_dir="$eap_tnc_include_dir"
FR_SMART_CHECK_INCLUDE([naaeap/naaeap.h])
if test "x$ac_cv_header_naaeap_naaeap_h" != "xyes"; then
fail="$fail naaeap.h"
fi
dnl ############################################################
dnl # Check for eap-tnc library
dnl ############################################################
smart_try_dir="$eap_tnc_lib_dir"
FR_SMART_CHECK_LIB([naaeap],[processEAPTNCData])
if test "x$ac_cv_lib_naaeap_processEAPTNCData" != "xyes"; then
fail="$fail libnaaeap"
fi
targetname=modname # keep this! Don't change!
else
targetname= # keep this! Don't change!
echo \*\*\* module modname is disabled. # keep this! Don't change!
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.]);
AC_MSG_WARN([Required libraries are available from https://github.com/trustatfhh/tnc-fhh]);
targetname=""
fi
fi
mod_ldflags="$SMART_LIBS"
mod_cflags="$SMART_CPPFLAGS"
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
AC_SUBST(targetname) # keep this! Don't change!
AC_OUTPUT(all.mk) # keep this! Don't change!
|