spectools-2011.08.1_p20140618-tinfo.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. configure.in | 21 +++++++++++----------
  2. 1 file changed, 11 insertions(+), 10 deletions(-)
  3. diff --git a/configure.in b/configure.in
  4. index a15258c..af4ae57 100644
  5. --- a/configure.in
  6. +++ b/configure.in
  7. @@ -131,22 +131,23 @@ AC_CHECK_LIB([usb], [usb_init], AC_DEFINE(HAVE_LIBUSB, 1, LibUSB) LIBS="$LIBS -l
  8. dnl Look for curses/libcurses
  9. termcontrol="none";
  10. -AC_CHECK_LIB([ncurses], [initscr],
  11. +PKG_CHECK_MODULES([NCURSES], [ncurses], [foundhcurses=yesyes curseaux="${NCURSES_LIBS}" termcontrol="ncurses"], [
  12. + AC_CHECK_LIB([ncurses], [initscr],
  13. AC_DEFINE(HAVE_LIBNCURSES, 1, NCurses terminal lib) \
  14. foundlcurses=yes curseaux="-lncurses" termcontrol="ncurses" )
  15. -if test "$foundlcurses" != "yes"; then
  16. - AC_CHECK_LIB([curses], [initscr],
  17. + if test "$foundlcurses" != "yes"; then
  18. + AC_CHECK_LIB([curses], [initscr],
  19. AC_DEFINE(HAVE_LIBCURSES, 1, Curses terminal lib) \
  20. foundlcurses=yes curseaux="-lcurses" termcontrol="curses" )
  21. -fi
  22. -
  23. -if test "$termcontrol" = "ncurses"; then
  24. - AC_CHECK_HEADER([ncurses.h], [foundhcurses=yes])
  25. -elif test "$termcontrol" = "curses"; then
  26. - AC_CHECK_HEADER([curses.h], [foundhcurses=yes])
  27. -fi
  28. + fi
  29. + if test "$termcontrol" = "ncurses"; then
  30. + AC_CHECK_HEADER([ncurses.h], [foundhcurses=yes])
  31. + elif test "$termcontrol" = "curses"; then
  32. + AC_CHECK_HEADER([curses.h], [foundhcurses=yes])
  33. + fi
  34. +])
  35. if test "$foundhcurses$foundlcurses" != "yesyes"; then
  36. AC_MSG_WARN(*** Could not find curses library. Curses grapher will not be built.)
  37. else