little bit closer to working on x86_64; allow -lbz2 to be forced on Makefile.PL
authorcturner <devnull@localhost>
Fri, 8 Nov 2002 22:25:19 +0000 (22:25 +0000)
committercturner <devnull@localhost>
Fri, 8 Nov 2002 22:25:19 +0000 (22:25 +0000)
CVS patchset: 5842
CVS date: 2002/11/08 22:25:19

perl-RPM2/Makefile.PL
perl-RPM2/RPM2.pm

index e6fe3c9..3676612 100644 (file)
@@ -2,16 +2,20 @@ use ExtUtils::MakeMaker;
 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
 # the contents of the Makefile that is written.
 
-my $libs = "-lrpm -lrpmdb -lrpmio -lpopt";
+my $extra_libs = $ENV{EXTRALIBS};
+my $libs = "$extra_libs -lrpm -lrpmdb -lrpmio -lpopt";
 
 # try to be smart about which shared libs we should load.
 # use the .la file.  probably linux only.
 
-if (open FH, "</usr/lib/librpm.la") {
+my $filename = '/usr/lib/librpm.la';
+$filename = '/usr/lib64/librpm.la' unless -e $filename;
+
+if (open FH, "<$filename") {
   my ($line, @rest) = grep { /^dependency_libs=/ } <FH>;
   if ($line and not @rest) {
     if ($line =~ /^dependency_libs='(.*)'$/) {
-      $libs = "-lrpm $1";
+      $libs = "$extra_libs -lrpm $1";
     }
   }
 }
index 9bbd59e..33406eb 100644 (file)
@@ -7,7 +7,7 @@ use Data::Dumper;
 use Cwd qw/realpath/;
 
 use vars qw/$VERSION/;
-$VERSION = '0.47';
+$VERSION = '0.48';
 use vars qw/@ISA/;
 @ISA = qw/DynaLoader/;