2 # Check ncurses compatibility
7 $cc -print-file-name=libncursesw.so | grep -q /
12 $cc -print-file-name=libncurses.so | grep -q /
17 $cc -print-file-name=libcurses.so | grep -q /
30 if [ -f /usr/include/ncurses/ncurses.h ]; then
31 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
32 elif [ -f /usr/include/ncurses/curses.h ]; then
33 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
34 elif [ -f /usr/include/ncurses.h ]; then
35 echo '-DCURSES_LOC="<ncurses.h>"'
37 echo '-DCURSES_LOC="<curses.h>"'
41 # Temp file, try to clean up after us
43 trap "rm -f $tmp" 0 1 2 3 15
45 # Check if we can link to ncurses
47 echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null
49 echo " *** Unable to find the ncurses libraries." 1>&2
50 echo " *** make menuconfig require the ncurses libraries" 1>&2
52 echo " *** Install ncurses (ncurses-devel) and try again" 1>&2
59 printf "Usage: $0 [-check compiler options|-header|-library]\n"