cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Can't disable libidn with --without-libidn

From: Krzysztof Kowalczyk <kkowalczyk_at_gmail.com>
Date: Mon, 6 Nov 2006 14:18:06 -0800

On 11/6/06, Dan Fandrich <dan_at_coneharvesters.com> wrote:
> On Sat, Nov 04, 2006 at 09:04:16AM +0100, Daniel Stenberg wrote:
> > On Fri, 3 Nov 2006, Krzysztof Kowalczyk wrote:
> > >Correction to my previous e-mail: the problem really is because both
> > >src/config.h and lib/config.h #define HAVE_LIBIDN, even when
> > >--without-libidn is specifically given. Sorry about my confusion about
> > >HAVE_TLD_H.
> > >
> > >I checked yet another version (7.15.5) and this one doesn't have this
> > >problem.
> >
> > I can't recall any configure changes in those areas that should've changed
> > the behaviour since 7.15.5!
>
> I use --without-libidn regularly and have never seen a problem. The sources
> use the USE_LIBIDN macro to turn on/off IDN support, so the existence
> of HAVE_LIBIDN doesn't on its own prove much.

Yes, but USE_LIBIDN is set if HAVE_LIBIDN is set and tld.h is present.
See lib\setup.h:
#if defined(HAVE_LIBIDN) && defined(HAVE_TLD_H)
/* The lib was present and the tld.h header (which is missing in libidn 0.3.X
  but we only work with libidn 0.4.1 or later) */
#define USE_LIBIDN
#endif

Also, the question, in your case, is if idn support is really
disabled. If --wihout-libidn doesn't disable idn support but libidn.so
is present on your system, then you won't see the problem. It only
manifests itself if libidn.so is not there. One way to verify whether
libcurl.so links to libidn.so is to ldd libcurl.so. Or just check
config.h and see if HAVE_LIBIDN is defined after configure step.

It's also possible that on some systems tld.h is not present, which
would also disable idn support. I should have mentioned that I'm using
Ubuntu 6.10 that does have tld.h

I still think there's a bug in ./configure that #defines HAVE_LIBIDN
even if --without-libidn is given, but I can't track it down or fix it
(at least in the near future) because all I know about auto* tools is
what they're supposed to do but not how they work.

-- kjk
Received on 2006-11-06