title: Linux Pam creates static library instead of shared library
body: <p>I am trying to cross compile <a href="http://www.linux-pam.org/" rel="nofollow">Linux PAM</a> for android in the following way </p>
  
  <pre><code>`#!/bin/sh
  # Linux-PAM/build.sh
  
  INSTALL_DIR="`pwd`/out"
  
  export
  PATH="android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin:$PATH"
  export CROSS_COMPILER="$PATH:android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin"
  export SYS_ROOT="android/prebuilts/ndk/current/platforms/android-9/arch-arm" 
  export CC="arm-linux-androideabi-gcc --sysroot=$SYS_ROOT"
  export LD="arm-linux-androideabi-ld"
  export AR="arm-linux-androideabi-ar"
  export RANLIB="arm-linux-androideabi-ranlib"
  export STRIP="arm-linux-androideabi-strip"
  
  mkdir -p $INSTALL_DIR
  ./configure --host=arm-eabi --build=x86_64 --enable-shared --prefix=$INSTALL_DIR LIBS="-lc -lgcc"
  
  make
  make install`
  </code></pre>
  
  <p>The output gives statically built libraries. I want shared libraries. If I compile for linux, it builds shared library by default. But for Android it builds statically. The config.log file has following </p>
  
  <pre><code>configure:3581: arm-linux-androideabi-gcc --sysroot=android/prebuilts/ndk/current/platforms/android-9/arch-arm -v &gt;&amp;5
  Using built-in specs.
  COLLECT_GCC=arm-linux-androideabi-gcc
  COLLECT_LTO_WRAPPER=android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../libexec/gcc/arm-linux-androideabi/4.6.x-google/lto-wrapper
  Target: arm-linux-androideabi
  Configured with: /tmp/android-8532/src/build/../gcc/gcc-4.6/configure --prefix=/usr/local --target=arm-linux-androideabi --host=x86_64-linux-gnu --build=x86_64-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/tmp/android-8532/obj/temp-install --with-mpfr=/tmp/android-8532/obj/temp-install --with-mpc=/tmp/android-8532/obj/temp-install --without-ppl --without-cloog --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared --disable-tls --disable-libitm --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --with-gcc-version=4.6 --with-binutils-version=2.21 --with-gmp-version=4.2.4 --with-mpfr-version=2.4.1 --with-gdb-version=7.3.x --with-arch=armv5te --with-sysroot=/tmp/android-8532/install/sysroot --with-prefix=/tmp/android-8532/install --with-gold-version=2.21 --enable-gold --program-transform-name='s&amp;^&amp;arm-linux-androideabi-&amp;' --enable-gold=default
  
  
  ....
  
  configure:10632: checking if libtool supports shared libraries
  configure:10634: result: no
  configure:10637: checking whether to build shared libraries
  configure:10658: result: no
  </code></pre>
  
  <p>What is going wrong?</p>