summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-05-17 21:06:31 +0200
committerSam Ravnborg <sam@ravnborg.org>2007-05-19 09:11:15 +0200
commit03c9587d752669a12fd553b0cbd835f77b176607 (patch)
tree61ef236f889d500987239340870448124d874e40 /scripts/kconfig
parentkbuild: include limits.h in sumversion.c for PATH_MAX (diff)
downloadlinux-03c9587d752669a12fd553b0cbd835f77b176607.tar.xz
linux-03c9587d752669a12fd553b0cbd835f77b176607.zip
kconfig: search harder for curses library in check-lxdialog.sh
The check-lxdialog.sh script searches for "libFOO.so" which fails on OS X, due to their special naming of libraries like "libfoo.dylib". This patch turns the curses lib search into extensible loops and adds dylib as a valid extension. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/lxdialog/check-lxdialog.sh24
1 files changed, 9 insertions, 15 deletions
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
index 120d624e672c..cdca7388e0f1 100644
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/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
}