|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
#-------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# $Id: Makefile.PL,v 1.9 1998/09/27 19:12:21 mergl Exp $
|
|
|
|
|
# $Id: Makefile.PL,v 1.10 1998/10/16 04:37:38 momjian Exp $
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 1997, 1998 Edmund Mergl
|
|
|
|
|
#
|
|
|
|
@ -10,29 +10,25 @@ use ExtUtils::MakeMaker; |
|
|
|
|
use Config; |
|
|
|
|
use strict; |
|
|
|
|
|
|
|
|
|
# because the perl5 interface is always contained in the source tree,
|
|
|
|
|
# we can be sure about the location of the include files and libs.
|
|
|
|
|
# For development and testing we still test for POSTGRES_HOME.
|
|
|
|
|
# This Makefile.PL is intended for standalone use when PostgreSQL is
|
|
|
|
|
# already installed. In that case, install the perl module as follows:
|
|
|
|
|
#
|
|
|
|
|
#print "\nConfiguring Pg\n";
|
|
|
|
|
#print "Remember to actually read the README file !\n";
|
|
|
|
|
#die "\nYou didn't read the README file !\n" unless ($] >= 5.002);
|
|
|
|
|
#
|
|
|
|
|
#if (! $ENV{POSTGRES_HOME}) {
|
|
|
|
|
# warn "\$POSTGRES_HOME not defined. Searching for PostgreSQL...\n";
|
|
|
|
|
# foreach(qw(../../../ /usr/local/pgsql /usr/pgsql /home/pgsql /opt/pgsql /usr/local/postgres /usr/postgres /home/postgres /opt/postgres)) {
|
|
|
|
|
# if (-d "$_/lib") {
|
|
|
|
|
# $ENV{POSTGRES_HOME} = $_;
|
|
|
|
|
# last;
|
|
|
|
|
# }
|
|
|
|
|
# }
|
|
|
|
|
#}
|
|
|
|
|
#
|
|
|
|
|
#if (-d "$ENV{POSTGRES_HOME}/lib") {
|
|
|
|
|
# print "Found PostgreSQL in $ENV{POSTGRES_HOME}\n";
|
|
|
|
|
#} else {
|
|
|
|
|
# die "Unable to determine PostgreSQL\n";
|
|
|
|
|
#}
|
|
|
|
|
# setenv POSTGRES_HOME /path/to/root/of/installed/postgres
|
|
|
|
|
# perl Makefile.PL
|
|
|
|
|
# make
|
|
|
|
|
# make test
|
|
|
|
|
# make install
|
|
|
|
|
|
|
|
|
|
# During normal installation of PostgreSQL, this file will be replaced
|
|
|
|
|
# by one derived from Makefile.PL.in so that the installed shared
|
|
|
|
|
# library libpq.so will be found during installation of this module.
|
|
|
|
|
# As a result, the POSTGRES_HOME environment variable need not be set
|
|
|
|
|
# during PostgreSQL installation. Note that ../Makefile takes care of
|
|
|
|
|
# the `perl Makefile.PL' command. Note also that it is still possible
|
|
|
|
|
# to follow the standalone installation procedure, even after
|
|
|
|
|
# configuring and installing PostgreSQL, because the `else'
|
|
|
|
|
# conditional branch below is identical in both Makefile.PL and
|
|
|
|
|
# Makefile.PL.in.
|
|
|
|
|
|
|
|
|
|
my %opts; |
|
|
|
|
|
|
|
|
@ -41,13 +37,16 @@ if (! $ENV{POSTGRES_HOME}) { |
|
|
|
|
my $cwd = `pwd`;
|
|
|
|
|
chop $cwd;
|
|
|
|
|
|
|
|
|
|
%opts = (
|
|
|
|
|
NAME => 'Pg',
|
|
|
|
|
VERSION_FROM => 'Pg.pm',
|
|
|
|
|
INC => "-I$cwd/../libpq -I$cwd/../../include",
|
|
|
|
|
OBJECT => "Pg\$(OBJ_EXT)",
|
|
|
|
|
LIBS => ["-L$cwd/../libpq -lpq"],
|
|
|
|
|
);
|
|
|
|
|
print "To install the perl interface for PostgreSQL do the following:\n";
|
|
|
|
|
print " - install PostgreSQL\n";
|
|
|
|
|
print " - set the POSTGRES_HOME environment variable appropriately\n";
|
|
|
|
|
print " - in this directory ($cwd):\n";
|
|
|
|
|
print " perl Makefile.PL\n";
|
|
|
|
|
print " make\n";
|
|
|
|
|
print " make test [ with a postmaster running ]\n";
|
|
|
|
|
print " make install\n";
|
|
|
|
|
|
|
|
|
|
exit(1);
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|