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