The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Article Feedback - PostgreSQL and Perl
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Still Confius
Author: Mohd Iqbal mohsin 
Date:   28-03-02 04:25

Is this right I set variable....



# $Id: Makefile.PL,v 1.22 1999/09/29 20:30:23 mergl Exp $

use ExtUtils::MakeMaker;
use Config;
use strict;
use DBI 1.00;
use DBI::DBD;


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


my $POSTGRES_INCLUDE='/usr/local/pgsql/include';
my $POSTGRES_LIB='/usr/local/pgsql/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}";
}

my $os = $^O;
print "OS: $os\n";

my $dbi_arch_dir;
if ($os eq 'MSWin32') {
$dbi_arch_dir = "\$(INSTALLSITEARCH)/auto/DBI";
} else {
$dbi_arch_dir = dbd_dbi_arch_dir();
}

my %opts = (
NAME => 'DBD::Pg',
VERSION_FROM => 'Pg.pm',
INC => "-I$POSTGRES_INCLUDE -I$dbi_arch_dir",
OBJECT => "Pg\$(OBJ_EXT) dbdimp\$(OBJ_EXT)",
LIBS => ["-L$POSTGRES_LIB -lpq"],
AUTHOR => 'Edmund Mergl (E.Mergl@bawue.de)',
ABSTRACT => 'PostgreSQL database driver for the DBI module',
);

if ($os eq 'hpux') {
my $osvers = $Config{osvers};
if ($osvers < 10) {
print "Warning: Forced to build static not dynamic on $os $osvers.\a\n";
$opts{LINKTYPE} = 'static';
}
}

if ($Config{dlsrc} =~ /dl_none/) {
$opts{LINKTYPE} = 'static';
}


WriteMakefile(%opts);

exit(0);

# end of Makefile.PL

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 Still Confius   new
Mohd Iqbal mohsin 28-03-02 04:25 
 Re: Still Confius   new
Dan Langille 28-03-02 06:06 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org