title: can't find lpthread when cross compile to arm
body: <p>this is my current problem. Now I am trying to port a x86 based project to android. But this project need pthread library support, and can't pass configuration stage.</p>
  
  <p>Command:</p>
  
  <pre><code>./configure --build=${BUILD_SYS} --host=arm-eabi  --prefix=${PREFIX} --disable-rpath --disable-libasprintf --disable-java --disable-native-java --disable-openmp --disable-curses
  </code></pre>
  
  <p>Compiler and compile flags:</p>
  
  <pre><code>export CFLAGS="--sysroot=${SYSROOT} -I${SYSROOT}/usr/include -I${PREFIX}/include -I${NDK}/sources/android/support/include -pthread -fPIE -DANDROID -Wno-multichar"
  export CXXFLAGS=${CFLAGS}
  export CPPFLAGS="--sysroot=${SYSROOT} -I${SYSROOT}/usr/include -I${PREFIX}/include -I${NDK}/sources/android/support/include -pthread -DANDROID -DNO_XMALLOC -mandroid"
  export LIBS="-lc -lgcc -lstdc++ -ldl"
  export LDFLAGS="-Wl,-L${SYSROOT}/usr/lib -L${PREFIX}/lib -L${NDK_TOOLCHAIN}/lib"
  </code></pre>
  
  <p>Error Msg:</p>
  
  <pre><code>checking for WIN32... no
  checking for Mac... no
  checking for Linux... compile in linux
  checking for uuid_generate in -luuid... yes
  found library uuid
  checking for pthread_create in -lpthread... no
  configure: error: *** Unable to find pthread library
  </code></pre>
  
  <p>Please help with it: how to attach right flags? <strong>OR</strong> How to cheat to autoconf? <strong>OR</strong> How to cross compile libpthread? <strong>AND</strong> pass the compile finally.</p>