diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-08-27 07:39:57 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-08-27 07:39:57 +0000 |
commit | f3d1e213fef45ba2df4090e9cd02217d1ef82f00 (patch) | |
tree | 6d464a52c841d35da82fa24b2fad4e179756f478 | |
parent | b522d6931d16e9e8ef41fe8d9f23035ccf53270c (diff) | |
download | busybox-w32-f3d1e213fef45ba2df4090e9cd02217d1ef82f00.tar.gz busybox-w32-f3d1e213fef45ba2df4090e9cd02217d1ef82f00.tar.bz2 busybox-w32-f3d1e213fef45ba2df4090e9cd02217d1ef82f00.zip |
- pull check-lxdialog from linux-2.6.26
-rw-r--r-- | scripts/kconfig/lxdialog/check-lxdialog.sh | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh index 9e277b1c7..260743f01 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 | #bbox# exit 1 | 16 | #bbox# exit 1 |
23 | echo '-lcurses' | 17 | echo '-lcurses' |
24 | exit | 18 | exit |
@@ -44,14 +38,18 @@ trap "rm -f $tmp" 0 1 2 3 15 | |||
44 | 38 | ||
45 | # Check if we can link to ncurses | 39 | # Check if we can link to ncurses |
46 | check() { | 40 | check() { |
47 | echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null | 41 | $cc -xc - -o $tmp 2>/dev/null <<'EOF' |
42 | #include CURSES_LOC | ||
43 | main() {} | ||
44 | EOF | ||
48 | if [ $? != 0 ]; then | 45 | if [ $? != 0 ]; then |
49 | echo " *** Unable to find the ncurses libraries." 1>&2 | 46 | echo " *** Unable to find the ncurses libraries or the" 1>&2 |
50 | echo " *** make menuconfig require the ncurses libraries" 1>&2 | 47 | echo " *** required header files." 1>&2 |
51 | echo " *** " 1>&2 | 48 | echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2 |
52 | echo " *** Install ncurses (ncurses-devel) and try again" 1>&2 | 49 | echo " *** " 1>&2 |
53 | echo " *** " 1>&2 | 50 | echo " *** Install ncurses (ncurses-devel) and try again." 1>&2 |
54 | exit 1 | 51 | echo " *** " 1>&2 |
52 | exit 1 | ||
55 | fi | 53 | fi |
56 | } | 54 | } |
57 | 55 | ||
@@ -59,7 +57,7 @@ usage() { | |||
59 | printf "Usage: $0 [-check compiler options|-header|-library]\n" | 57 | printf "Usage: $0 [-check compiler options|-header|-library]\n" |
60 | } | 58 | } |
61 | 59 | ||
62 | if [ $# == 0 ]; then | 60 | if [ $# -eq 0 ]; then |
63 | usage | 61 | usage |
64 | exit 1 | 62 | exit 1 |
65 | fi | 63 | fi |