diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-06-05 11:43:44 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-06-05 11:43:44 +0000 |
commit | b7a51199bdd351992670e6466d36202c8e70d89a (patch) | |
tree | b9fda86acebfcd59f190b2063e3e7c292c176cb6 /extra/config/lxdialog/check-lxdialog.sh | |
parent | 3afa0348159254528ec5c21829d250899cd76b76 (diff) |
- pull kconfig from 2.6.25.4
It has nicer "-*-" etc hints
Diffstat (limited to 'extra/config/lxdialog/check-lxdialog.sh')
-rwxr-xr-x | extra/config/lxdialog/check-lxdialog.sh | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/extra/config/lxdialog/check-lxdialog.sh b/extra/config/lxdialog/check-lxdialog.sh index df81c4455..62e1e0212 100755 --- a/extra/config/lxdialog/check-lxdialog.sh +++ b/extra/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 } @@ -42,14 +36,16 @@ trap "rm -f $tmp" 0 1 2 3 15 # Check if we can link to ncurses check() { - echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null + echo -e " #include CURSES_LOC \n main() {}" | + $cc -xc - -o $tmp 2> /dev/null if [ $? != 0 ]; then - echo " *** Unable to find the ncurses libraries." 1>&2 - echo " *** make menuconfig require the ncurses libraries" 1>&2 - echo " *** " 1>&2 - echo " *** Install ncurses (ncurses-devel) and try again" 1>&2 - echo " *** " 1>&2 - exit 1 + echo " *** Unable to find the ncurses libraries or the" 1>&2 + echo " *** required header files." 1>&2 + echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2 + echo " *** " 1>&2 + echo " *** Install ncurses (ncurses-devel) and try again." 1>&2 + echo " *** " 1>&2 + exit 1 fi } |