Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 4.2.4 failure on MacOS X



On Thu, 3 Feb 2005, Peter Stephenson wrote:

> > gcc -Wl,-x   -o zsh main.o  `cat stamp-modobjs`   -L/sw/lib -lpcre -ldl
> > -ltinfo -lm  -lc
> > ld: Undefined symbols:
> > _libiconv
> > _libiconv_close
> > _libiconv_open
>
> Another possibility:  this error doesn't show the headers, and we now
> attempt to compile in the iconv stuff if the headers only were found:
>
> #   if defined(HAVE_ICONV_H) || defined(HAVE_ICONV) || defined(HAVE_LIBICONV)
>
> Peter, are the tests for HAVE_ICONV_H really necessary on Cygwin?
> Shouldn't HAVE_LIBICONV be defined from the test you added?

Not really, but it did make sense at the time.  You can't compile without
the header, and you can't link without the library, so both must be
present in some form or another.  It's assumed that if the header is
present the function is available.  The question is what library contains
it?  Under Cygwin, the header was available, but the detection of the
library had to be change because the real function name was 'libiconv',
not 'iconv'.  It's possible for iconv to be contained in a different
library under a different name, so perhaps configure should search a few
more places to find in (maybe using the AC_SEARCH_LIBS macro)?  Can
someone who's got a Mac OS-X environment determine what libraries contain
iconv (and where)?  Or is this a matter of the header exists but the
function doesn't?  I'm not sure how one would safe guard against this
without having some really ugly #if statements, or have it as a configure
option.

-- 
Peter A. Castro <doctor@xxxxxxxxxxxx> or <Peter.Castro@xxxxxxxxxx>
	"Cats are just autistic Dogs" -- Dr. Tony Attwood



Messages sorted by: Reverse Date, Date, Thread, Author