2 # Check ncurses compatibility
7 for ext
in so dylib
; do
8 for dir
in "" /usr
/local
/lib
/opt
/local
/lib
; do
9 $cc ${dir:+-L$dir} -print-file-name=libncursesw.
$ext |
grep -q /
11 echo $dir '-lncursesw'
14 $cc ${dir:+-L$dir} -print-file-name=libncurses.
$ext |
grep -q /
19 $cc ${dir:+-L$dir} -print-file-name=libcurses.
$ext |
grep -q /
32 if [ -f /usr
/include
/ncurses
/ncurses.h
]; then
33 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
34 elif [ -f /usr
/include
/ncurses
/curses.h
]; then
35 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
36 elif [ -f /opt
/local
/include
/ncurses
/ncurses.h
]; then
37 echo '-I/opt/local/include -I/opt/local/include/ncurses -DCURSES_LOC="<ncurses/ncurses.h>"'
38 elif [ -f /usr
/include
/ncurses.h
]; then
39 echo '-DCURSES_LOC="<ncurses.h>"'
41 echo '-DCURSES_LOC="<curses.h>"'
45 # Temp file, try to clean up after us
47 trap "rm -f $tmp" 0 1 2 3 15
49 # Check if we can link to ncurses
51 echo "main() {}" |
$cc -xc - -o $tmp 2> /dev
/null
53 echo " *** Unable to find the ncurses libraries." 1>&2
54 echo " *** make menuconfig require the ncurses libraries" 1>&2
56 echo " *** Install ncurses (ncurses-devel) and try again" 1>&2
63 printf "Usage: $0 [-check compiler options|-header|-library]\n"
This page took 0.0482590000000001 seconds and 5 git commands to generate.