aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2009-06-05 18:29:56 +0000
committerAndrew Dunstan <andrew@dunslane.net>2009-06-05 18:29:56 +0000
commit8b78428fc0a6079e5ca8d0e9b50375bd0439e351 (patch)
tree607d0ce8d6746bf73ccc97e34e936a5025def153
parent7aace98bf6ff3c20ec6194ca386efe70765f8697 (diff)
downloadpostgresql-8b78428fc0a6079e5ca8d0e9b50375bd0439e351.tar.gz
postgresql-8b78428fc0a6079e5ca8d0e9b50375bd0439e351.zip
Search for versioned perl library instead of using hardcoded name on Windows. Backpatch to release 8.3
-rw-r--r--src/pl/plperl/GNUmakefile5
-rw-r--r--src/tools/msvc/Mkvcbuild.pm16
2 files changed, 12 insertions, 9 deletions
diff --git a/src/pl/plperl/GNUmakefile b/src/pl/plperl/GNUmakefile
index a0bb140034a..1e27a5d8c26 100644
--- a/src/pl/plperl/GNUmakefile
+++ b/src/pl/plperl/GNUmakefile
@@ -1,5 +1,5 @@
# Makefile for PL/Perl
-# $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.36 2008/10/02 08:11:11 petere Exp $
+# $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.37 2009/06/05 18:29:56 adunstan Exp $
subdir = src/pl/plperl
top_builddir = ../../..
@@ -19,7 +19,8 @@ ifneq (,$(findstring yes, $(shared_libperl)$(allow_nonpic_in_shlib)))
ifeq ($(PORTNAME), win32)
perl_archlibexp := $(subst \,/,$(perl_archlibexp))
perl_privlibexp := $(subst \,/,$(perl_privlibexp))
-perl_embed_ldflags = -L$(perl_archlibexp)/CORE -lperl58
+perl_lib := $(basename $(notdir $(wildcard $(perl_archlibexp)/CORE/perl[5-9]*.lib)))
+perl_embed_ldflags = -L$(perl_archlibexp)/CORE -l$(perl_lib)
override CPPFLAGS += -DPLPERL_HAVE_UID_GID
# Perl on win32 contains /* within comment all over the header file,
# so disable this warning.
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 6b1106288de..b5d965ba677 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -3,7 +3,7 @@ package Mkvcbuild;
#
# Package that generates build files for msvc build
#
-# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.39 2009/04/07 19:35:57 mha Exp $
+# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.40 2009/06/05 18:29:56 adunstan Exp $
#
use Carp;
use Win32;
@@ -104,14 +104,16 @@ sub mkvcbuild
}
}
$plperl->AddReference($postgres);
- if (-e $solution->{options}->{perl} . '\lib\CORE\perl510.lib')
+ my @perl_libs = grep {/perl\d+.lib$/ }
+ glob($solution->{options}->{perl} . '\lib\CORE\perl*.lib');
+ if (@perl_libs == 1)
{
- $plperl->AddLibrary($solution->{options}->{perl} . '\lib\CORE\perl510.lib');
- }
- else
- {
- $plperl->AddLibrary($solution->{options}->{perl} . '\lib\CORE\perl58.lib');
+ $plperl->AddLibrary($perl_libs[0]);
}
+ else
+ {
+ die "could not identify perl library version";
+ }
}
if ($solution->{options}->{python})