<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">diff -bu ./lib/Apache2/Build.pm~ ./lib/Apache2/Build.pm
--- ./lib/Apache2/Build.pm~	2015-06-18 22:13:53.000000000 +0200
+++ ./lib/Apache2/Build.pm	2016-08-18 15:45:27.000000000 +0200
@@ -517,18 +517,19 @@
 sub ldopts {
     my ($self) = @_;
 
-    my $config = tied %Config;
-    my $ldflags = $config-&gt;{ldflags};
-
+    my $ldflags = $Config{ldflags};
     if (WIN32) {
-        $config-&gt;{ldflags} = ''; #same as lddlflags
+        require Mock::Config;
+        Mock::Config-&gt;import(ldflags =&gt; ''); # same as lddlflags
     }
     elsif (DARWIN) {
+        require Mock::Config;
         #not sure how this can happen, but it shouldn't
         my @bogus_flags = ('flat_namespace', 'bundle', 'undefined suppress');
         for my $flag (@bogus_flags) {
-            $config-&gt;{ldflags} =~ s/-$flag\s*//;
+            $ldflags =~ s/-$flag\s*//;
         }
+        Mock::Config-&gt;import(ldflags =&gt; $ldflags);
     }
 
     my $ldopts = ExtUtils::Embed::ldopts();
@@ -547,8 +548,9 @@
     if ($self-&gt;{MP_USE_GTOP}) {
         $ldopts .= $self-&gt;gtop_ldopts;
     }
-
-    $config-&gt;{ldflags} = $ldflags; #reset
+    if (DARWIN || WIN32) {
+        Mock::Config-&gt;unimport; # reset ldflags
+    }
 
     # on Irix mod_perl.so needs to see the libperl.so symbols, which
     # requires the -exports option immediately before -lperl.
diff -bu ./lib/ModPerl/BuildMM.pm~ ./lib/ModPerl/BuildMM.pm
--- ./lib/ModPerl/BuildMM.pm~	2015-06-18 22:13:53.000000000 +0200
+++ ./lib/ModPerl/BuildMM.pm	2016-08-18 15:54:21.000000000 +0200
@@ -134,6 +134,9 @@
         LIBS        =&gt; $libs,
         dynamic_lib =&gt; \%dynamic_lib,
     );
+    if (WIN32 || $^O eq 'darwin') {
+        push @opts, 'BUILD_REQUIRES' =&gt; { 'Mock::Config' =&gt; 0.03 };
+    }
 
     my @typemaps;
     push @typemaps, $args{TYPEMAPS} if $args{TYPEMAPS};
</pre></body></html>