From: Bruno Haible Date: Fri, 2 Sep 2022 15:23:38 +0000 (+0200) Subject: terminfo: Don't disturb the termcap module. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=86d808a8fdf6b33a6c56daf6ff746f80d9439d32;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 2b02d654c1..f07e939717 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2022-09-02 Bruno Haible + + 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 tempname: don't lose entropy in seed 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" ])