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 /
22 $cc -print-file-name=libncursesw.dylib | grep -q /
27 $cc -print-file-name=libncurses.dylib | grep -q /
32 $cc -print-file-name=libcurses.dylib | grep -q /
43 if [ -f /usr/include/ncurses/ncurses.h ]; then
44 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
45 elif [ -f /usr/include/ncurses/curses.h ]; then
46 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
47 elif [ -f /usr/include/ncurses.h ]; then
48 echo '-DCURSES_LOC="<ncurses.h>"'
50 echo '-DCURSES_LOC="<curses.h>"'
54 # Temp file, try to clean up after us
56 trap "rm -f $tmp" 0 1 2 3 15
58 # Check if we can link to ncurses
60 echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null
62 echo " *** Unable to find the ncurses libraries." 1>&2
63 echo " *** make menuconfig require the ncurses libraries" 1>&2
65 echo " *** Install ncurses (ncurses-devel) and try again" 1>&2
72 printf "Usage: $0 [-check compiler options|-header|-library]\n"