Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit baa2f99

Browse files
committed
Perl fixes from Brook Milligan
1 parent e7663e3 commit baa2f99

File tree

3 files changed

+37
-48
lines changed

3 files changed

+37
-48
lines changed

src/configure.in

+1-11
Original file line numberDiff line numberDiff line change
@@ -246,17 +246,6 @@ AC_ARG_WITH(
246246
[ USE_PERL=false; AC_MSG_RESULT(disabled) ]
247247
)
248248

249-
dnl Verify that postgres is already installed
250-
dnl per instructions for perl interface installation
251-
if test "$USE_PERL" = true
252-
then
253-
if test "$WHOAMI" != "root"
254-
then AC_MSG_WARN(perl support disabled; must be root to install)
255-
USE_PERL=
256-
fi
257-
fi
258-
export USE_PERL
259-
260249
dnl We include odbc support unless we disable it with --with-odbc=false
261250
AC_MSG_CHECKING(setting USE_ODBC)
262251
AC_ARG_WITH(
@@ -902,6 +891,7 @@ AC_OUTPUT(
902891
interfaces/libpgtcl/Makefile
903892
interfaces/odbc/GNUmakefile
904893
interfaces/odbc/Makefile.global
894+
interfaces/perl5/Makefile.PL
905895
pl/plpgsql/src/Makefile
906896
pl/plpgsql/src/mklang.sql
907897
pl/tcl/mkMakefile.tcldefs.sh

src/interfaces/Makefile

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,19 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.16 1998/10/07 06:41:40 thomas Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.17 1998/10/16 04:37:37 momjian Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

1414
SRCDIR= ..
1515
include $(SRCDIR)/Makefile.global
1616

1717

18-
perl-makefile-dep :=
19-
ifeq ($(USE_PERL), true)
20-
perl-makefile-dep := perl5/Makefile
21-
endif
18+
PERL_CLEAN := DO_NOTHING
19+
install: PERL_CLEAN := clean
2220

2321

24-
.DEFAULT all install clean dep depend distclean: $(perl-makefile-dep)
22+
.DEFAULT all install clean dep depend distclean:
2523
$(MAKE) -C libpq $@
2624
$(MAKE) -C ecpg $@
2725
ifeq ($(HAVE_Cplusplus), true)
@@ -33,6 +31,8 @@ ifeq ($(USE_TCL), true)
3331
$(MAKE) -C libpgtcl $@
3432
endif
3533
ifeq ($(USE_PERL), true)
34+
-$(MAKE) -C perl5 $(PERL_CLEAN)
35+
$(MAKE) perl5/Makefile
3636
$(MAKE) -C perl5 $@
3737
endif
3838
ifeq ($(USE_ODBC), true)

src/interfaces/perl5/Makefile.PL

+30-31
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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;
1010
use Config;
1111
use 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

3733
my %opts;
3834

@@ -41,14 +37,17 @@ if (! $ENV{POSTGRES_HOME}) {
4137
my $cwd = `pwd`;
4238
chop $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 = (

0 commit comments

Comments
 (0)