mirror of https://github.com/hak5/openwrt.git
parent
ae4be01207
commit
7a4f8fa7aa
|
@ -4,21 +4,25 @@
|
||||||
# What library to link
|
# What library to link
|
||||||
ldflags()
|
ldflags()
|
||||||
{
|
{
|
||||||
$cc -print-file-name=libncursesw.so | grep -q /
|
for ext in so dylib; do
|
||||||
|
for dir in "" /usr/local/lib /opt/local/lib; do
|
||||||
|
$cc ${dir:+-L$dir} -print-file-name=libncursesw.$ext | grep -q /
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo '-lncursesw'
|
echo $dir '-lncursesw'
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
$cc -print-file-name=libncurses.so | grep -q /
|
$cc ${dir:+-L$dir} -print-file-name=libncurses.$ext | grep -q /
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo '-lncurses'
|
echo $dir '-lncurses'
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
$cc -print-file-name=libcurses.so | grep -q /
|
$cc ${dir:+-L$dir} -print-file-name=libcurses.$ext | grep -q /
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo '-lcurses'
|
echo $dir '-lcurses'
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +33,8 @@ ccflags()
|
||||||
echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
|
echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
|
||||||
elif [ -f /usr/include/ncurses/curses.h ]; then
|
elif [ -f /usr/include/ncurses/curses.h ]; then
|
||||||
echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
|
echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
|
||||||
|
elif [ -f /opt/local/include/ncurses/ncurses.h ]; then
|
||||||
|
echo '-I/opt/local/include/ncurses -DCURSES_LOC="<ncurses/ncurses.h>"'
|
||||||
elif [ -f /usr/include/ncurses.h ]; then
|
elif [ -f /usr/include/ncurses.h ]; then
|
||||||
echo '-DCURSES_LOC="<ncurses.h>"'
|
echo '-DCURSES_LOC="<ncurses.h>"'
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue