diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2009-06-24 12:29:11 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-06-29 08:52:51 -0500 |
commit | ab4e5602a88402fdf7109e5093cace35a7471699 (patch) | |
tree | 4fec30f61998c9559d7a8157c6573cb2c421916e | |
parent | fc57bc57804807925b0f9a063ce9367318d013c3 (diff) |
Prefer ncurses over curses
Not every distro provides libcurses anymore, at least OpenSUSE, and at
least under a standard library search path. So try to link against
standard ncurses first and then fall back to legacy curses.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rwxr-xr-x | configure | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1078,6 +1078,7 @@ fi # -z $brlapi if test "$curses" = "yes" ; then curses=no + ncurses=no cat > $TMPC << EOF #include <curses.h> #ifdef __OpenBSD__ @@ -1085,7 +1086,10 @@ if test "$curses" = "yes" ; then #endif int main(void) { resize_term(0, 0); return curses_version(); } EOF - if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lcurses > /dev/null 2> /dev/null ; then + if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lncurses > /dev/null 2> /dev/null ; then + curses=yes + ncurses=yes + elif $cc $ARCH_CFLAGS -o $TMPE $TMPC -lcurses > /dev/null 2> /dev/null ; then curses=yes fi fi # test "$curses" @@ -1735,7 +1739,11 @@ fi if test "$curses" = "yes" ; then echo "#define CONFIG_CURSES 1" >> $config_h echo "CONFIG_CURSES=yes" >> $config_mak - echo "CURSES_LIBS=-lcurses" >> $config_mak + if test "$ncurses" = "yes" ; then + echo "CURSES_LIBS=-lncurses" >> $config_mak + else + echo "CURSES_LIBS=-lcurses" >> $config_mak + fi fi if test "$atfile" = "yes" ; then echo "#define CONFIG_ATFILE 1" >> $config_h |