Terminal interface: Remove support for the ncurses library.
[pspp] / configure.ac
index b553d2dcd0c2aa200f9c81049248f7dd0de9c903..4b828f8b17e066dc219af5b5883236a2a00ef4fe 100644 (file)
@@ -16,6 +16,7 @@ AM_PROG_CC_C_O
 AC_LIBTOOL_WIN32_DLL
 AC_LIBTOOL_DLOPEN
 AC_PROG_LIBTOOL
+AC_HEADER_TIOCGWINSZ
 PKG_PROG_PKG_CONFIG
 m4_pattern_forbid([PKG_CHECK_MODULES])
 PSPP_CHECK_CLICKSEQUENCE
@@ -273,44 +274,6 @@ PKG_CHECK_MODULES([GSL], [gsl >= 1.13], [],
 
 PSPP_GSL_NEEDS_FGNU89_INLINE
 
-dnl Recent versions of GNU ncurses install the curses header files into
-dnl /usr/include/ncurses, and provide a 'ncurses5-config' program which
-dnl enables us to discover where they are. Earlier versions don't have
-dnl this, so we can't rely on it.  So if ncurses5-config is present,
-dnl we'll trust it to find the right information.  Otherwise, we'll
-dnl try to discover it ourselves.
-dnl To confound things further, Cygwin has decided to rename ncurses5-config
-dnl to ncurses8-config !!!
-AC_ARG_WITH(
-  libncurses, 
-  [AS_HELP_STRING([--without-libncurses], [don't compile in ncurses functions])])
-
-if test x"$with_libncurses" != x"no" ; then
-  if test x"$cross_compiling" != x"yes" ; then
-         AC_CHECK_PROGS([NCURSES_CONFIG], [ncurses5-config ncurses8-config])
-  fi
-  if test x"$NCURSES_CONFIG" = x ; then
-         AC_SEARCH_LIBS([tgetent], [ncurses],
-             [curses_available=yes; AC_CHECK_HEADERS([term.h curses.h],,[curses_available=no])])
-  else
-          old_cflags=$CFLAGS
-          CFLAGS="$CFLAGS `$NCURSES_CONFIG --cflags`"
-         AC_CHECK_HEADERS([term.h curses.h],[curses_available=yes])
-         CFLAGS=$old_cflags
-         if test x"$curses_available" = x"yes" ; then
-          NCURSES_LIBS=`$NCURSES_CONFIG --libs`
-          NCURSES_CFLAGS=`$NCURSES_CONFIG --cflags`
-          AC_SUBST(NCURSES_CFLAGS)
-          AC_SUBST(NCURSES_LIBS)
-          fi
-  fi
-  if test x"$curses_available" = x"yes" ; then
-         AC_DEFINE([LIBNCURSES_USABLE], 1,
-             [Define to 1 if the libncurses is both present and usable.])
-  fi
-  AC_CHECK_HEADERS([termcap.h])
-fi
-
 PSPP_READLINE
 
 dnl Checks for header files.