提交 e0b7a42b 编写于 作者: J Juan Quintela 提交者: Anthony Liguori

simplify curses library selection

Signed-off-by: NJuan Quintela <quintela@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 b2266bee
...@@ -1099,8 +1099,6 @@ fi # -z $brlapi ...@@ -1099,8 +1099,6 @@ fi # -z $brlapi
# curses probe # curses probe
if test "$curses" = "yes" ; then if test "$curses" = "yes" ; then
curses=no
ncurses=no
cat > $TMPC << EOF cat > $TMPC << EOF
#include <curses.h> #include <curses.h>
#ifdef __OpenBSD__ #ifdef __OpenBSD__
...@@ -1109,10 +1107,11 @@ if test "$curses" = "yes" ; then ...@@ -1109,10 +1107,11 @@ if test "$curses" = "yes" ; then
int main(void) { resize_term(0, 0); return curses_version(); } int main(void) { resize_term(0, 0); return curses_version(); }
EOF EOF
if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lncurses > /dev/null 2> /dev/null ; then if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lncurses > /dev/null 2> /dev/null ; then
curses=yes curses_libs="-lncurses"
ncurses=yes
elif $cc $ARCH_CFLAGS -o $TMPE $TMPC -lcurses > /dev/null 2> /dev/null ; then elif $cc $ARCH_CFLAGS -o $TMPE $TMPC -lcurses > /dev/null 2> /dev/null ; then
curses=yes curses_libs="-lcurses"
else
curses=no
fi fi
fi # test "$curses" fi # test "$curses"
...@@ -1654,11 +1653,7 @@ fi ...@@ -1654,11 +1653,7 @@ fi
if test "$curses" = "yes" ; then if test "$curses" = "yes" ; then
echo "#define CONFIG_CURSES 1" >> $config_host_h echo "#define CONFIG_CURSES 1" >> $config_host_h
echo "CONFIG_CURSES=y" >> $config_host_mak echo "CONFIG_CURSES=y" >> $config_host_mak
if test "$ncurses" = "yes" ; then echo "CURSES_LIBS=$curses_libs" >> $config_host_mak
echo "CURSES_LIBS=-lncurses" >> $config_host_mak
else
echo "CURSES_LIBS=-lcurses" >> $config_host_mak
fi
fi fi
if test "$atfile" = "yes" ; then if test "$atfile" = "yes" ; then
echo "#define CONFIG_ATFILE 1" >> $config_host_h echo "#define CONFIG_ATFILE 1" >> $config_host_h
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册