From bcddc2a1d6090c3f5e542dbe947448cdc4033a9a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 17 May 2007 15:06:31 -0400 Subject: [PATCH] --- yaml --- r: 56720 b: refs/heads/master c: 03c9587d752669a12fd553b0cbd835f77b176607 h: refs/heads/master v: v3 --- [refs] | 2 +- .../kconfig/lxdialog/check-lxdialog.sh | 24 +++++++------------ 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index e5605f169d23..a7004861064c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fc31c7716355a226b8ed4e16f4581e5c8fa53570 +refs/heads/master: 03c9587d752669a12fd553b0cbd835f77b176607 diff --git a/trunk/scripts/kconfig/lxdialog/check-lxdialog.sh b/trunk/scripts/kconfig/lxdialog/check-lxdialog.sh index 120d624e672c..cdca7388e0f1 100644 --- a/trunk/scripts/kconfig/lxdialog/check-lxdialog.sh +++ b/trunk/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 }