title: How to create an installation directory variable with autoconf?
body: <p>I am trying to create a global define in config.h for the installation directory of the application. According to <a href="https://www.gnu.org/software/autoconf/manual/autoconf.html#Installation-Directory-Variables" rel="nofollow noreferrer">the Autoconf manual</a>, the <strong>prefix</strong> variable can be used for this purpose. In configure.ac I created a global define with:</p>
  
  <pre><code>AC_DEFINE_UNQUOTED([PROGRAM_DIRECTORY], [${prefix}], [])
  </code></pre>
  
  <p>but config.h is created with:</p>
  
  <pre><code>#define PROGRAM_DIRECTORY NONE
  </code></pre>
  
  <p>I get the same results even if I run configure with:</p>
  
  <pre><code>./configure --prefix=/usr/local
  </code></pre>
  
  <p>I have also tried other variables like bindir.</p>
  
  <p>Is there a variable I can use that will give me information? Or am I going about this in the wrong way?</p>