title: compiling opencore-amr for ios5 using Xcode4.2: no include path in which to search for limits.h
body: <p>I'm trying to compile a static library for the <a href="http://sourceforge.net/projects/opencore-amr/" rel="nofollow">opencore-amr</a> project to use in ios.  My setup is Xcode4.2 / iOS5 sdk (since I'm still running Snow Leopard).  I've tweaked the build script attached <a href="http://sourceforge.net/mailarchive/message.php?msg_id=28298963" rel="nofollow">here</a> to use -isysroot instead of --sysroot, and updated the SDK var to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk</p>
  
  <p>This fails in the config checks at this point:</p>
  
  <pre><code>checking how to run the C preprocessor... /lib/cpp
  configure: error: in `/Users/ldwong/Documents/xcode/opencore-amr-0.1.3':
  configure: error: C preprocessor "/lib/cpp" fails sanity check
  </code></pre>
  
  <p>according to my config.log, the first failure during this check is in finding limits.h:</p>
  
  <pre><code>configure:7965: checking how to run the C preprocessor
  configure:7996: gcc -arch armv6 -isysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -E  conftest.c
  In file included from conftest.c:12:
  /Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/../lib/gcc/arm-apple-darwin10/4.2.1/include/limits.h:15:25: error: no include path in which to search for limits.h
  configure:7996: $? = 1
  configure: failed program was:
  ...
  </code></pre>
  
  <p>and farther down it also fails to find assert.h with this command:</p>
  
  <pre><code>configure:7996: gcc -arch armv6 -isysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -E -traditional-cpp  conftest.c
  conftest.c:14: error: assert.h: No such file or directory
  </code></pre>
  
  <p>Can anyone point out what I'm missing or doing wrong?  Thanks!</p>