From: Peter van Dijk Date: Mon, 20 Aug 2012 12:13:14 +0000 (+0000) Subject: support pkg-config for finding Botan libs. Patch by Marcus 'darix' Rueckert. X-Git-Tag: auth-3.2-rc1~186 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=199e13197b628bd67a99ea72a2c35a230c335b40;p=thirdparty%2Fpdns.git support pkg-config for finding Botan libs. Patch by Marcus 'darix' Rueckert. git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2696 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/configure.ac b/configure.ac index 6751a77566..1a89478c42 100644 --- a/configure.ac +++ b/configure.ac @@ -183,6 +183,21 @@ AC_ARG_ENABLE(cryptopp, AC_MSG_RESULT($enable_cryptopp) AM_CONDITIONAL(CRYPTOPP,test x"$enable_cryptopp" = "xyes") +if test "x$enable_botan110" = "xyes" +then + PKG_CHECK_MODULES(BOTAN110, botan-1.10, HAVE_BOTAN110=yes, AC_MSG_ERROR([+Could not find botan 1.10])) + AC_SUBST(BOTAN110_LIBS) + AC_SUBST(BOTAN110_CFLAGS) + AC_DEFINE(HAVE_BOTAN110,1,[If we have botan 1.10]) +fi + +if test "x$enable_botan18" = "xyes" +then + PKG_CHECK_MODULES(BOTAN18, botan-1.8, HAVE_BOTAN18=yes, AC_MSG_ERROR([+Could not find botan 1.8])) + AC_SUBST(BOTAN18_LIBS) + AC_SUBST(BOTAN18_CFLAGS) + AC_DEFINE(HAVE_BOTAN18,1,[If we have botan 1.8]) +fi AC_MSG_CHECKING(whether we should build static binaries) diff --git a/pdns/Makefile.am b/pdns/Makefile.am index 3bca54f680..f819ffc1eb 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -53,16 +53,19 @@ ednssubnet.cc ednssubnet.hh cachecleaner.hh dnslabel.hh dnslabel.cc # pdns_server_LDFLAGS=@moduleobjects@ @modulelibs@ @DYNLINKFLAGS@ @LIBDL@ @THREADFLAGS@ $(BOOST_SERIALIZATION_LDFLAGS) -rdynamic pdns_server_LDADD= ext/polarssl-1.1.2/library/libpolarssl.a $(BOOST_SERIALIZATION_LIBS) $(LUA_LIBS) $(SQLITE3_LIBS) +pdns_server_CPPFLAGS = if BOTAN110 pdns_server_SOURCES += botan110signers.cc botansigners.cc -pdns_server_LDADD += -lbotan-1.10 -lgmp +pdns_server_LDADD += $(BOTAN110_LIBS) -lgmp +pdns_server_CPPFLAGS += $(BOTAN110_CFLAGS) endif if BOTAN18 pdns_server_SOURCES += botan18signers.cc botansigners.cc -pdns_server_LDADD += -lbotan -lgmp +pdns_server_LDADD += $(BOTAN18_LIBS) -lgmp +pdns_server_CPPFLAGS += $(BOTAN18_CFLAGS) endif if CRYPTOPP @@ -88,15 +91,18 @@ pdnssec_SOURCES=pdnssec.cc dbdnsseckeeper.cc sstuff.hh dnsparser.cc dnsparser.hh pdnssec_LDFLAGS=@moduleobjects@ @modulelibs@ @DYNLINKFLAGS@ @LIBDL@ @THREADFLAGS@ $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_SERIALIZATION_LDFLAGS) pdnssec_LDADD= ext/polarssl-1.1.2/library/libpolarssl.a $(BOOST_PROGRAM_OPTIONS_LIBS) $(BOOST_SERIALIZATION_LIBS) $(SQLITE3_LIBS) +pdnssec_CPPFLAGS= if BOTAN110 pdnssec_SOURCES += botan110signers.cc botansigners.cc -pdnssec_LDADD += -lbotan-1.10 -lgmp +pdnssec_LDADD += $(BOTAN110_LIBS) -lgmp +pdnssec_CPPFLAGS += $(BOTAN110_CFLAGS) endif if BOTAN18 pdnssec_SOURCES += botan18signers.cc botansigners.cc -pdnssec_LDADD += -lbotan -lgmp +pdnssec_LDADD += $(BOTAN18_LIBS) -lgmp +pdnssec_CPPFLAGS += $(BOTAN18_CFLAGS) endif if CRYPTOPP