mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
kconfig: search harder for curses library in check-lxdialog.sh
The check-lxdialog.sh script searches for "libFOO.so" which fails on OS X, due to their special naming of libraries like "libfoo.dylib". This patch turns the curses lib search into extensible loops and adds dylib as a valid extension. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
fc31c77163
commit
03c9587d75
1 changed files with 9 additions and 15 deletions
|
@ -4,21 +4,15 @@
|
||||||
# What library to link
|
# What library to link
|
||||||
ldflags()
|
ldflags()
|
||||||
{
|
{
|
||||||
$cc -print-file-name=libncursesw.so | grep -q /
|
for ext in so a dylib ; do
|
||||||
|
for lib in ncursesw ncurses curses ; do
|
||||||
|
$cc -print-file-name=lib${lib}.${ext} | grep -q /
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo '-lncursesw'
|
echo "-l${lib}"
|
||||||
exit
|
|
||||||
fi
|
|
||||||
$cc -print-file-name=libncurses.so | grep -q /
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo '-lncurses'
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
$cc -print-file-name=libcurses.so | grep -q /
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo '-lcurses'
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue