diff -urN emacs-22.1.org/configure.in emacs-22.1/configure.in --- emacs-22.1.org/configure.in 2007-05-25 14:43:29.000000000 +0200 +++ emacs-22.1/configure.in 2007-06-10 16:55:37.848243540 +0200 @@ -2622,7 +2622,7 @@ # That is because we have not set up to link ncurses in lib-src. # It's better to believe a function is not available # than to expect to find it in ncurses. -AC_CHECK_LIB(ncurses, tparm) +AC_CHECK_LIB(tinfo, tparm) # Do we need the Hesiod library to provide the support routines? if test "$with_hesiod" = yes ; then --- emacs-22.1/src/s/gnu-linux.h.old 2007-06-10 20:13:53.376467108 +0200 +++ emacs-22.1/src/s/gnu-linux.h 2007-06-10 20:17:32.624547726 +0200 @@ -279,9 +279,9 @@ /* Paul Abrahams says this is needed. */ #define LIB_MOTIF -lXm -lXpm -#ifdef HAVE_LIBNCURSES +#ifdef HAVE_LIBTINFO #define TERMINFO -#define LIBS_TERMCAP -lncurses +#define LIBS_TERMCAP -ltinfo #endif #define HAVE_SYSVIPC