|
|
29f120 |
From 67d9ad2238c6b58ea160df731208cc6f50b64e96 Mon Sep 17 00:00:00 2001
|
|
|
29f120 |
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
|
29f120 |
Date: Thu, 13 Jun 2019 13:14:26 +0200
|
|
|
29f120 |
Subject: [PATCH] pkgconfig
|
|
|
29f120 |
MIME-Version: 1.0
|
|
|
29f120 |
Content-Type: text/plain; charset=UTF-8
|
|
|
29f120 |
Content-Transfer-Encoding: 8bit
|
|
|
29f120 |
|
|
|
29f120 |
Link to OpenSSL library according to pkgconfig output if available.
|
|
|
29f120 |
|
|
|
29f120 |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
29f120 |
---
|
|
|
29f120 |
Makefile.PL | 16 +++++++++++-----
|
|
|
29f120 |
1 file changed, 11 insertions(+), 5 deletions(-)
|
|
|
29f120 |
|
|
|
29f120 |
diff --git a/Makefile.PL b/Makefile.PL
|
|
|
29f120 |
index 31d9c74..6d7ceba 100644
|
|
|
29f120 |
--- a/Makefile.PL
|
|
|
29f120 |
+++ b/Makefile.PL
|
|
|
29f120 |
@@ -200,11 +200,17 @@ EOM
|
|
|
29f120 |
@{ $opts->{lib_links} } = map { $_ =~ s/32\b//g } @{ $opts->{lib_links} } if $Config{use64bitall};
|
|
|
29f120 |
}
|
|
|
29f120 |
else {
|
|
|
29f120 |
- push @{ $opts->{lib_links} },
|
|
|
29f120 |
- ($rsaref
|
|
|
29f120 |
- ? qw( ssl crypto RSAglue rsaref z )
|
|
|
29f120 |
- : qw( ssl crypto z )
|
|
|
29f120 |
- );
|
|
|
29f120 |
+ my $libsflags = `pkg-config --libs-only-l openssl`;
|
|
|
29f120 |
+ if ( $libsflags ne '' ) {
|
|
|
29f120 |
+ push @{ $opts->{lib_links} }, map { s/^-l//; $_ } split(' ', $libsflags);
|
|
|
29f120 |
+ }
|
|
|
29f120 |
+ else {
|
|
|
29f120 |
+ push @{ $opts->{lib_links} },
|
|
|
29f120 |
+ ($rsaref
|
|
|
29f120 |
+ ? qw( ssl crypto RSAglue rsaref z )
|
|
|
29f120 |
+ : qw( ssl crypto z )
|
|
|
29f120 |
+ );
|
|
|
29f120 |
+ }
|
|
|
29f120 |
|
|
|
29f120 |
if (($Config{cc} =~ /aCC/i) && $^O eq 'hpux') {
|
|
|
29f120 |
print "*** Enabling HPUX aCC options (+e)\n";
|
|
|
29f120 |
--
|
|
|
29f120 |
2.20.1
|
|
|
29f120 |
|