]> granicus.if.org Git - pdns/commitdiff
Move crypto++ check to separate macro
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Mon, 6 Jan 2014 12:40:42 +0000 (13:40 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Mon, 6 Jan 2014 13:02:43 +0000 (14:02 +0100)
configure.ac
m4/pdns_with_cryptopp.m4 [new file with mode: 0644]

index 772a80edf191a7a7079f79242a68be31c04f2b5d..6771250ee9b16f813d1fb733e99bbedc3ce3c6b4 100644 (file)
@@ -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 (file)
index 0000000..7608fa1
--- /dev/null
@@ -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++])]
+  )
+])
+