summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMichael Steinert <mike.steinert@gmail.com>2012-05-24 17:41:36 -0600
committerMichael Steinert <mike.steinert@gmail.com>2012-05-27 10:39:57 -0600
commit5b2585dc118f3db07a70575da47503e24986f8e9 (patch)
tree4d68627311e1aa0b23e1e257d3e4ba52dc3623a1 /configure.ac
parentec9f03ce615713acfa1f2fb4a6da42a8c972e6e6 (diff)
downloadrabbitmq-c-github-ask-5b2585dc118f3db07a70575da47503e24986f8e9.tar.gz
Implement SSL/TLS over CyaSSL, GnuTLS, OpenSSL & PolarSSL backends
Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 211858e..348fa09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,7 @@ m4_ifdef([AC_PROG_CC_C99], [AC_PROG_CC_C99],
[AC_MSG_WARN([Attempt c99 workaround for old versions of autoconf])
AC_PROG_CC
AX_TRY_CFLAGS([-std=c99], [AX_CFLAGS([-std=c99])])])
+PKG_PROG_PKG_CONFIG([0.17])
# Environment setup
AC_CANONICAL_HOST
@@ -107,6 +108,35 @@ AS_IF([test "x$ac_cv_path_PYTHON" = "x"],
AC_MSG_WARN([unable to rebuild AMQP framing])])
AC_SUBST([PYTHON], [$ac_cv_path_PYTHON])
+# Configure SSL/TLS
+AC_ARG_WITH([ssl],
+ [AS_HELP_STRING([--with-ssl=@<:@cyassl/gnutls/no/openssl/polarssl/yes@:>@],
+ [enable SSL/TLS support @<:@default=openssl@:>@])],
+ [AS_CASE([$withval],
+ [yes], [with_ssl=openssl],
+ [*], [with_ssl=$withval])],
+ [with_ssl=openssl])
+
+AS_IF([test "x$with_ssl" = "xcyassl"],
+ [PKG_CHECK_MODULES([SSL], [libcyassl],, [with_ssl=no])],
+ [test "x$with_ssl" = "xgnutls"],
+ [PKG_CHECK_MODULES([SSL], [gnutls],, [with_ssl=no])],
+ [test "x$with_ssl" = "xopenssl"],
+ [PKG_CHECK_MODULES([SSL], [openssl >= 1.0.1a],, [with_ssl=no])],
+ [test "x$with_ssl" = "xpolarssl"],
+ [AX_LIB_POLARSSL([SSL_CFLAGS=$POLARSSL_CFLAGS
+ SSL_LIBS=$POLARSSL_LIBS],
+ [with_ssl=no])],
+ [test "x$with_ssl" = "xno"],,
+ [AC_MSG_ERROR([unknown SSL/TLS implementation: $with_ssl])])
+AM_CONDITIONAL([SSL_CYASSL], [test "x$with_ssl" = "xcyassl"])
+AM_CONDITIONAL([SSL_GNUTLS], [test "x$with_ssl" = "xgnutls"])
+AM_CONDITIONAL([SSL_OPENSSL], [test "x$with_ssl" = "xopenssl"])
+AM_CONDITIONAL([SSL_POLARSSL], [test "x$with_ssl" = "xpolarssl"])
+AM_CONDITIONAL([SSL], [test "x$with_ssl" != "xno"])
+AS_IF([test "x$with_ssl" != "xno"],
+ [AC_DEFINE([WITH_SSL], [1], [Define to 1 if SSL/TLS is enabled.])])
+
# Configure AMQP command-line tools
AC_ARG_ENABLE([tools],
[AS_HELP_STRING([--enable-tools],
@@ -143,6 +173,7 @@ $PACKAGE_NAME build options:
Host: $host
Version: $VERSION
64-bit: $enable_64_bit
+ SSL/TLS: $with_ssl
Tools: $enable_tools
Documentation: $enable_docs
])