$OpenBSD$

Add RPATH to the ELF header for libR, since it is installed in a location
outside the default ld.so search path.

--- Makefile.orig	Tue Aug 30 00:42:56 2011
+++ Makefile	Tue Oct  9 21:48:25 2012
@@ -21,7 +21,7 @@ MODULE_big	= plr
 PG_CPPFLAGS	+= -I$(r_includespec)
 SRCS		+= plr.c pg_conversion.c pg_backend_support.c pg_userfuncs.c pg_rsupport.c
 OBJS		:= $(SRCS:.c=.o)
-SHLIB_LINK	+= -L$(r_libdir1x) -L$(r_libdir2x) -lR
+SHLIB_LINK	+= -L$(r_libdir1x) -L$(r_libdir2x) -Wl,-R$(r_libdir1x) -lR
 DATA_built	= plr.sql
 DATA		= plr--8.3.0.13.sql plr--unpackaged--8.3.0.13.sql
 DOCS		= README.plr
