From 1f0f33bc7dd530b04b34533aafcbf9bb8f485925 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Mon, 6 Jan 2014 13:40:42 +0100 Subject: [PATCH] Move crypto++ check to separate macro --- configure.ac | 6 +----- m4/pdns_with_cryptopp.m4 | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 m4/pdns_with_cryptopp.m4 diff --git a/configure.ac b/configure.ac index 772a80edf..6771250ee 100644 --- a/configure.ac +++ b/configure.ac @@ -160,11 +160,7 @@ AC_MSG_RESULT($enable_verbose_logging) PDNS_WITH_SYSTEM_POLARSSL PDNS_ENABLE_BOTAN - -if test "x$enable_cryptopp" = "xyes" -then - AC_DEFINE(HAVE_CRYPTOPP,1,[If we have cryptopp]) -fi +PDNS_WITH_CRYPTOPP AC_ARG_ENABLE(remotebackend_http, AS_HELP_STRING([--enable-remotebackend-http],[enable HTTP connector for remotebackend]),[enable_remotebackend_http=yes], [enable_remotebackend_http=no]) AC_MSG_CHECKING(whether to enable http connector in remotebackend) diff --git a/m4/pdns_with_cryptopp.m4 b/m4/pdns_with_cryptopp.m4 new file mode 100644 index 000000000..7608fa1f3 --- /dev/null +++ b/m4/pdns_with_cryptopp.m4 @@ -0,0 +1,16 @@ +AC_DEFUN([PDNS_WITH_CRYPTOPP],[ + AC_MSG_CHECKING([whether we will be linking in Crypto++]) + AC_ARG_ENABLE([cryptopp], + AS_HELP_STRING([--enable-cryptopp], + [use Crypto++]), + [enable_cryptopp=yes], + [enable_cryptopp=no] + ) + AC_MSG_RESULT([$enable_cryptopp]) + AM_CONDITIONAL([CRYPTOPP], [test "x$enable_cryptopp" = "xyes"]) + + AS_IF([test "x$enable_cryptopp" = "xyes"], + [AC_DEFINE([HAVE_CRYPTOPP], [1], [Define to 1 if you have crypto++])] + ) +]) + -- 2.40.0