This is the year 2019, and OpenSSL may have changed a bit, so I will describe how I solved this problem, with the odd probability that someone else might find this useful (and in case I ever need to find out again this argument command line).
I wanted to build OpenSSL in such a way that it would cross-compile (using Docker containers, because I deal with weirdly old Linux kernels, but modern compilers), but provided an installation that did not depend on absolute paths, as it would in The case using rpath, as I saw, is described in the answer here.
I found that I can run the OpenSSL Configure script in such a way as to achieve what I want (from the bash prompt):
./Configure linux-x86 zlib shared -Wl,-rpath=\\\$\$ORIGIN/../lib
This causes the generated Makefile to create executable files and shared objects so that the loader looks for dependencies first in "./../lib" (relative to the location of the executable or shared object), then in LD_LIBRARY_PATH, etc. This stupid character combination goes right through the bash command line, script, and Makefile combinations to create the -rpath argument as required by the linker ($ ORIGIN /../ lib).
(Obviously, choose other options that make sense to you ... the key here is in -Wl,-rpath=\\\$\$ORIGIN/../lib
).
So, if I called. / Configure with the prefix '--prefix = / opt / spiffness', and later decided to rename 'spiffness' to 'guttersnipe', everything will work correctly, since the paths are more likely relative than absolute,
I did not try to pass the argument to. / config to see if it works there, since my use case was a bit special, but I suspect it will. If I did not try to cross-compile with dockerized containers, I would prefer to use. / config for. / Configure, since it works decently enough to examine the current environment to see which binaries to create.
I hope this is helpful.