Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
94728d10
Commit
94728d10
authored
Apr 17, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add code to test for non-shared libperl and fail gracefully.
Not a big step forward, but it's something...
parent
3d62fbc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
4 deletions
+48
-4
src/pl/plperl/Makefile.PL
src/pl/plperl/Makefile.PL
+48
-4
No files found.
src/pl/plperl/Makefile.PL
View file @
94728d10
...
...
@@ -3,6 +3,31 @@ use ExtUtils::Embed;
use
DynaLoader
;
use
Config
;
#
# Can't build a shared plperl unless libperl is shared too.
# (Actually, it would be enough if code in libperl.a is compiled
# to be position-independent, but that is hard to check for and
# seems pretty unlikely anyway.)
#
if
(
$Config
{'
useshrplib
'}
ne
'
true
')
{
open
(
OUT
,
"
>Makefile
")
or
die
"
Can't write Makefile: $!
\n
";
print
OUT
<<'EndOfMakefile';
# Dummy Makefile for use when we can't build plperl
all install:
@echo "Cannot build plperl because libperl is not a shared library; skipping it."
clean distclean:
rm -f Makefile
.DEFAULT dep depend:
EndOfMakefile
close
(
OUT
);
exit
(
0
);
}
#
# get the location of the Opcode module
#
...
...
@@ -25,9 +50,12 @@ my $opcode = '';
}
my
$perllib
=
"
-L
$Config
{archlibexp}/CORE -lperl
";
my
$dynalib
=
"
$Config
{archlibexp}/auto/DynaLoader/DynaLoader.a
";
WriteMakefile
(
'
NAME
'
=>
'
plperl
',
dynamic_lib
=>
{
'
OTHERLDFLAGS
'
=>
"
$opcode
-L
\
$(LIBPQDIR) -lpq
@{
[
ldopts
()]
}
"
}
,
INC
=>
'
-I$(
LIBPQDIR) -I$(
SRCDIR)/include -I$(SRCDIR)/backend
',
dynamic_lib
=>
{
'
OTHERLDFLAGS
'
=>
"
$opcode
$perllib
$dynalib
"
}
,
INC
=>
'
-I$(SRCDIR)/include -I$(SRCDIR)/backend
',
XS
=>
{
'
SPI.xs
'
=>
'
SPI.c
'
},
OBJECT
=>
'
plperl.o eloglvl.o SPI.o
',
);
...
...
@@ -41,6 +69,24 @@ include $(SRCDIR)/Makefile.global
}
sub
MY
::cflags {
package
MY
;
# so that "SUPER" works right
my
$inherited
=
shift
->
SUPER::
cflags
(
@_
);
#
# Hack for building on HPUX (probably should have a general mechanism
# for system-specific hints, but for now ...)
# The default compiler and flags on this platform is cc -Aa, which
# will reject 'long long' declarations that appear in Postgres headers.
# Need to select -Ae instead.
#
if
(
$
Config::
Config
{'
osname
'}
eq
'
hpux
')
{
$inherited
=~
s/-Aa/-Ae/
;
}
$inherited
;
}
sub
MY
::install {
q[
...
...
@@ -49,5 +95,3 @@ install :: all
]
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment