diff options
author | Robb, Sam <sam.robb@timesys.com> | 2006-02-05 02:28:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-05 14:06:54 -0500 |
commit | 5e375bc7d586e0df971734a5a5f1f080ffd89b68 (patch) | |
tree | 274d5ac5c9bf0e157c67461bd0e609c495e7b2e4 /scripts | |
parent | 4be68a783d25b4dab0ef4077a4c6b13161a2d6e4 (diff) |
[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: Samuel J Robb <sam.robb@timesys.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 5760e057ecba..d64aae85c378 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -123,7 +123,17 @@ KBUILD_HAVE_NLS := $(shell \ | |||
123 | then echo yes ; \ | 123 | then echo yes ; \ |
124 | else echo no ; fi) | 124 | else echo no ; fi) |
125 | ifeq ($(KBUILD_HAVE_NLS),no) | 125 | ifeq ($(KBUILD_HAVE_NLS),no) |
126 | HOSTCFLAGS += -DKBUILD_NO_NLS | 126 | HOSTCFLAGS += -DKBUILD_NO_NLS |
127 | else | ||
128 | KBUILD_NEED_LINTL := $(shell \ | ||
129 | if echo -e "\#include <libintl.h>\nint main(int a, char** b) { gettext(\"\"); return 0; }\n" | \ | ||
130 | $(HOSTCC) $(HOSTCFLAGS) -x c - -o /dev/null> /dev/null 2>&1 ; \ | ||
131 | then echo no ; \ | ||
132 | else echo yes ; fi) | ||
133 | ifeq ($(KBUILD_NEED_LINTL),yes) | ||
134 | HOSTLOADLIBES_conf += -lintl | ||
135 | HOSTLOADLIBES_mconf += -lintl | ||
136 | endif | ||
127 | endif | 137 | endif |
128 | 138 | ||
129 | # generated files seem to need this to find local include files | 139 | # generated files seem to need this to find local include files |