diff options
author | Tony Cook <tony@develop-help.com> | 2011-01-06 21:52:24 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2011-02-13 23:00:43 +1100 |
commit | 557ab4cb986767c7868d1b0471b669e794d9b569 (patch) | |
tree | 15ad2dae846fe3f58b4f905ee5b061efa4a6911c /win32/FindExt.pm | |
parent | d6fb8979903e0b021272dee1efd5383d286d1ba0 (diff) | |
download | perl-557ab4cb986767c7868d1b0471b669e794d9b569.tar.gz |
ignore extensions based on the configuration
Diffstat (limited to 'win32/FindExt.pm')
-rw-r--r-- | win32/FindExt.pm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/win32/FindExt.pm b/win32/FindExt.pm index fe1febd839..25fa8ce844 100644 --- a/win32/FindExt.pm +++ b/win32/FindExt.pm @@ -9,6 +9,25 @@ my $no = join('|',qw(GDBM_File ODBM_File NDBM_File DB_File VMS VMS-DCLsym VMS-Stdio Sys-Syslog IPC-SysV I18N-Langinfo)); $no = qr/^(?:$no)$/i; +sub apply_config { + my ($config) = @_; + my @no; + + # duplicates logic from Configure (mostly) + push @no, "DB_File" unless $config->{i_db}; + push @no, "GDBM_File" unless $config->{i_gdbm}; + push @no, "I18N-Langinfo" unless $config->{i_langinfo} && $config->{i_nl_langinfo}; + push @no, "IPC-SysV" unless $config->{d_msg} || $config->{d_sem} || $config->{d_shm}; + push @no, "NDBM_File" unless $config->{d_ndbm}; + push @no, "ODBM_File" + unless ($config->{i_dbm} || $config->{i_rpcsvcdbm}) && !$config->{d_cplusplus}; + push @no, "VMS.*" unless $^O eq "VMS"; + push @no, "Win32.*" unless $^O eq "MSWin32" || $^O eq "cygwin"; + + $no = join('|', @no); + $no = qr/^(?:$no)$/i; +} + my %ext; my %static; |