Skip to content

Commit

Permalink
kconfig: search harder for curses library in check-lxdialog.sh
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vapier authored and sravnborg committed May 19, 2007
1 parent fc31c77 commit 03c9587
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions scripts/kconfig/lxdialog/check-lxdialog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,15 @@
# What library to link
ldflags()
{
$cc -print-file-name=libncursesw.so | grep -q /
if [ $? -eq 0 ]; then
echo '-lncursesw'
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
fi
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
echo "-l${lib}"
exit
fi
done
done
exit 1
}

Expand Down

0 comments on commit 03c9587

Please sign in to comment.