--- Makefile.PL 2006/11/06 00:35:44 1.1
+++ Makefile.PL 2006/11/06 10:24:38
@@ -331,10 +331,6 @@
# this probably needs to go into ExtUtils::Depends.
sub find_extra_libs {
- # right now we need this terrible hack only for windows.
- # unfortunately, this code doesn't work on cygwin. :-/
- return "" unless $^O eq "MSWin32";
-
# win32 does not allow unresolved symbols in libraries, but
# Gtk2 uses on symbols in the dll created for Glib.
# so, we have to break all this nice abstraction and encapsulation
@@ -346,10 +342,19 @@
my $retstring = "";
use File::Find;
- find (sub {
- $retstring .= " ".$File::Find::name
- if /Glib.lib/i;
- }, @INC);
+
+ if ($^O eq "MSWin32") {
+ find (sub {
+ $retstring .= " ".$File::Find::name
+ if /Glib\.lib/i;
+ }, @INC);
+ } elsif ($^O eq "cygwin") {
+ find (sub {
+ $retstring .= " -L".$File::Find::dir
+ if /libGlib\.dll\.a/i;
+ }, @INC);
+ $retstring .= " -lGlib.dll" if ($retstring ne "");
+ }
return $retstring;
}
这是 Dirk Froemberg 向 Torsten Schoenfeld 提交的 patch,到现在为止还没有被合并进 source。
参考链接:
http://bugzilla.gnome.org
No comments:
Post a Comment