index 68528530417438ad6c055782efe68dad4988befe..a84b2f96eb609a8f66fc906ab60a3146acd2d85f 100644 (file)
endef
# platform-specific environment variable to set shared library path
-define ld_library_path_var
-$(if $(filter $(PORTNAME),darwin),DYLD_LIBRARY_PATH,$(if $(filter $(PORTNAME),aix),LIBPATH,$(if $(filter $(PORTNAME),hpux),SHLIB_PATH,LD_LIBRARY_PATH)))
-endef
-
-define with_temp_install
-PATH="$(abs_top_builddir)/tmp_install$(bindir):$$PATH" $(call add_to_path,$(ld_library_path_var),$(abs_top_builddir)/tmp_install$(libdir))
-endef
+# individual ports can override this later, this is the default name
+ld_library_path_var = LD_LIBRARY_PATH
+
+# with_temp_install_extra is for individual ports to define if they
+# need something more here. If not defined then the expansion does
+# nothing.
+with_temp_install = \
+ PATH="$(abs_top_builddir)/tmp_install$(bindir):$$PATH" \
+ $(call add_to_path,$(strip $(ld_library_path_var)),$(abs_top_builddir)/tmp_install$(libdir)) \
+ $(with_temp_install_extra)
ifeq ($(enable_tap_tests),yes)
index 0f6c0289384d579ef68d50aac7325d91abb7bcfc..ba3695dd5702e4bce414202b55a873bfbc04c3b5 100644 (file)
LDFLAGS_SL += -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE
endif
+# env var name to use in place of LD_LIBRARY_PATH
+ld_library_path_var = LIBPATH
+
POSTGRES_IMP= postgres.imp
index e2b1d44959f90ec7693f71c22d5f6412dbbc7c4c..b17598f0586e0d19777bc5e66f421f9528592b62 100644 (file)
DLSUFFIX = .so
+# env var name to use in place of LD_LIBRARY_PATH
+ld_library_path_var = DYLD_LIBRARY_PATH
+
ifdef PGXS
BE_DLLLIBS = -bundle_loader $(bindir)/postgres
else
index ce03c8dcd26b1da0108220d7df3c243812659a34..98a6f50615eecdaddf6bf52e1161559fd2703e92 100644 (file)
CFLAGS_SL = -fPIC -DPIC
+# extra stuff for $(with_temp_install)
+# we need this to get LD_LIBRARY_PATH searched ahead of the compiled-in
+# rpath, if no DT_RUNPATH is present in the executable. The conditions
+# under which DT_RUNPATH are added seem unpredictable, so be safe.
+
+define with_temp_install_extra
+LD_LIBRARY_PATH_RPATH=1
+endef
# Rule for building a shared library from a single .o file
%.so: %.o
index 30dd3eb77e673b8cc728e43c98b724f980512eab..c871fb0c7ef60ff77ad85bcfb872a25889b91be3 100644 (file)
CFLAGS_SL = +Z
endif
+# env var name to use in place of LD_LIBRARY_PATH
+ld_library_path_var = SHLIB_PATH
+
# Rule for building a shared library from a single .o file
%$(DLSUFFIX): %.o
ifeq ($(GCC), yes)