From 696cbd224b4f78b99b8fc34538867303a8a922fc Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 28 Apr 2017 15:45:46 +0200 Subject: patch 8.0.0587: configure check for return value of tgetent skipped Problem: Configure check for return value of tgetent is skipped. Solution: Always perform the check. (Marvin Schmidt, closes #1664) --- src/configure.ac | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'src/configure.ac') diff --git a/src/configure.ac b/src/configure.ac index cdf39b3a96..d424550483 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -3355,10 +3355,9 @@ if test "x$vim_cv_terminfo" = "xyes" ; then AC_DEFINE(TERMINFO) fi -if test "x$olibs" != "x$LIBS"; then - AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent], - [ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ +AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent], + [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include "confdefs.h" #ifdef HAVE_TERMCAP_H # include @@ -3369,18 +3368,17 @@ if test "x$olibs" != "x$LIBS"; then #endif main() {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); } - ]])],[ - vim_cv_tgent=zero - ],[ - vim_cv_tgent=non-zero - ],[ - AC_MSG_ERROR(failed to compile test program.) - ]) + ]])],[ + vim_cv_tgent=zero + ],[ + vim_cv_tgent=non-zero + ],[ + AC_MSG_ERROR(failed to compile test program.) ]) - - if test "x$vim_cv_tgent" = "xzero" ; then - AC_DEFINE(TGETENT_ZERO_ERR, 0) - fi + ]) + +if test "x$vim_cv_tgent" = "xzero" ; then + AC_DEFINE(TGETENT_ZERO_ERR, 0) fi AC_MSG_CHECKING(whether termcap.h contains ospeed) -- cgit v1.2.3