~ubuntu-branches/ubuntu/precise/libdbd-pg-perl/precise

« back to all changes in this revision

Viewing changes to Makefile.PL

  • Committer: Bazaar Package Importer
  • Author(s): gregor herrmann
  • Date: 2008-12-15 20:20:37 UTC
  • mfrom: (1.1.18 upstream) (4.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20081215202037-zey31ccjr422db1b
Tags: 2.11.7-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: Makefile.PL 12120 2008-11-30 22:09:04Z turnstep $
 
1
# $Id: Makefile.PL 12157 2008-12-13 16:58:36Z turnstep $
2
2
 
3
3
use ExtUtils::MakeMaker;
4
4
use Config;
7
7
use 5.006001;
8
8
 
9
9
## No version.pm for this one, as the prereqs are not loaded yet.
10
 
my $VERSION = '2.11.6';
 
10
my $VERSION = '2.11.7';
11
11
 
12
12
my $lib;
13
13
BEGIN {
77
77
my ($major_ver, $minor_ver, $patch, $conf, $bindir) = map {$pg->$_}
78
78
        qw/major_version minor_version patch_version configure bin_dir/;
79
79
my $initdb = '';
80
 
if (-d $bindir) {
 
80
if (defined $bindir and -d $bindir) {
81
81
        my $testinitdb = "$bindir${sep}initdb";
82
82
        if (-e $testinitdb) {
83
83
                $initdb = $testinitdb;
84
84
        }
85
85
}
86
 
my $serverversion = sprintf '%d%.02d%.02d', $major_ver, $minor_ver, $patch;
87
 
my $defaultport = $conf =~ /with-pgport=(\d+)/ ? $1 : 5432;
 
86
my $serverversion = 0;
 
87
my $defaultport = 0;
 
88
 
 
89
if (defined $major_ver) {
 
90
        $serverversion = sprintf '%d%.02d%.02d', $major_ver, $minor_ver, $patch;
 
91
        $defaultport = $conf =~ /with-pgport=(\d+)/ ? $1 : 5432;
 
92
}
88
93
 
89
94
if ((!$ENV{POSTGRES_INCLUDE} or !$ENV{POSTGRES_LIB}) and !$ENV{POSTGRES_HOME}) {
90
95
    $POSTGRES_INCLUDE = $pg->inc_dir;