aboutsummaryrefslogtreecommitdiff
blob: 7cd6165ab480fe05b49654bfd8c8fa7e17284c0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Fix runtime failure if built with separate tinfo library.
https://bugs.gentoo.org/459458

--- emacs-23.4-orig/configure.in
+++ emacs-23.4/configure.in
@@ -2391,7 +2391,13 @@
 # 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_SEARCH_LIBS(tparm, [ncurses tinfo],
+  [AC_DEFINE(HAVE_LIBNCURSES, 1,
+    [Define to 1 if you have the ncurses or tinfo library.])])
+if test "$ac_cv_search_tparm" = "-ltinfo"; then
+  LIBS_TINFO="-ltinfo"
+fi
+AC_SUBST(LIBS_TINFO)
 
 case "$opsys" in
   netbsd)
--- emacs-23.4-orig/src/Makefile.in
+++ emacs-23.4/src/Makefile.in
@@ -919,7 +919,7 @@
    with GCC, we might need gnulib again after them.  */
 
 LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \
-   LIBGPM LIBRESOLV LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
+   LIBGPM LIBRESOLV LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP @LIBS_TINFO@ \
    LIBS_DEBUG $(GETLOADAVG_LIBS) ${GCONF_LIBS} \
    @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \
    $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)