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 -e " #include CURSES_LOC \n main() {}" |
40 $cc -xc - -o $tmp 2> /dev
/null
42 echo " *** Unable to find the ncurses libraries or the" 1>&2
43 echo " *** required header files." 1>&2
44 echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2
46 echo " *** Install ncurses (ncurses-devel) and try again." 1>&2
53 printf "Usage: $0 [-check compiler options|-header|-library]\n"