RE: [PATCH] kconfig: detect if -lintl is needed when linking conf,mconf

From: Robb, Sam
Date: Thu Feb 09 2006 - 12:26:06 EST




Kyle McMartin <kyle@xxxxxxxxxxxxxxxx> wrote:
> On Mon, Jan 30, 2006 at 01:26:47PM -0500, Robb, Sam wrote:
> > This patch attempts to correct the problem by detecting whether or not
> > NLS support requires linking with libintl.
> >
>
> Sigh. Can everyone please stop assuming gcc can output to /dev/null? On
> several platforms, ld tries to lseek in the output file, and fails if it
> can't.

Ouch. Out of curiosity - what is the reason for this behavior in ld?

> Is there any reason this problem can't be solved the same way it is
> for libcurses in menuconfig, by using gcc -print-filename? Or perhaps
> using tempfile?

Using -print-file-name may cause problems if a system has libintl installed,
and the C library provides libintl support as well - you end up detecting
libintl, but linking to it isn't a good idea in that case. Not to mention
figuring out which libintl to link to - static lib? .so? .dll (cygwin)?

Using a tempfile sounds like the right solution - you want to detect if
linking with -lintl is absolutely required, not just if the library exists.

Sam Ravenborg mentioned reimplementing this using check-lxdialog.sh. I'll
wait and see what comes of that.

BTW - many thanks to all the folks who looked at this (admittedly trivial)
patch. There's a level of professionalism and attention to detail in the
Linux community that's very refrehing.

-Samrobb
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/