mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
e74dd00f53
To avoid the sorts of problems complained of by Jakob Egger, it'd be best if configure didn't emit any references to the sysroot path at all. In the case of PL/Tcl, we can do that just by keeping our hands off the TCL_INCLUDE_SPEC string altogether. In the case of PL/Perl, we need to substitute -iwithsysroot for -I in the compile commands, which is easily handled if we change to using a configure output variable that includes the switch not only the directory name. Since PL/Tcl and PL/Python already do it like that, this seems like good consistency cleanup anyway. Hence, this replaces the advice given to Perl-related extensions in commit 5e2217131; instead of writing "-I$(perl_archlibexp)/CORE", they should just write "$(perl_includespec)". (The old way continues to work, but not on recent macOS.) It's still the case that configure needs to be aware of the sysroot path internally, but that's cleaner than what we had before. As before, back-patch to all supported versions. Discussion: https://postgr.es/m/20840.1537850987@sss.pgh.pa.us
40 lines
1.1 KiB
Makefile
40 lines
1.1 KiB
Makefile
# contrib/jsonb_plperl/Makefile
|
|
|
|
MODULE_big = jsonb_plperl
|
|
OBJS = jsonb_plperl.o $(WIN32RES)
|
|
PGFILEDESC = "jsonb_plperl - jsonb transform for plperl"
|
|
|
|
PG_CPPFLAGS = -I$(top_srcdir)/src/pl/plperl
|
|
|
|
EXTENSION = jsonb_plperlu jsonb_plperl
|
|
DATA = jsonb_plperlu--1.0.sql jsonb_plperl--1.0.sql
|
|
|
|
REGRESS = jsonb_plperl jsonb_plperlu
|
|
|
|
SHLIB_LINK += $(filter -lm, $(LIBS))
|
|
|
|
ifdef USE_PGXS
|
|
PG_CONFIG = pg_config
|
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
|
include $(PGXS)
|
|
else
|
|
subdir = contrib/jsonb_plperl
|
|
top_builddir = ../..
|
|
include $(top_builddir)/src/Makefile.global
|
|
include $(top_srcdir)/contrib/contrib-global.mk
|
|
endif
|
|
|
|
# We must link libperl explicitly
|
|
ifeq ($(PORTNAME), win32)
|
|
# these settings are the same as for plperl
|
|
override CPPFLAGS += -DPLPERL_HAVE_UID_GID -Wno-comment
|
|
# ... see silliness in plperl Makefile ...
|
|
SHLIB_LINK_INTERNAL += $(sort $(wildcard ../../src/pl/plperl/libperl*.a))
|
|
else
|
|
rpathdir = $(perl_archlibexp)/CORE
|
|
SHLIB_LINK += $(perl_embed_ldflags)
|
|
endif
|
|
|
|
# As with plperl we need to include the perl_includespec directory last.
|
|
override CPPFLAGS := $(CPPFLAGS) $(perl_embed_ccflags) $(perl_includespec)
|