]> git.imager.perl.org - imager.git/blobdiff - lib/Imager/ExtUtils.pm
access to poly_poly from perl as polypolygon()
[imager.git] / lib / Imager / ExtUtils.pm
index b6cbc38125cf583576e0dc6eb1a5b7dd1aa96aa9..61caa07239d608ab7e0c536776508d88b542673b 100644 (file)
@@ -1,9 +1,10 @@
 package Imager::ExtUtils;
 use strict;
+use File::Spec;
 
 use vars qw($VERSION);
 
-$VERSION = "1.000";
+$VERSION = "1.002";
 
 =head1 NAME
 
@@ -27,9 +28,13 @@ Returns the base directory where Imager is installed.
 
 # figure out where Imager is installed
 sub base_dir {
-  for my $dir (@INC) {
-    if (-e "$dir/Imager.pm") {
-      return $dir;
+  for my $inc_dir (@INC) {
+    if (-e "$inc_dir/Imager.pm") {
+      my $base_dir = $inc_dir;
+      unless (File::Spec->file_name_is_absolute($base_dir)) {
+       $base_dir = File::Spec->rel2abs($base_dir);
+      }
+      return $base_dir;
     }
   }
 
@@ -50,7 +55,8 @@ sub inline_config {
     {
      INC => $class->includes,
      TYPEMAPS => $class->typemap,
-     AUTO_INCLUDE => <<'CODE',
+     AUTO_INCLUDE => <<CODE,
+/* Inserted by Imager $Imager::VERSION */
 #include "imext.h"
 #include "imperl.h"
 DEFINE_IMAGER_CALLBACKS;
@@ -116,7 +122,7 @@ __END__
 
 =head1 AUTHOR
 
-Tony Cook <tony@imager.perl.org>
+Tony Cook <tonyc@cpan.org>
 
 =head1 REVISION