Hi Mike,
Mike Frysinger wrote:
These are a few fixes from upstream kconfig to get ncurses/gettext support
rolling on non-Linux systems (like Darwin or uClibc w/out locale).
Signed-off-by: Mike Frysinger <[EMAIL PROTECTED]>
Applied.
Thanks
Greg
config/kconfig/Makefile | 4 +++-
config/kconfig/check.sh | 14 ++++++++++++++
config/kconfig/lxdialog/check-lxdialog.sh | 24 +++++++++---------------
3 files changed, 26 insertions(+), 16 deletions(-)
create mode 100755 config/kconfig/check.sh
diff --git a/config/kconfig/Makefile b/config/kconfig/Makefile
index e2d1c21..4ffb09e 100644
--- a/config/kconfig/Makefile
+++ b/config/kconfig/Makefile
@@ -4,11 +4,13 @@
CC = cc
-# lxdialog peices needed locally
+# lxdialog pieces needed locally
check-lxdialog := lxdialog/check-lxdialog.sh
CFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
LDLIBS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(CC))
+CPPFLAGS += $(shell $(CONFIG_SHELL) ./check.sh $(CC) $(CFLAGS) $(LDLIBS))
+
conf-objs := conf.o zconf.tab.o
mconf-objs := mconf.o zconf.tab.o
gconf-objs := gconf.o kconfig_load.o zconf.tab.o
diff --git a/config/kconfig/check.sh b/config/kconfig/check.sh
new file mode 100755
index 0000000..fa59cbf
--- /dev/null
+++ b/config/kconfig/check.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Needed for systems without gettext
+$* -xc -o /dev/null - > /dev/null 2>&1 << EOF
+#include <libintl.h>
+int main()
+{
+ gettext("");
+ return 0;
+}
+EOF
+if [ ! "$?" -eq "0" ]; then
+ echo -DKBUILD_NO_NLS;
+fi
+
diff --git a/config/kconfig/lxdialog/check-lxdialog.sh
b/config/kconfig/lxdialog/check-lxdialog.sh
index 120d624..cdca738 100644
--- a/config/kconfig/lxdialog/check-lxdialog.sh
+++ b/config/kconfig/lxdialog/check-lxdialog.sh
@@ -4,21 +4,15 @@
# What library to link
ldflags()
{
- $cc -print-file-name=libncursesw.so | grep -q /
- if [ $? -eq 0 ]; then
- echo '-lncursesw'
- exit
- fi
- $cc -print-file-name=libncurses.so | grep -q /
- if [ $? -eq 0 ]; then
- echo '-lncurses'
- exit
- fi
- $cc -print-file-name=libcurses.so | grep -q /
- if [ $? -eq 0 ]; then
- echo '-lcurses'
- exit
- fi
+ for ext in so a dylib ; do
+ for lib in ncursesw ncurses curses ; do
+ $cc -print-file-name=lib${lib}.${ext} | grep -q /
+ if [ $? -eq 0 ]; then
+ echo "-l${lib}"
+ exit
+ fi
+ done
+ done
exit 1
}
--
------------------------------------------------------------------------
Greg Ungerer -- Chief Software Dude EMAIL: [EMAIL PROTECTED]
SnapGear -- a Secure Computing Company PHONE: +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev