This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Fix libcpp configury/portability issue
Mark Kettenis <kettenis@gnu.org> writes:
> Hmm, well, the real problem seems to be that on this particular
> machine, GNU libiconv is installed in /usr/local. For some reasone
> AM_ICONV decides to look for libiconv in /usr/local/lib (which is not
> in the standard library search path on this machine). Since it finds
> libiconv there, it decides to #define HAVE_ICONV. However it fails to
> find iconv.h so it doesn't define HAVE_ICONV_H, and things go downhill
> from there.
>
> Now why is iconv.h not found. Well, the system compiler on OpenBSD
> (and presumably NetBSD and FreeBSD) doesn't have /usr/local/include in
> its default search path. Since AM_ICONV doesn't explicitly look in
> /usr/local/include it misses the iconv.h there.
I see this as an orthogonal problem, which should be fixed by making
AM_ICONV look in /usr/local/include. I've seen this directory layout
on several other systems, and the configure scripts have never gotten
it right. (You can probably work around the bug by giving configure
the switch --with-libiconv-prefix=/usr/local.)
zw