title: NDK and iconv.h dependency
body: <p>I'm trying to build a lib with Adroid NDK which depends on iconv.h</p>
  
  <p>This is what I did so far:</p>
  
  <p>I created a project structure like this:</p>
  
  <pre><code>&lt;my_prj&gt;/jni
      - Android.mk
      - Application.mk
  
  &lt;my_prj&gt;/jni/zxing
      - all my lib source files requiring iconv.h
  
  &lt;my_prj&gt;/external/libiconv-1.13.1
      - libiconv sources downloaded from here http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
  </code></pre>
  
  <p>Here is my jni/Android.mk file:</p>
  
  <pre><code>LOCAL_PATH:= $(call my-dir)
  
  include $(CLEAR_VARS)
  LOCAL_MODULE    := libiconv
  
  LOCAL_CFLAGS := \
      -Wno-multichar \
      -D_ANDROID \
      -DLIBDIR="c" \
      -DBUILDING_LIBICONV \
      -DIN_LIBRARY
  
  LOCAL_SRC_FILES := \
      ../external/libiconv-1.13.1/lib/iconv.c \
      ../external/libiconv-1.13.1/libcharset/lib/localcharset.c \
      ../external/libiconv-1.13.1/lib/relocatable.c
  
  LOCAL_C_INCLUDES += \
      ../external/libiconv-1.13.1/include \
      ../external/libiconv-1.13.1/libcharset \
      ../external/libiconv-1.13.1/libcharset/include
  
  include $(BUILD_STATIC_LIBRARY)
  
  include $(CLEAR_VARS) 
  
  LOCAL_MODULE    := libzxing
  LOCAL_SRC_FILES := \
      zxing/DecodeHints.cpp \
      zxing/ReaderException.cpp \
      ...and many more...
  
  LOCAL_C_INCLUDES += \
      ../external/libiconv-1.13.1/include
  
  LOCAL_STATIC_LIBRARIES := libiconv
  
  include $(BUILD_SHARED_LIBRARY)
  </code></pre>
  
  <p>according to this thread: <a href="http://groups.google.com/group/android-ndk/browse_thread/thread/012d679319e4ea6e" rel="nofollow">http://groups.google.com/group/android-ndk/browse_thread/thread/012d679319e4ea6e</a></p>
  
  <p>So, then I run "./configure &amp;&amp; make" from /external/libiconv-1.13.1 in order to generate iconv.h from iconv.h.in</p>
  
  <p>Then I run ndk-build from /jni/zxing</p>
  
  <ul>
  <li>All my zxing now compiles without a problem.</li>
  <li>/external/libiconv-1.13.1/lib/iconv.h compiles as well</li>
  <li><p>Whereas /external/libiconv-1.13.1/libcharset/lib/localcharset.c gives me the following error:</p>
  
  <p>lib/localcharset.c:49:24: error: langinfo.h: No such file or directory</p></li>
  </ul>
  
  <p>My guess is that I did something wrong while doing ./configure &amp;&amp; make on libiconv as the inclusion of "langinfo.h" is conditioned by HAVE_LANGINFO_CODESET defined in libiconv-1.13.1/config.h which in turn comes from libiconv-1.13.1/config.h.in...</p>
  
  <p>BTW, if I force HAVE_LANGINFO_CODESET to 0, then I have others error while compiling localcharset.c</p>
  
  <p>So, I'm out of ideas :(
  Can some one help me please?
  Thanks, Luca.</p>