<<< Date Index >>>     <<< Thread Index >>>

Re: [PATCH] Fix for OpenSolaris libidn



* David Champion wrote on Wed, Apr 23, 2008 at 07:49:11PM CEST:
> > Please don't use 'test -a'.
> 
> I don't know why not, but whatever.  I just want the problem fixed.

Not a big issue, but not totally portable.

> > Also, what when SunOS 5.12 comes out?
> > Wouldn't a check such as
> >   AC_CHECK_HEADERS([idn/idn-int.h],
> >     [CPPFLAGS="$CPPFLAGS -I/usr/include/idn"])
> > 
> > be better?
> 
> When 5.12 comes out we'll see whether SunOS still has this issue.  I
> think it's a Solaris bug, personally.
> 
> I chose not to propose your solution because it might break builds where
> /usr/include/idn exists, but the builder prefers to use a different
> installation of libidn.  Perhaps not, but it's a risk I didn't want to
> be responisble for.

Good point, thanks.  You could limit it to the case that causes you
headaches:

# On SunOS 5.12, idn/idna.h includes <idn-int.h>
# which is then not found unless we add the include path.
# Check only if not another LIBIDN path was chosen.
if test "$with_idn" = "yes"; then
  AC_CHECK_HEADERS([idn/idn-int.h],
    [AC_CHECK_HEADERS([idn/idna.h], [],
        [CPPFLAGS="$CPPFLAGS -I/usr/include/idn"])])
fi

Untested.

Cheers,
Ralf