2 AC_REVISION($Revision$)
3 AC_DEFUN(modname,[rlm_eap_sim])
8 if test x$with_[]modname != xno; then
13 dnl # extra argument: --openssl-includes=dir
15 AC_ARG_WITH(openssl-includes,
16 [ --with-openssl-includes=DIR Directory to look for OpenSSL include files],
19 rlm_eap_peap_inc_dir="$rlm_eap_peap_inc_dir $withval"
20 SMART_CFLAGS="$SMART_CFLAGS -I$withval"
26 dnl # extra argument: --openssl-libraries=dir
28 AC_ARG_WITH(openssl-libraries,
29 [ --with-openssl-libraries=DIR Directory to look for OpenSSL library files],
32 rlm_eap_peap_lib_dir="$rlm_eap_peap_lib_dir $withval"
33 SMART_LIBS="$SMART_LIBS -L$withval"
38 smart_try_dir=$rlm_eap_peap_inc_dir
39 AC_SMART_CHECK_INCLUDE(openssl/ssl.h)
40 if test "x$ac_cv_header_openssl_ssl_h" != "xyes"; then
41 fail="$fail (openssl/ssl.h)"
44 smart_try_dir=$rlm_eap_peap_lib_dir
45 AC_SMART_CHECK_LIB(crypto, DH_new)
46 if test "x$ac_cv_lib_crypto_DH_new" != "xyes"; then
47 fail="$fail libcrypto"
50 AC_SMART_CHECK_LIB(ssl, SSL_new)
51 if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
63 echo \*\*\* module modname is disabled.
66 if test x"$fail" != x""; then
67 if test x"${enable_strict_dependencies}" = x"yes"; then
68 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
70 AC_MSG_WARN([silently not building ]modname[.])
71 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.])
72 if test x"$headersuggestion" != x; then
73 AC_MSG_WARN([$headersuggestion])
75 if test x"$libsuggestion" != x; then
76 AC_MSG_WARN([$libsuggestion])
82 eap_sim_ldflags=$SMART_LIBS
83 eap_sim_cflags=$SMART_CFLAGS
84 AC_SUBST(eap_sim_ldflags)
85 AC_SUBST(eap_sim_cflags)
87 AC_CONFIG_HEADER([config.h])