summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Pion <pion@afnic.fr>2022-03-03 16:22:59 +0100
committerAlexandre Pion <pion@afnic.fr>2022-03-03 19:52:52 +0100
commit97576ce64e59eaf185b91559b1ffd5ad11ef96f7 (patch)
treed51f0b204aeebcad790210e69d0412247f684769
parentb6a937e900875f5c3eb810b5e7aefef5fce8e3b5 (diff)
Pass custom OpenSSL paths to LDNS C compiler
-rw-r--r--Makefile.PL15
1 files changed, 12 insertions, 3 deletions
diff --git a/Makefile.PL b/Makefile.PL
index ce5ce79..e62b637 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -179,11 +179,18 @@ CONFIGURE_FLAGS += --disable-ldns-config --disable-dane
END_CONFIGURE_FLAGS
- my $openssl_make = <<END_ED25519;
+ my $openssl_make = <<END_OPENSSL_MAKE;
CONFIGURE_FLAGS += --with-ssl=$opt_prefix_openssl
-END_ED25519
+END_OPENSSL_MAKE
+
+ my $openssl_flags = <<END_OPENSSL_FLAGS;
+
+CFLAGS += -I$opt_openssl_inc
+LDFLAGS += -L$opt_openssl_lib
+
+END_OPENSSL_FLAGS
my $ed25519_make = <<'END_ED25519';
@@ -199,13 +206,14 @@ END_NO_ED25519
my $internal_ldns_make = <<'END_INTERNAL_LDNS';
+CFLAGS += -fPIC
LDFROM += ldns/.libs/libldns.a
config :: ldns/.libs/libldns.a
ldns/.libs/libldns.a: ldns/configure
cd ldns ;\
- ./configure CFLAGS=-fPIC $(CONFIGURE_FLAGS) ;\
+ ./configure CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(CONFIGURE_FLAGS) ;\
make lib
ldns/configure:
@@ -226,6 +234,7 @@ END_INTERNAL_LDNS
$postamble .= $openssl_make if $opt_prefix_openssl;
$postamble .= $ed25519_make if $opt_ed25519;
$postamble .= $no_ed25519_make if !$opt_ed25519;
+ $postamble .= $openssl_flags if ( $opt_openssl_inc or $opt_openssl_lib );
$postamble .= $internal_ldns_make;
}