title: How to compile OpenSSL with relative rpath
body: <p>I have been trying to compile openssl 1.0.0g with the following rpath:</p>
  
  <pre><code>$ORIGIN/../lib64
  </code></pre>
  
  <p>Everytime I <code>readelf -d apps/openssl</code>, I am getting results like the following depending on what escaping variation I tried:</p>
  
  <pre><code>\RIGIN/../lib64
  RIGIN/../lib64
  ORIGIN/../lib64
  </code></pre>
  
  <p>I want to setup my rpath without using external tools like chrpath. Is it at all possible? I will basically accept anything that does not involve using external tools like chrpath (though I would already be done with that). </p>
  
  <p>Ideally, I would like to do it by passing options on the command line (any form of <code>-Wl,-rpath,$ORIGIN/../lib64</code>).</p>
  
  <p>I don't mind editing the generated Makefile, which is what I have been trying last. If only I could get it to print a stupid dollar sign!!! I tried modifying LIBRPATH under the BUILDENV= block with no luck. My best results so far:</p>
  
  <pre><code>LIBRPATH=$$'ORIGIN/../lib64 # result: /../lib64
  LIBRPATH=$$$$'ORIGIN/../lib64 # result: 12345&lt;pid&gt;/../lib64 
  </code></pre>
  
  <p>I have read various rpath related questions and tried various escaping and quoting tricks but nothing worked so far!</p>