title: pkg-config: command not found during compile, but pkg-config installed
body: <p><strong>Update:</strong> I got it working, the problem has something to do with the fact that I was running it through emacs. I ran the makefile from the command line instead, and pkg-config ran. After adding the path to guile-2.0.pc with <code>export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig</code> everything compiled and ran OK. Still won't compile through emacs but I don't want to deal with that. </p>
  
  <p>I am trying to compile a C program but received a "pkg-config: command not found" error, but am pretty sure pkg-config is installed. </p>
  
  <p>Below is the MAKEFILE</p>
  
  <pre><code># Use GCC, if you have it installed.
  CC=gcc
  
  # Tell the C compiler where to find &lt;libguile.h&gt;
  CFLAGS=`pkg-config --cflags guile-2.0`
  
  # Tell the linker what libraries to use and where to find them.
  LIBS=`pkg-config --libs guile-2.0`
  
  simple-guile: simple-guile.o
  ${CC} simple-guile.o ${LIBS} -o simple-guile
  
  simple-guile.o: test.c
  ${CC} -c ${CFLAGS} test.c
  </code></pre>
  
  <p>Below is the error message (re: second error, I think if I can resolve this issue the libguile.h file will be found)</p>
  
  <pre><code>make 
  gcc -c `pkg-config --cflags guile-2.0` test.c
  /bin/sh: pkg-config: command not found
  test.c:2:11: fatal error: 'libguile.h' file not found
   #include &lt;libguile.h&gt; 
        ^
  1 error generated.
  make: *** [simple-guile.o] Error 1    
  </code></pre>
  
  <p>I installed pkg-config by </p>
  
  <pre><code>brew install pkg-config
  </code></pre>
  
  <p>Installation appears successful?...</p>
  
  <pre><code>Jeffs-iMac:~ Jeff$ which pkg-config
  /opt/local/bin/pkg-config
  </code></pre>
  
  <p>If it's relevant, this should be the same directory in which guile is located:</p>
  
  <pre><code>Jeffs-iMac:~ Jeff$ which guile
  /opt/local/bin/guile
  </code></pre>
  
  <p>Am using OS X 10.11.3</p>
  
  <p>I tried uninstalling and reinstalling  pkg-config per: <a href="https://stackoverflow.com/questions/23684133/cant-install-rmagick-pkg-config-command-not-found">Can&#39;t install rmagick, pkg-config: command not found</a> </p>
  
  <p>I'm a novice programmer, any help would be greatly appreciated.</p>