changeset 32184:dab4de13e332

Simplify termcap check.
author diego
date Thu, 16 Sep 2010 14:39:40 +0000
parents 6f84ff0fa2d8
children 26e3bf13985e
files configure
diffstat 1 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Thu Sep 16 14:38:50 2010 +0000
+++ b/configure	Thu Sep 16 14:39:40 2010 +0000
@@ -3762,15 +3762,10 @@
 
 echocheck "termcap"
 if test "$_termcap" = auto ; then
-  cat > $TMPC <<EOF
-#include <stddef.h>
-#include <term.h>
-int main(void) { tgetent(NULL, NULL); return 0; }
-EOF
   _termcap=no
   for _ld_tmp in "-lncurses" "-ltinfo" "-ltermcap"; do
-    cc_check $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" \
-      && _termcap=yes && break
+    function_check term.h 'tgetent(0, 0)' $_ld_tmp &&
+      extra_ldflags="$extra_ldflags $_ld_tmp" && _termcap=yes && break
   done
 fi
 if test "$_termcap" = yes ; then