2 # Check ncurses compatibility
7 for ext
in so a dylib
; do
8 for lib
in ncursesw ncurses curses
; do
9 $cc -print-file-name=lib
${lib}.
${ext} |
grep -q /
22 if [ -f /usr
/include
/ncurses
/ncurses.h
]; then
23 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
24 elif [ -f /usr
/include
/ncurses
/curses.h
]; then
25 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
26 elif [ -f /usr
/include
/ncurses.h
]; then
27 echo '-DCURSES_LOC="<ncurses.h>"'
29 echo '-DCURSES_LOC="<curses.h>"'
33 # Temp file, try to clean up after us
35 trap "rm -f $tmp" 0 1 2 3 15
37 # Check if we can link to ncurses
39 echo "main() {}" |
$cc -xc - -o $tmp 2> /dev
/null
41 echo " *** Unable to find the ncurses libraries." 1>&2
42 echo " *** make menuconfig require the ncurses libraries" 1>&2
44 echo " *** Install ncurses (ncurses-devel) and try again" 1>&2
51 printf "Usage: $0 [-check compiler options|-header|-library]\n"