
On Tuesday 31 May 2011 16:04:28, Simon Marlow wrote:
That's very mysterious. Perhaps bfd_init doesn't pull in anything that has the libz dependency, and you have to call some other function in the bfd library instead.
Not having a better idea, I replaced bfd_init in the AC_CHECK_LIB with bfd_uncompress_section_contents, because that one definitely pulls in the libz dependency. And it worked for me™. Without libbfd-version.so symlinked to libbfd.so, the test failed to link, hence there was no #define HAVE_LIBBFD 1 written to confdefs.h, no link failures due to the libz dependency in the testsuite. With the symlink, the test linked, #define HAVE_LIBBFD 1 was written to confdefs.h, no link failures due to the libz dependency in the testsuite. Unless there's a reason that change would break things elsewhere, it'd be a simple fix. Cheers, Daniel