diff options
author | Linus Nordberg <linus@nordberg.se> | 2013-11-15 15:20:18 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2013-11-15 15:20:18 +0100 |
commit | f5081dc4aae5e2cb953e8b61fe86ae506974ed7a (patch) | |
tree | d89deaa5593e64f264241ca3449990dfb058e476 /lib/configure.ac | |
parent | 90f9a7e8fcc3ded9d307d85357a0d68328062cd4 (diff) |
Make sure that configure without --enable-tls works.
Also, --disable-tls, --enable-tls and --enable-tls=no.
Closes LIBRADSEC-2.
Diffstat (limited to 'lib/configure.ac')
-rw-r--r-- | lib/configure.ac | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/lib/configure.ac b/lib/configure.ac index f8aabde..b99e8e9 100644 --- a/lib/configure.ac +++ b/lib/configure.ac @@ -19,18 +19,21 @@ AC_CHECK_LIB([event_core], [event_get_version],, AC_MSG_ERROR([required library libevent_core not found])) # Enable-knobs. -## Enable TLS (RadSec). +## Enable TLS (RadSec), default on. +want_tls=yes AH_TEMPLATE([RS_ENABLE_TLS], [TLS (RadSec) enabled]) -AH_TEMPLATE([RADPROT_TLS], []) dnl Legacy. -AC_ARG_ENABLE([tls], AS_HELP_STRING([--disable-tls], [disable TLS (RadSec)]), - [], - [AC_CHECK_LIB([event_openssl], [bufferevent_openssl_socket_new],, - AC_MSG_ERROR([required library event_openssl not found])) - AC_DEFINE([RS_ENABLE_TLS]) - AC_DEFINE([RADPROT_TLS])]) dnl Legacy. -AM_CONDITIONAL([RS_ENABLE_TLS], [test "${enable_tls+set}" = set]) -### Define WITHOUT_OPENSSL for radius/client.h. -if test -z "$enable_tls"; then +AH_TEMPLATE([RADPROT_TLS], []) +AC_ARG_ENABLE([tls], + AS_HELP_STRING([--disable-tls], [disable TLS (RadSec)]), + [want_tls=$enableval]) +AM_CONDITIONAL([RS_ENABLE_TLS], [test $want_tls = yes]) +if test $want_tls = yes; then + AC_CHECK_LIB([event_openssl], [bufferevent_openssl_socket_new],, + AC_MSG_ERROR([required library event_openssl not found])) + AC_DEFINE([RS_ENABLE_TLS]) + AC_DEFINE([RADPROT_TLS]) +else + # Define WITHOUT_OPENSSL for radius/client.h. CPPFLAGS="$CPPFLAGS -DWITHOUT_OPENSSL" fi ## Enable TLS-PSK (preshared keys). |