Skip to content

Commit e43029a

Browse files
committed
Disable -Werror if not author testing and gcc flags if not gcc
1 parent 0bd0ec5 commit e43029a

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Makefile.PL

+11-3
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,18 @@ if (-d "/usr/include/openssl") {
6363
}
6464

6565
cc_lib_links('crypto');
66-
if ($Config::Config{myuname} =~ /sunos|solaris/i) {
67-
cc_optimize_flags('-O2 -Wall -Werror -DOPENSSL_API_COMPAT=0x10100000L');
66+
67+
my $ccflags = '';
68+
if ($Config::Config{ccname} =~ /gcc/i) {
69+
$ccflags = $ENV{AUTHOR_TESTING} ? '-Wall -Werror': '-Wall';
70+
} else {
71+
$ccflags = '';
72+
}
73+
74+
if (($Config::Config{myuname} =~ /sunos|solaris/i) && ($Config::Config{PATCHLEVEL} =~ /5.20/)) {
75+
cc_optimize_flags("-O3 -DOPENSSL_API_COMPAT=0x10100000L");
6876
} else {
69-
cc_optimize_flags('-O3 -Wall -Werror -DOPENSSL_API_COMPAT=0x10100000L');
77+
cc_optimize_flags("-O3 $ccflags -DOPENSSL_API_COMPAT=0x10100000L");
7078
}
7179

7280
requires 'Crypt::OpenSSL::X509' => '1.807';

Verify.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use warnings;
55

66
require 5.010;
77

8-
our $VERSION = '0.25';
8+
our $VERSION = '0.26';
99

1010
use Crypt::OpenSSL::X509;
1111

0 commit comments

Comments
 (0)