diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-11-30 20:59:15 +0000 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-11-30 20:59:15 +0000 |
commit | 145d0cad94d23ba3482107008efe13a0b6a7f573 (patch) | |
tree | 02070bcf4ec8c0eabe81240742f9238f02cc904c /kconfig/lxdialog | |
parent | d09d633fb225fd9230ce118c1ed006e27a3f802c (diff) | |
download | crosstool-ng-145d0cad94d23ba3482107008efe13a0b6a7f573.tar.gz crosstool-ng-145d0cad94d23ba3482107008efe13a0b6a7f573.tar.bz2 crosstool-ng-145d0cad94d23ba3482107008efe13a0b6a7f573.zip |
Make the kconfig stuff build under Cygwin.
/trunk/kconfig/kconfig.mk | 7 5 2 0 ++++--
/trunk/kconfig/lxdialog/check-lxdialog.sh | 44 21 23 0 ++++++++++++++++++-------------------
2 files changed, 26 insertions(+), 25 deletions(-)
Diffstat (limited to 'kconfig/lxdialog')
-rw-r--r-- | kconfig/lxdialog/check-lxdialog.sh | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/kconfig/lxdialog/check-lxdialog.sh b/kconfig/lxdialog/check-lxdialog.sh index e4d8adc3..5552154c 100644 --- a/kconfig/lxdialog/check-lxdialog.sh +++ b/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 } @@ -42,14 +36,18 @@ 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 - if [ $? -ne 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 + $cc -xc - -o $tmp 2>/dev/null <<'EOF' +#include CURSES_LOC +main() {} +EOF + if [ $? != 0 ]; then + 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 } |