darcs patch: Fix detection of libiconf.

Ian Lynagh igloo at earth.li
Tue Jun 23 20:10:28 EDT 2009

On Tue, Jun 23, 2009 at 01:47:00PM +0100, Ian Lynagh wrote:
> On Sat, Jun 20, 2009 at 02:29:02PM +0200, Matthias Kilian wrote:
> > Sat Jun 20 14:21:59 CEST 2009  Matthias Kilian <kili at outback.escape.de>
> >   * Fix detection of libiconf.
> >   It's not enough to try to link against libiconv and look for a
> >   symbol iconv_open, because iconv may be installed in a way that
> >   internally renames iconv_foo to libiconv_foo in the library and
> >   adds corresponding #define iconv_foo libiconv_foo to iconv.h.
> >   
> >   This patch is needed on OpenBSD (but it's not enough, since cabal
> >   suffers from the same problem).
> Thanks for the patch; unfortunately, it makes the build fail for me on
> OS X:
> I haven't looked into what's going wrong yet.

OK, there were a number of problems, starting with the C program it
tests not compiling due to NULL not being defined.

Can you try with this instead, and let me know if it works for you please?
And if not, please send me a copy of your config.log and base.buildinfo.

AC_SEARCH_LIBS(iconv_open, iconv,
               [EXTRA_LIBS="$EXTRA_LIBS $ac_lib"],
               [exit 1])


More information about the Libraries mailing list