Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,21 @@ sub custom_assets {
cc_libs $lib;
}
else {
if ( ( my $cflags = $pkg_info{cflags} ) ne '' ) {
say "Adding CFLAGS for $name using pkg-config: $cflags";
cc_include_paths $cflags;
if ( defined ( my $includes = ExtUtils::PkgConfig->cflags_only_I($pcname) ) ) {
my @inc = map { s/^-I//r } (split " ", $includes);
say "Adding include paths for $name using pkg-config: " . join(", ", @inc);

cc_include_paths @inc;
$assert_lib_args{$key}{incpath} = \@inc;
}
if ( defined ( my $libs = ExtUtils::PkgConfig->libs($pcname) ) ) {
cc_libs (split " ", $libs);
}
if ( ( my $libs = $pkg_info{libs} ) ne '' ) {
say "Adding LDFLAGS for $name using pkg-config: $libs";
cc_libs $libs;
if ( defined ( my $libpaths = ExtUtils::PkgConfig->libs_only_L($pcname) ) ) {
my @libpaths = map { s/^-L//r } (split " ", $libpaths);
say "Adding library paths for $name using pkg-config: " . join(", ", @libpaths);

$assert_lib_args{$key}{libpath} = \@libpaths;
}
}
}
Expand Down Expand Up @@ -253,6 +261,10 @@ else {
}
);

# LDNS needs OpenSSL, so we need openssl’s compiler flags for ldns too
push @{$assert_lib_args{ldns}{$_}}, @{$assert_lib_args{openssl}{$_}}
for ( qw(incpath libpath) );

if ( $opt_ed25519 ) {
cc_assert_lib(
debug => $opt_debug,
Expand Down Expand Up @@ -312,6 +324,7 @@ else {
# OpenSSL with SHA-1 support

check_lib(
debug => $opt_debug,
header => [ 'openssl/crypto.h', 'openssl/evp.h', 'openssl/x509.h' ],
lib => 'crypto',
function => q{
Expand Down Expand Up @@ -379,6 +392,7 @@ check_lib(
EVP_PKEY_free(pkey);
return ok ? 0 : 1;
},
%{ $assert_lib_args{openssl} },
)
or do {
print STDERR "wrong result: Failed to verify cryptographic SHA-1 support in OpenSSL.\n"
Expand Down
Loading