Index: ossp-pkg/uuid/perl/Makefile.PL RCS File: /v/ossp/cvs/ossp-pkg/uuid/perl/Attic/Makefile.PL,v rcsdiff -q -kk '-r1.8' '-r1.9' -u '/v/ossp/cvs/ossp-pkg/uuid/perl/Attic/Makefile.PL,v' 2>/dev/null --- Makefile.PL 2005/09/02 17:22:05 1.8 +++ Makefile.PL 2005/09/02 18:47:53 1.9 @@ -32,17 +32,24 @@ use Config; use ExtUtils::MakeMaker; +# determine source directory +my ($srcdir) = map { my $d = $_; $d =~ s/\/libuuid\.la$//; $d } + grep { -f $_ } ("../libuuid.la", glob("../*/libuuid.la")) + or die "no source directory found (where libuuid.la is located)"; + +# determine extra build options my $compat = 0; @ARGV = grep { $_ =~ m/^COMPAT=(\d+)$/i ? ($compat = $1, 0) : 1 } @ARGV; +# generate Makefile WriteMakefile( NAME => 'OSSP::uuid', VERSION_FROM => 'uuid.pm', ABSTRACT_FROM => 'uuid.pod', PREREQ_PM => {}, - LIBS => [ '-L../.libs -luuid' ], + LIBS => [ "-L$srcdir/.libs -L$srcdir -luuid" ], DEFINE => '', - INC => '-I. -I..', + INC => "-I. -I$srcdir", PM => { 'uuid.pm' => '$(INST_LIBDIR)/uuid.pm', 'uuid.pod' => '$(INST_LIBDIR)/uuid.pod', ($compat ? ('uuid_compat.pm' => '$(INST_LIBDIR)/../Data/UUID.pm') : ()),