Skip to content

Commit

Permalink
Make sure that configure without --enable-tls works.
Browse files Browse the repository at this point in the history
Also, --disable-tls, --enable-tls and --enable-tls=no.
Closes LIBRADSEC-2.
  • Loading branch information
Linus Nordberg committed Nov 15, 2013
1 parent 90f9a7e commit f5081dc
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions lib/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit f5081dc

Please sign in to comment.