aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/perl5/Makefile.PL
blob: afd34734964d8dd8fbd4e5bda9eb4030413061ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#-------------------------------------------------------
#
# $Id: Makefile.PL,v 1.1.1.1 1997/04/29 19:37:09 mergl Exp $
#
# Copyright (c) 1997  Edmund Mergl
#
#-------------------------------------------------------

use ExtUtils::MakeMaker;

print "\nConfiguring Pg\n";
print "Remember to actually read the README file !\n";
die "\nYou didn't read the README file !\n" unless ($] >= 5.003);

if (! $ENV{POSTGRESHOME}) {
    warn "\$POSTGRESHOME not defined. Searching for Postgres...\n";
    foreach(qw(/usr/pgsql /usr/local/pgsql /usr/pgsql-6.1 /usr/local/pgsql-6.1)) {
        if (-d "$_/lib") {
            $ENV{POSTGRESHOME} = $_;
            last;
        }
    }
}

if ($ENV{POSTGRESHOME}) {
    print "\nFound Postgres in $ENV{POSTGRESHOME}\n";
} else {
    die "Unable to determine \$POSTGRESHOME !\n";
}

WriteMakefile(
    'NAME'	   => 'Pg',
    'VERSION_FROM' => 'Pg.pm',
    'LIBS'	   => ["-L$ENV{POSTGRESHOME}/lib -lpq"],
    'INC'	   =>  "-I$ENV{POSTGRESHOME}/include",
);

# EOF