I am trying to build gnu iconv on OSX as a static library. This is not a problem, it builds fine with
./configure --enable-static
make clean && make
but when I run nm on libiconv.a, I get the following results
...
_libiconv
_libiconv_open_
_libiconv_close_
...
This is problematic, because I want to build libxml2 using this library, and it requires the following symbols
iconv
iconv_open
iconv_close
Looking through the header file, it seems like the difference between these two symbol names is whether LIBICONV_PLUG is defined. But when I run make as
make clean && make CPPFLAGS=-DLIBICONV_PLUG
I get errors because several things are not defined, such as ICONV_GET_DISCARD_ILSEQ and ICONV_SET_HOOKS. Looking through the header file again, these are only defined if LIBICONV_PLUG is not defined.
My question is, am I using LIBICONV_PLUG correctly? Is there some other way to get a static library with the symbols I need? Should I go through the undefined symbols and define them myself by hand?