mirror of
https://github.com/sheumann/hush.git
synced 2025-01-03 00:31:16 +00:00
- pull check-lxdialog from linux-2.6.26
This commit is contained in:
parent
b522d6931d
commit
f3d1e213fe
@ -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
|
||||||
#bbox# exit 1
|
#bbox# exit 1
|
||||||
echo '-lcurses'
|
echo '-lcurses'
|
||||||
exit
|
exit
|
||||||
@ -44,12 +38,16 @@ trap "rm -f $tmp" 0 1 2 3 15
|
|||||||
|
|
||||||
# Check if we can link to ncurses
|
# Check if we can link to ncurses
|
||||||
check() {
|
check() {
|
||||||
echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null
|
$cc -xc - -o $tmp 2>/dev/null <<'EOF'
|
||||||
|
#include CURSES_LOC
|
||||||
|
main() {}
|
||||||
|
EOF
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo " *** Unable to find the ncurses libraries." 1>&2
|
echo " *** Unable to find the ncurses libraries or the" 1>&2
|
||||||
echo " *** make menuconfig require the ncurses libraries" 1>&2
|
echo " *** required header files." 1>&2
|
||||||
|
echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2
|
||||||
echo " *** " 1>&2
|
echo " *** " 1>&2
|
||||||
echo " *** Install ncurses (ncurses-devel) and try again" 1>&2
|
echo " *** Install ncurses (ncurses-devel) and try again." 1>&2
|
||||||
echo " *** " 1>&2
|
echo " *** " 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -59,7 +57,7 @@ usage() {
|
|||||||
printf "Usage: $0 [-check compiler options|-header|-library]\n"
|
printf "Usage: $0 [-check compiler options|-header|-library]\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $# == 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user