summaryrefslogtreecommitdiffstats
path: root/package/config/lxdialog/check-lxdialog.sh
diff options
context:
space:
mode:
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
}