title: apache2 build fails in yocto - "/usr/local/include" is unsafe for cross-compilation [-Wpoison-system-directories]
body: <p>I was trying to build <code>apache2</code> on yocto.
  But I was getting below errors.</p>
  
  <blockquote>
    <p>ERROR: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
    Rerun configure task after fixing this.</p>
  </blockquote>
  
  <p>Some googling led me to 
  <a href="https://lists.yoctoproject.org/pipermail/yocto/2012-March/005125.html" rel="nofollow">https://lists.yoctoproject.org/pipermail/yocto/2012-March/005125.html</a></p>
  
  <p>So I looked into <code>conf.log</code> and find out those lines:</p>
  
  <pre><code>cc1: warning: include location "/usr/local/include" is unsafe for
  cross-compilation [-Wpoison-system-directories]
  
  arm-poky-linux-gnueabi/4.9.2/ld: warning: library search path "/usr/local/lib" 
  is unsafe for cross-compilation
  </code></pre>
  
  <p>I googled again but, I couldn't understand 3 things yet:</p>
  
  <ol>
  <li>Why has the PATH been set to local path ?</li>
  <li>Why does this error only come when building <code>apache2</code> [ I can build <code>ngnix</code>, <code>cryptsetup</code>, etc..]</li>
  <li>How can I fix it?</li>
  </ol>