summaryrefslogtreecommitdiff
path: root/security/heimdal/patches/patch-lib_libedit_configure
blob: 1c8e08164299e21b00d6e3e11cc318e543cf9898 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
$NetBSD: patch-lib_libedit_configure,v 1.2 2015/07/11 04:26:57 rodent Exp $

Include termcap in the termcap test

--- lib/libedit/configure.orig	2012-12-09 22:09:25.000000000 +0000
+++ lib/libedit/configure
@@ -11603,7 +11603,50 @@ test -n "$NROFF" || NROFF="/bin/false"
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
+$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
+if test "${ac_cv_lib_curses_termcap+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltermcap  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+int
+main ()
+{
+return tgetent ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_termcap_tgetent=yes
+else
+  ac_cv_lib_termcap_tgetent=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
+$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
+if test "x$ac_cv_lib_termcap_tgetent" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBTERMCAP 1
+_ACEOF
+
+  LIBS="-ltermcap $LIBS"
+
+else
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
 $as_echo_n "checking for tgetent in -lcurses... " >&6; }
 if test "${ac_cv_lib_curses_tgetent+set}" = set; then :
@@ -11692,11 +11735,12 @@ _ACEOF
   LIBS="-lncurses $LIBS"
 
 else
-  as_fn_error "libcurses or libncurses are required!" "$LINENO" 5
+  as_fn_error "libtermcap, libcurses or libncurses are required!" "$LINENO" 5
 fi
 
 fi
 
+fi
 
 
 ### use option --enable-widec to turn on use of wide-character support