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 $cc -xc - -o $tmp 2>/dev
/null
<<'EOF'
44 echo " *** Unable to find the ncurses libraries or the" 1>&2
45 echo " *** required header files." 1>&2
46 echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2
48 echo " *** Install ncurses (ncurses-devel) and try again." 1>&2
55 printf "Usage: $0 [-check compiler options|-header|-library]\n"