From c2c896ee870285b836f80b30a042941b03ddd440 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 22 Dec 2009 04:50:11 +0000 Subject: Don't require selftest in libstate; macro wrap --- src/libstate/libstate.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp index 6aa3c5119..9ac15e381 100644 --- a/src/libstate/libstate.cpp +++ b/src/libstate/libstate.cpp @@ -9,8 +9,6 @@ #include #include #include -#include - #include #include #include @@ -18,6 +16,10 @@ #include #include +#if defined(BOTAN_HAS_SELFTESTS) + #include +#endif + #if defined(BOTAN_HAS_MUTEX_PTHREAD) #include #elif defined(BOTAN_HAS_MUTEX_WIN32) @@ -313,8 +315,10 @@ void Library_State::initialize(bool thread_safe) m_algorithm_factory = new Algorithm_Factory(engines, *mutex_factory); +#if defined(BOTAN_HAS_SELFTESTS) if(!passes_self_tests(algorithm_factory())) throw Self_Test_Failure("Startup self tests failed"); +#endif } /* -- cgit v1.2.3