]> Savannah Git Hosting - gnulib.git/commitdiff
terminfo: Don't disturb the termcap module.
authorBruno Haible <bruno@clisp.org>
Fri, 2 Sep 2022 15:23:38 +0000 (17:23 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 2 Sep 2022 23:01:22 +0000 (01:01 +0200)
* m4/terminfo.m4 (gl_TERMINFO_BODY): Save and restore the variables
determined by the gl_TERMCAP_BODY macro.

ChangeLog
m4/terminfo.m4

index 2b02d654c1dc33511e0a13b071dfe72308948059..f07e93971702cde6f3f34dba20a1edb7e8323db7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-09-02  Bruno Haible  <bruno@clisp.org>
+
+       terminfo: Don't disturb the termcap module.
+       * m4/terminfo.m4 (gl_TERMINFO_BODY): Save and restore the variables
+       determined by the gl_TERMCAP_BODY macro.
+
 2022-08-22  Paul Eggert  <eggert@cs.ucla.edu>
 
        tempname: don't lose entropy in seed
index e9235185402c5879201df844e2ff3ebc3a885a32..7daa4d5513db93470fdd5fb8b6263d1869fea721 100644 (file)
@@ -1,4 +1,4 @@
-# terminfo.m4 serial 4
+# terminfo.m4 serial 5
 dnl Copyright (C) 2000-2022 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -45,6 +45,11 @@ AC_DEFUN([gl_TERMINFO_BODY],
   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
   AC_REQUIRE([AC_LIB_RPATH])
 
+  dnl Avoid disturbing the gl_TERMCAP_BODY macro.
+  gl_save_LIBTERMCAP="$LIBTERMCAP"
+  gl_save_LTLIBTERMCAP="$LTLIBTERMCAP"
+  gl_save_INCTERMCAP="$INCTERMCAP"
+
   if test "$gl_curses_allowed" != no; then
 
     dnl Search for libncurses and define LIBNCURSES, LTLIBNCURSES and INCNCURSES
@@ -398,4 +403,9 @@ AC_DEFUN([gl_TERMINFO_BODY],
       LIBS="$gl_save_LIBS"
     ])
   fi
+
+  dnl Avoid disturbing the gl_TERMCAP_BODY macro.
+  LIBTERMCAP="$gl_save_LIBTERMCAP"
+  LTLIBTERMCAP="$gl_save_LTLIBTERMCAP"
+  INCTERMCAP="$gl_save_INCTERMCAP"
 ])