summaryrefslogtreecommitdiff
path: root/package/config/lxdialog/check-lxdialog.sh
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-09-23 14:06:59 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-09-23 14:06:59 +0000
commit0d888e3677d9cd501c6b87f634d9bb8f13de581f (patch)
treec9abe1ce50c34b4610732bbeb4c7e2d0335e9861 /package/config/lxdialog/check-lxdialog.sh
parente640e6a8ef197f712237668bf7c8a9b89fa01310 (diff)
- pull kbuild from 2.6.22.7. This should fix the ncurses detection for dylib et al
Diffstat (limited to 'package/config/lxdialog/check-lxdialog.sh')
-rw-r--r--package/config/lxdialog/check-lxdialog.sh24
1 files changed, 9 insertions, 15 deletions
diff --git a/package/config/lxdialog/check-lxdialog.sh b/package/config/lxdialog/check-lxdialog.sh
index 120d624e6..cdca7388e 100644
--- a/package/config/lxdialog/check-lxdialog.sh
+++ b/package/config/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
}