   endif
   
 + ifeq ($(OS_ARCH),Linux)
-+ MKSHLIB += -Wl,-rpath,\$$ORIGIN
++ MKSHLIB += -Wl,-rpath,\$$ORIGIN:\$$ORIGIN/../ure-link/lib
 + endif
 + 
   ifeq ($(OS_ARCH),SunOS)

  	DSO_LDOPTS += -m64
  endif
  	DSO_LDOPTS += -shared -h $(notdir $@)
+     DSO_LDOPTS += -Wl,-rpath,\$$ORIGIN
  else
  ifeq ($(USE_64), 1)
  	ifeq ($(OS_TEST),i86pc)

      MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
      DSO_CFLAGS=-fPIC
      DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+     DSO_LDOPTS="$DSO_LDOPTS -Wl,-rpath,'$\$ORIGIN:$\$ORIGIN/../ure-link/lib'"
      OS_LIBS="$OS_LIBS -lc"
      _OPTIMIZE_FLAGS=-O2
      _DEBUG_FLAGS="-g -fno-inline"  # most people on linux use gcc/gdb, and that
