diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/lxdialog/check-lxdialog.sh | 24 |
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 @@ | |||
4 | # What library to link | 4 | # What library to link |
5 | ldflags() | 5 | ldflags() |
6 | { | 6 | { |
7 | $cc -print-file-name=libncursesw.so | grep -q / | 7 | for ext in so a dylib ; do |
8 | if [ $? -eq 0 ]; then | 8 | for lib in ncursesw ncurses curses ; do |
9 | echo '-lncursesw' | 9 | $cc -print-file-name=lib${lib}.${ext} | grep -q / |
10 | exit | 10 | if [ $? -eq 0 ]; then |
11 | fi | 11 | echo "-l${lib}" |
12 | $cc -print-file-name=libncurses.so | grep -q / | 12 | exit |
13 | if [ $? -eq 0 ]; then | 13 | fi |
14 | echo '-lncurses' | 14 | done |
15 | exit | 15 | done |
16 | fi | ||
17 | $cc -print-file-name=libcurses.so | grep -q / | ||
18 | if [ $? -eq 0 ]; then | ||
19 | echo '-lcurses' | ||
20 | exit | ||
21 | fi | ||
22 | exit 1 | 16 | exit 1 |
23 | } | 17 | } |
24 | 18 | ||