1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 18:35:55 +02:00

fix lxdialog cc/ldflags check script for darwin/osx

git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4864 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2006-09-27 12:20:18 +00:00
parent aa765b43a2
commit 78981f18b8

View File

@ -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
if [ $? -eq 0 ]; then for dir in "" /usr/local/lib /opt/local/lib; do
echo '-lncursesw' $cc ${dir:+-L$dir} -print-file-name=libncursesw.$ext | grep -q /
exit if [ $? -eq 0 ]; then
fi echo $dir '-lncursesw'
$cc -print-file-name=libncurses.so | grep -q / exit
if [ $? -eq 0 ]; then fi
echo '-lncurses' $cc ${dir:+-L$dir} -print-file-name=libncurses.$ext | grep -q /
exit if [ $? -eq 0 ]; then
fi echo $dir '-lncurses'
$cc -print-file-name=libcurses.so | grep -q / exit
if [ $? -eq 0 ]; then fi
echo '-lcurses' $cc ${dir:+-L$dir} -print-file-name=libcurses.$ext | grep -q /
exit if [ $? -eq 0 ]; then
fi echo $dir '-lcurses'
exit
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