Update README, Changelog and codename.
[umurmur.git] / configure.ac
index b4d65fe0c20df376969624a642731fb1a8c1b603..bd5f002a12d0cfbc37c57b2be948dd4bf44ce0a1 100644 (file)
@@ -36,6 +36,8 @@ AM_INIT_AUTOMAKE
 
 # Configure options.
 AC_ARG_WITH([ssl], [AC_HELP_STRING([--with-ssl=@<:@LIB@:>@], [SSL library (openssl|polarssl) @<:@default=polarssl@:>@])], [], [with_ssl=polarssl])
+AC_ARG_ENABLE(polarssl-test-cert, [  --enable-polarssl-test-cert  Link to PolarSSL test certificate and key @<:@default=no@:>@], [enable_polarssl_test_cert=yes])
+AC_ARG_ENABLE(polarssl-havege, [  --enable-polarssl-havege  Link to PolarSSL HAVEGE random generator key @<:@default=no@:>@ Deafult: /dev/urandom], [enable_polarssl_havege=yes])
 
 # Checks for programs.
 AC_PROG_CC
@@ -47,8 +49,17 @@ AC_CHECK_HEADERS([libconfig.h], [], [AC_MSG_ERROR([could not find libconfig.h])]
 AC_CHECK_LIB([config], [config_init], [], [AC_MSG_ERROR([could not find libconfig])])
 AS_IF([test "x$with_ssl" = xpolarssl], [
        AC_CHECK_HEADERS([polarssl/ssl.h], [], [AC_MSG_ERROR([could not find polarssl/ssl.h])])
+       AC_CHECK_HEADERS([polarssl/version.h], [], [AC_MSG_ERROR([could not find polarssl/version.h])])
        AC_CHECK_LIB([polarssl], [ssl_init], [], [AC_MSG_ERROR([could not find libpolarssl])])
        AC_DEFINE([USE_POLARSSL], [], [Use PolarSSL])
+    AS_IF([test "x$enable_polarssl_test_cert" = xyes], [
+           AC_CHECK_LIB([polarssl], [test_srv_crt], [], [AC_MSG_ERROR([could not find test_srv_crt])])
+           AC_DEFINE([USE_POLARSSL_TESTCERT], [], [Use PolarSSL test certificate])
+    ])
+    AS_IF([test "x$enable_polarssl_havege" = xyes], [
+           AC_CHECK_LIB([polarssl], [havege_init], [], [AC_MSG_ERROR([could not find havege_init])])
+           AC_DEFINE([USE_POLARSSL_HAVEGE], [], [Use PolarSSL HAVEGE random generator])
+    ])
 ])
 AS_IF([test "x$with_ssl" = xopenssl], [
        AC_CHECK_HEADERS([openssl/ssl.h], [], [AC_MSG_ERROR([could not find openssl/ssl.h])])