2 AC_REVISION($Revision$)
3 AC_DEFUN(modname,[rlm_eap_tls])
8 if test x$with_[]modname != xno; then
10 dnl extra argument: --with-rlm-eap-tls-lib-dir
12 AC_ARG_WITH(rlm-eap-tls-lib-dir,
13 [ --with-rlm-eap-tls-lib-dir=DIR Directory for EAPTLS library files []],
16 AC_MSG_ERROR(Need rlm-eap-tls-lib-dir)
21 rlm_eap_tls_lib_dir="$withval"
26 dnl extra argument: --with-rlm-eap-tls-include-dir
28 AC_ARG_WITH(rlm-eap-tls-include-dir,
29 [ --with-rlm-eap-tls-include-dir=DIR Directory for EAPTLS include files []],
32 AC_MSG_ERROR(Need rlm-eap-tls-include-dir)
37 rlm_eap_tls_inc_dir="$withval"
42 smart_try_dir=$rlm_eap_tls_inc_dir
43 AC_SMART_CHECK_INCLUDE(openssl/ssl.h)
44 if test "x$ac_cv_header_openssl_ssl_h" != "xyes"; then
45 fail="$fail (openssl/ssl.h)"
48 smart_try_dir=$rlm_eap_tls_lib_dir
49 AC_SMART_CHECK_LIB(crypto, DH_new)
50 if test "x$ac_cv_lib_crypto_DH_new" != "xyes"; then
51 fail="$fail libcrypto"
54 AC_SMART_CHECK_LIB(ssl, SSL_new)
55 if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
62 echo \*\*\* module modname is disabled.
65 if test x"$fail" != x""; then
66 if test x"${enable_strict_dependencies}" = x"yes"; then
67 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
69 AC_MSG_WARN([silently not building ]modname[.])
70 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.])
71 if test x"$headersuggestion" != x; then
72 AC_MSG_WARN([$headersuggestion])
74 if test x"$libsuggestion" != x; then
75 AC_MSG_WARN([$libsuggestion])
81 eap_tls_ldflags=$SMART_LIBS
82 eap_tls_cflags=$SMART_CFLAGS
83 AC_SUBST(eap_tls_ldflags)
84 AC_SUBST(eap_tls_cflags)