check for both curses and ncurses

This commit is contained in:
Duncan Laurie 2004-11-11 19:07:45 +00:00
parent 4edd58a744
commit 848646514c

View File

@ -211,17 +211,16 @@ fi
AC_SUBST(IPMITOOL_INTF_LIB)
dnl check for readline library to enable ipmi shell
have_readline=no
AC_SEARCH_LIBS([readline], [readline], [have_readline=yes],
[AC_CHECK_LIB([readline], [readline],
[have_readline=yes], [], [-lcurses])])
AC_ARG_ENABLE([ipmishell],
[AC_HELP_STRING([--enable-ipmishell],
[enable IPMI shell interface [default=yes]])],
[], [enable_ipmishell=yes])
if test "x$enable_ipmishell" = "xyes" && test "x$have_readline" = "xyes"; then
AC_DEFINE(HAVE_READLINE, [1], [Define to 1 if readline present.])
LIBS="$LIBS -lcurses -lreadline"
if test "x$enable_ipmishell" = "xyes"; then
AC_SEARCH_LIBS([initscr], [curses ncurses], [have_curses=yes])
AC_SEARCH_LIBS([readline], [readline], [have_readline=yes])
if test "x$have_curses" = "xyes" && test "x$have_readline" = "xyes"; then
AC_DEFINE(HAVE_READLINE, [1], [Define to 1 if readline present.])
fi
fi
dnl enable IPMI Event Daemon