aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac12
-rw-r--r--src/terminfo.c6
2 files changed, 3 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 89b0785d031..48e96529ff2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4366,18 +4366,6 @@ TERMCAP_OBJ=tparam.o
4366if test $TERMINFO = yes; then 4366if test $TERMINFO = yes; then
4367 AC_DEFINE(TERMINFO, 1, [Define to 1 if you use terminfo instead of termcap.]) 4367 AC_DEFINE(TERMINFO, 1, [Define to 1 if you use terminfo instead of termcap.])
4368 TERMCAP_OBJ=terminfo.o 4368 TERMCAP_OBJ=terminfo.o
4369 AC_CACHE_CHECK([whether $LIBS_TERMCAP library defines BC],
4370 [emacs_cv_terminfo_defines_BC],
4371 [OLD_LIBS=$LIBS
4372 LIBS="$LIBS $LIBS_TERMCAP"
4373 AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern char *BC;]], [[return !*BC;]])],
4374 [emacs_cv_terminfo_defines_BC=yes],
4375 [emacs_cv_terminfo_defines_BC=no])
4376 LIBS=$OLD_LIBS])
4377 if test "$emacs_cv_terminfo_defines_BC" = yes; then
4378 AC_DEFINE([TERMINFO_DEFINES_BC], 1, [Define to 1 if the
4379 terminfo library defines the variables BC, PC, and UP.])
4380 fi
4381fi 4369fi
4382if test "X$LIBS_TERMCAP" = "X-lncurses"; then 4370if test "X$LIBS_TERMCAP" = "X-lncurses"; then
4383 AC_DEFINE(USE_NCURSES, 1, [Define to 1 if you use ncurses.]) 4371 AC_DEFINE(USE_NCURSES, 1, [Define to 1 if you use ncurses.])
diff --git a/src/terminfo.c b/src/terminfo.c
index a9c9572bbb2..15aff317f15 100644
--- a/src/terminfo.c
+++ b/src/terminfo.c
@@ -23,10 +23,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
23 23
24/* Define these variables that serve as global parameters to termcap, 24/* Define these variables that serve as global parameters to termcap,
25 so that we do not need to conditionalize the places in Emacs 25 so that we do not need to conditionalize the places in Emacs
26 that set them. But don't do that if terminfo defines them, as that 26 that set them. But don't do that for terminfo, as that could
27 could cause link errors when using -fno-common. */ 27 cause link errors when using -fno-common. */
28 28
29#ifndef TERMINFO_DEFINES_BC 29#if !TERMINFO
30char *UP, *BC, PC; 30char *UP, *BC, PC;
31#endif 31#endif
32 32