From c093991d6ae38e44884f452cab0ef508018a03e6 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Wed, 23 Jul 2014 11:34:58 +0200 Subject: [PATCH] Actually check if libcrypto++ is installed --- m4/pdns_with_cryptopp.m4 | 9 ++++++--- pdns/Makefile.am | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/m4/pdns_with_cryptopp.m4 b/m4/pdns_with_cryptopp.m4 index 1e4cbefa4..10d59e12b 100644 --- a/m4/pdns_with_cryptopp.m4 +++ b/m4/pdns_with_cryptopp.m4 @@ -8,8 +8,11 @@ AC_DEFUN([PDNS_WITH_CRYPTOPP],[ AC_MSG_RESULT([$enable_cryptopp]) AM_CONDITIONAL([CRYPTOPP], [test "x$enable_cryptopp" != "xno"]) - AS_IF([test "x$enable_cryptopp" != "xno"], - [AC_DEFINE([HAVE_CRYPTOPP], [1], [Define to 1 if you have crypto++])] - ) + AS_IF([test "x$enable_cryptopp" != "xno"], [ + PKG_CHECK_MODULES([CRYPTOPP], [libcrypto++], + [AC_DEFINE([HAVE_CRYPTOPP], [1], [Define to 1 if you have crypto++])], + [AC_MSG_ERROR([Could not find crypto++])] + ) + ]) ]) diff --git a/pdns/Makefile.am b/pdns/Makefile.am index 430fb671f..a1d723636 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -84,7 +84,7 @@ endif if CRYPTOPP pdns_server_SOURCES += cryptoppsigners.cc -pdns_server_LDADD += -lcryptopp +pdns_server_LDADD += $(CRYPTOPP_LIBS) endif if SQLITE3 -- 2.40.0