提交 5e375bc7 编写于 作者: R Robb, Sam 提交者: Linus Torvalds

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

On a system where libintl.h is present, but the NLS functionality is
supplied by a separate library instead of the system C library, an attempt
to "make config" or "make menuconfig" will fail with link errors, ex:

  scripts/kconfig/mconf.o:mconf.c:(.text+0xf63): undefined reference to
    `_libintl_gettext'

This patch attempts to correct the problem by detecting whether or not NLS
support requires linking with libintl.
Signed-off-by: NSamuel J Robb <sam.robb@timesys.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 4be68a78
......@@ -123,7 +123,17 @@ KBUILD_HAVE_NLS := $(shell \
then echo yes ; \
else echo no ; fi)
ifeq ($(KBUILD_HAVE_NLS),no)
HOSTCFLAGS += -DKBUILD_NO_NLS
HOSTCFLAGS += -DKBUILD_NO_NLS
else
KBUILD_NEED_LINTL := $(shell \
if echo -e "\#include <libintl.h>\nint main(int a, char** b) { gettext(\"\"); return 0; }\n" | \
$(HOSTCC) $(HOSTCFLAGS) -x c - -o /dev/null> /dev/null 2>&1 ; \
then echo no ; \
else echo yes ; fi)
ifeq ($(KBUILD_NEED_LINTL),yes)
HOSTLOADLIBES_conf += -lintl
HOSTLOADLIBES_mconf += -lintl
endif
endif
# generated files seem to need this to find local include files
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册