From e25a0864f82865afddab2871490106baa71f1786 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Tue, 23 Dec 2014 12:52:26 +0100 Subject: [PATCH] Use pkg-config --static to pick up deps Fixes #1912 --- configure.ac | 8 +++++--- pdns/Makefile.am | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 6f6830b64..467f67df9 100644 --- a/configure.ac +++ b/configure.ac @@ -174,9 +174,11 @@ AC_ARG_ENABLE([static-binaries], [static=no], ) AC_MSG_RESULT([$static]) -AS_IF([test "x$static" != "xno"], - [LDFLAGS="-all-static $LDFLAGS"] -) +AS_IF([test "x$static" != "xno"], [ + LDFLAGS="-all-static $LDFLAGS" + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + PKG_CONFIG="$PKG_CONFIG --static" +]) modules="bind gmysql geo random" AC_ARG_WITH([modules], diff --git a/pdns/Makefile.am b/pdns/Makefile.am index db9db8d69..aa06ff9bc 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -189,12 +189,12 @@ pdns_server_LDADD = \ if BOTAN110 pdns_server_SOURCES += botan110signers.cc botansigners.cc -pdns_server_LDADD += $(BOTAN110_LIBS) -lgmp -lrt +pdns_server_LDADD += $(BOTAN110_LIBS) endif if BOTAN18 pdns_server_SOURCES += botan18signers.cc botansigners.cc -pdns_server_LDADD += $(BOTAN18_LIBS) -lgmp +pdns_server_LDADD += $(BOTAN18_LIBS) endif if CRYPTOPP @@ -283,12 +283,12 @@ pdnssec_LDADD = \ if BOTAN110 pdnssec_SOURCES += botan110signers.cc botansigners.cc -pdnssec_LDADD += $(BOTAN110_LIBS) -lgmp -lrt +pdnssec_LDADD += $(BOTAN110_LIBS) endif if BOTAN18 pdnssec_SOURCES += botan18signers.cc botansigners.cc -pdnssec_LDADD += $(BOTAN18_LIBS) -lgmp +pdnssec_LDADD += $(BOTAN18_LIBS) endif if CRYPTOPP -- 2.40.0