summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-09-02 17:23:38 +0200
committerBruno Haible <bruno@clisp.org>2022-09-02 17:23:38 +0200
commit81a15cc38fc95171b3c2b93ddcdf33b6092add7f (patch)
tree61fd7f45d7f09d9f52cb906f6b8f24e56a8d9ec5
parent5064550361cdc26eb2c7aa069da1bedea211f50f (diff)
downloadgnulib-81a15cc38fc95171b3c2b93ddcdf33b6092add7f.tar.gz
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.
-rw-r--r--ChangeLog6
-rw-r--r--m4/terminfo.m412
2 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c181a2af1..948f7c79a6 100644
--- 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-30 Paul Eggert <eggert@cs.ucla.edu>
fnmatch: fix stdckdint typo
diff --git a/m4/terminfo.m4 b/m4/terminfo.m4
index e923518540..7daa4d5513 100644
--- a/m4/terminfo.m4
+++ b/m4/terminfo.m4
@@ -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"
])