[techtalk] Pg.pm and variables

Lilly S. lilly at shellyeah.org
Thu Jun 22 19:12:38 EST 2000


Hi y'all...

Was wondering if someone can help me.

I'm trying to compile the pg.pm module for Postgres. Whenever I say "perl
Makefile.pl" it yells back at me:

Configuring Pg
Remember to actually read the README file !
please set environment variables POSTGRES_INCLUDE and POSTGRES_LIB !

Which is actually an error, because I don't have my variables set.
So, being the good sport that I am, I try to go into Makefile.PL and see
these variables:

# $Id: Makefile.PL,v 1.15 2000/04/04 19:08:46 mergl Exp $

use ExtUtils::MakeMaker;
use Config;
use strict;

print "Configuring Pg\n";
print "Remember to actually read the README file !\n";

my $POSTGRES_INCLUDE;
my $POSTGRES_LIB;

if ((!$ENV{POSTGRES_INCLUDE} or !$ENV{POSTGRES_LIB}) and
!$ENV{POSTGRES_HOME}) {
    die "please set environment variables POSTGRES_INCLUDE and
POSTGRES_LIB !\n";
} elsif ((!$ENV{POSTGRES_INCLUDE} or !$ENV{POSTGRES_LIB}) and
$ENV{POSTGRES_HOME}) {
    $POSTGRES_INCLUDE = "$ENV{POSTGRES_HOME}/include";
    $POSTGRES_LIB     = "$ENV{POSTGRES_HOME}/lib";
} else {
    $POSTGRES_INCLUDE = "$ENV{POSTGRES_INCLUDE}";
    $POSTGRES_LIB     = "$ENV{POSTGRES_LIB}";

Aha... I'm supposed to define something. I found where my include and
libraries are. They're at /usr/local/pgsql/lib/libpq.so and
/usr/local/pgsql/include/libpq-fe.h

Where do I define these variables? 

Thanks!

Lilly






More information about the Techtalk mailing list