diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2013-06-17 17:54:27 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2013-06-17 17:55:33 +0100 |
commit | 21339399ecf6ae3a636f01859c6fd863bfac6933 (patch) | |
tree | 0a2e5d10b79457a599839760e5db5ea1ade8e932 /win32 | |
parent | 3ea9257d13af7b9f4eb5c16b33c9358a322b05c1 (diff) | |
download | perl-21339399ecf6ae3a636f01859c6fd863bfac6933.tar.gz |
Set Config's *extensions and *_ext vars correctly for Win32 static builds
When building with ALL_STATIC=define on Win32, we arranged for Encode's
sub-extensions to get built (in win32/config_sh.PL), but neglected to list
them in the relevant Config variables, causing test failures in
t/porting/FindExt.t and lib/Config/Extensions.t. Moving the special logic
for Encode into win32/FindExt.pm fixes that.
Fix a related test failure regarding Sys-Syslog (not built on Win32) while
we're at it.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/FindExt.pm | 16 | ||||
-rw-r--r-- | win32/config_sh.PL | 13 |
2 files changed, 16 insertions, 13 deletions
diff --git a/win32/FindExt.pm b/win32/FindExt.pm index f1957f177e..c7e52aef05 100644 --- a/win32/FindExt.pm +++ b/win32/FindExt.pm @@ -13,6 +13,8 @@ sub apply_config { my ($config) = @_; my @no; + push @no, 'Sys-Syslog' if $^O eq 'MSWin32'; + # duplicates logic from Configure (mostly) push @no, "DB_File" unless $config->{i_db}; push @no, "GDBM_File" unless $config->{i_gdbm}; @@ -46,6 +48,20 @@ sub set_static_extensions { $static{$_} = 1; $ext{$_} = 'static' if $ext{$_} && $ext{$_} eq 'dynamic'; } + + # Encode is a special case. If we are building Encode as a static + # extension, we need to explicitly list its subextensions as well. + # For other nested extensions, this is handled automatically by + # the appropriate Makefile.PL. + if ($ext{Encode} && $ext{Encode} eq 'static') { + foreach my $file (`dir /s /b ..\\cpan\\Encode\\Makefile.PL`) { + if ($file =~ /\b(Encode\\.+)\\Makefile\.PL/) { + (my $xxx = $1) =~ s|\\|/|g; + $static{$xxx} = 1; + $ext{$xxx} = 'static'; + } + } + } } sub scan_ext diff --git a/win32/config_sh.PL b/win32/config_sh.PL index eb9471cf21..d866f7624e 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -56,19 +56,6 @@ $opt{dynamic_ext} = join(' ',FindExt::dynamic_ext()) || ' '; $opt{extensions} = join(' ',FindExt::extensions()) || ' '; $opt{known_extensions} = join(' ',FindExt::known_extensions()) || ' '; -# Encode is a special case. If we are building Encode as a static -# extension, we need to explicitly list its subextensions as well. -# For other nested extensions, this is handled automatically by -# the appropriate Makefile.PL. -if ($opt{static_ext} =~ /\bEncode\b/) { - foreach my $file (`dir /s /b ..\\cpan\\Encode\\Makefile.PL`) { - if ($file =~ /\b(Encode\\.+)\\Makefile\.PL/) { - (my $xxx = $1) =~ s|\\|/|g; - $opt{static_ext} .= " $xxx"; - } - } -} - my $pl_h = '../patchlevel.h'; if (-e $pl_h) { |