diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2013-06-08 02:16:17 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2013-06-08 02:16:17 +0100 |
commit | 13cedc2a3e4c518d94e81e9837febef77948e0e5 (patch) | |
tree | edc2cd072496fae9d7cfb902deef2c88149a2047 /win32/config_sh.PL | |
parent | 903f2d7006dbd87b9347acb742b9d7848f566aed (diff) | |
download | perl-13cedc2a3e4c518d94e81e9837febef77948e0e5.tar.gz |
Include the Encode extension in the ALL_STATIC build on Win32 for VC++
Thanks to Jan Dubois and Nicholas Clark for pointing out that Encode has
subextensions which need statically linking too, and that Configure has
a special case for handling this which we can mimic in config_sh.PL.
Unfortunately, however, while this works for VC++, with MinGW it gives
undefined reference errors to three symbols from Encode/CN.o
(_cp936_encoding, _euc_cn_encoding and MacChineseSimp_encoding) and two
from Encode/JP.o (_cp932_encoding and _euc_jp_encoding), so we must retain
the exclusion on Encode for MinGW for now, much like the Compress/Raw/Bzip2
problem found before. Hopefully these are all fixable soon.
Diffstat (limited to 'win32/config_sh.PL')
-rw-r--r-- | win32/config_sh.PL | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/win32/config_sh.PL b/win32/config_sh.PL index d866f7624e..eb9471cf21 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -56,6 +56,19 @@ $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) { |