summaryrefslogtreecommitdiff
path: root/scripts/kconfig/lxdialog/check-lxdialog.sh
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-21 12:03:04 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-21 12:03:04 -0700
commit080e89270a7bfb7d01fac9a67050f8ac6d6cdd11 (patch)
tree489e467292ca06420e85f185095323efb80c75b7 /scripts/kconfig/lxdialog/check-lxdialog.sh
parent4b85df0419d1fb135d9d845876e8c7ee1393f83c (diff)
parent38bdc32af442b6ab09ed61b8b669072098c95dd2 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix: mm/slab: fix section mismatch warning mm: fix section mismatch warnings init/main: use __init_refok to fix section mismatch kbuild: introduce __init_refok/__initdata_refok to supress section mismatch warnings all-archs: consolidate .data section definition in asm-generic all-archs: consolidate .text section definition in asm-generic kbuild: add "Section mismatch" warning whitelist for powerpc kbuild: make better section mismatch reports on i386, arm and mips kbuild: make modpost section warnings clearer kconfig: search harder for curses library in check-lxdialog.sh kbuild: include limits.h in sumversion.c for PATH_MAX powerpc: Fix the MODALIAS generation in modpost for of devices
Diffstat (limited to 'scripts/kconfig/lxdialog/check-lxdialog.sh')
-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 120d624e672..cdca7388e0f 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
}