summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane1998-10-18 02:36:48 +0000
committerTom Lane1998-10-18 02:36:48 +0000
commit8ccf86bf32d72c2b8f234ee328caf79966f5df9c (patch)
tree7230f9f549ff2c3d00f964c5f5306bd553d44112
parent164510289e7765d276734783898fb4b04c3f3461 (diff)
Still another round of Perl-module installation tweaks.
Now, src/interfaces/perl5/Makefile.PL is pretty simple, and instead we work a little harder in src/interfaces/Makefile.
-rw-r--r--src/interfaces/perl5/Makefile.PL (renamed from src/interfaces/perl5/Makefile.PL.in)20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/interfaces/perl5/Makefile.PL.in b/src/interfaces/perl5/Makefile.PL
index 115203ede33..147c0bd1e45 100644
--- a/src/interfaces/perl5/Makefile.PL.in
+++ b/src/interfaces/perl5/Makefile.PL
@@ -1,6 +1,6 @@
#-------------------------------------------------------
#
-# $Id: Makefile.PL.in,v 1.1 1998/10/16 05:58:22 momjian Exp $
+# $Id: Makefile.PL,v 1.14 1998/10/18 02:36:48 tgl Exp $
#
# Copyright (c) 1997, 1998 Edmund Mergl
#
@@ -14,19 +14,33 @@ my %opts;
if (! $ENV{POSTGRES_HOME}) {
+ # Check that we actually are inside the Postgres source tree
+ if (! -d "../libpq") {
+ die
+"To install Pg separately from the Postgres distribution,
+you must set environment variable POSTGRES_HOME to point to
+where Postgres is installed (often /usr/local/pgsql).\n";
+ }
+
+ # Setup for build/test inside a Postgres source tree
+
+ # Perl may complain if path to libpq isn't absolute
my $cwd = `pwd`;
chop $cwd;
%opts = (
NAME => 'Pg',
VERSION_FROM => 'Pg.pm',
- INC => "-I$cwd/../libpq -I$cwd/../../include",
+ INC => "-I../libpq -I../../include",
OBJECT => "Pg\$(OBJ_EXT)",
- LIBS => ["-L@prefix@/lib -L$cwd/../libpq -lpq"],
+ LIBS => ["-L$cwd/../libpq -lpq"],
);
} else {
+ # Setup for final install of Pg using an already-installed libpq,
+ # or for standalone installation when Postgres already is installed.
+
%opts = (
NAME => 'Pg',
VERSION_FROM => 'Pg.pm',