1 AC_INIT(rlm_eap_ikev2.c)
2 AC_REVISION($Revision$)
3 AC_DEFUN(modname,[rlm_eap_ikev2])
5 if test x$with_[]modname != xno; then
6 dnl extra argument: --with-eap-ikev2-include-dir=DIR
8 AC_ARG_WITH(eap-ikev2-include-dir,
9 [AS_HELP_STRING([--with-eap-ikev2-include-dir=DIR],
10 [Directory where the json-c includes may be found])],
13 AC_MSG_ERROR(Need eap-ikev2-include-dir)
18 eap_ikev2_include_dir="$withval"
22 dnl extra argument: --with-eap-ikev2-lib-dir=DIR
24 AC_ARG_WITH(eap-ikev2-lib-dir,
25 [AS_HELP_STRING([--with-eap-ikev2-lib-dir=DIR],
26 [Directory where the eap-ikev2 libraries may be found])],
29 AC_MSG_ERROR(Need eap-ikev2-lib-dir)
34 eap_ikev2_lib_dir="$withval"
38 dnl extra argument: --with-eap-ikev2-dir=DIR
39 AC_ARG_WITH(eap-ikev2-dir,
40 [AS_HELP_STRING([--with-eap-ikev2-dir=DIR],
41 [Base directory where eap-ikev2 is installed])],
44 AC_MSG_ERROR(Need eap-ikev2-dir)
49 eap_ikev2_lib_dir="$withval/lib"
50 eap_ikev2_include_dir="$withval/include"
54 dnl ############################################################
55 dnl # Check for eap-ikev2 includes
56 dnl ############################################################
57 smart_try_dir="$eap_ikev2_include_dir"
58 FR_SMART_CHECK_INCLUDE([EAPIKEv2/connector.h])
59 if test "x$ac_cv_header_EAPIKEv2_connector_h" != "xyes"; then
60 fail="$fail EAPIKEv2/connector.h"
63 dnl ############################################################
64 dnl # Check for eap-ikev2 library
65 dnl ############################################################
67 LIBS="${OPENSSL_LIBS}"
68 smart_try_dir="$eap_ikev2_lib_dir"
69 FR_SMART_CHECK_LIB([eap-ikev2],[ikev2_set_log_callback])
70 if test "x$ac_cv_lib_eap_ikev2_ikev2_set_log_callback" != "xyes"; then
71 fail="$fail libeap-ikev2"
74 targetname=modname # keep this! Don't change!
76 targetname= # keep this! Don't change!
77 echo \*\*\* module modname is disabled. # keep this! Don't change!
80 dnl Don't change this section.
81 if test x"$fail" != x""; then
82 if test x"${enable_strict_dependencies}" = x"yes"; then
83 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
85 AC_MSG_WARN([silently not building ]modname[.])
86 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
91 eap_ikev2_cflags="${SMART_CFLAGS}"
92 eap_ikev2_ldflags="${OPENSSL_LIBS} ${SMART_LIBS}"
94 AC_SUBST(eap_ikev2_cflags)
95 AC_SUBST(eap_ikev2_ldflags)
97 dnl AC_CONFIG_HEADER(config.h)
99 AC_SUBST(targetname) # keep this! Don't change!
100 AC_OUTPUT(all.mk) # keep this! Don't change!