Index: Makefile.PL
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2-MozEmbed/Makefile.PL,v
retrieving revision 1.12
diff -u -d -p -u -r1.12 Makefile.PL
@@ -65,17 +66,24 @@ Gtk2::CodeGen->parse_maps('gtkmozembed2p
Gtk2::CodeGen->write_boot(ignore => qr/^Gtk2::MozEmbed$/);
my ($pkg) = $pkgcfg{pkg} =~ /^(\S+)/;
-print "Compiling agains $pkg\n";
+print "Compiling against $pkg\n";
ExtUtils::PkgConfig->write_version_macros (
"build/gtkmozembed2perl-version.h",
$pkg => "GTK_MOZ_EMBED",
);
+# See if an SDK directory is set and if so, set up a define for later use.
+my $inc = $pkgcfg{cflags};
+my $sdk_dir = ExtUtils::PkgConfig->variable ($pkg, 'sdkdir');
+if (defined $sdk_dir && $sdk_dir ne '') {
+ $inc .= qq( -DGTK_MOZ_EMBED_PERL_SDK_DIR="\\"$sdk_dir\\"");
+}
+
my $mozembed = ExtUtils::Depends->new('Gtk2::MozEmbed', 'Gtk2',
($use_dom ? ('Mozilla::DOM') : ()));
-$mozembed->set_inc($pkgcfg{cflags});
+$mozembed->set_inc($inc);
$mozembed->set_libs($pkgcfg{libs});
$mozembed->add_xs(@xs_files);
$mozembed->add_pm('MozEmbed.pm' => '$(INST_LIBDIR)/MozEmbed.pm');
Index: xs/GtkMozEmbed.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2-MozEmbed/xs/GtkMozEmbed.xs,v
retrieving revision 1.6
diff -u -d -p -u -r1.6 GtkMozEmbed.xs
--- xs/GtkMozEmbed.xs 20 Dec 2005 20:34:40 -0000 1.6
+++ xs/GtkMozEmbed.xs 29 Jun 2008 10:56:41 -0000
@@ -268,6 +268,9 @@ BOOT:
"dom_mouse_out",
gtk2perl_moz_embed_dom_mouse_marshal);
#endif /* ifdef __cplusplus */
+#ifdef GTK_MOZ_EMBED_PERL_SDK_DIR
+ gtk_moz_embed_set_path (GTK_MOZ_EMBED_PERL_SDK_DIR);
+#endif
=for object Gtk2::MozEmbed::main