summaryrefslogtreecommitdiffstats
path: root/debian/patches/05prefer-libtinfo-over-libcurses.patch
blob: b634900c2cf9a3a01420d4ccd48bcb18bdc2e36d (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
Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?filename=0001-Prefer-libtinfo-over-libcurses.patch;att=1;msg=14;bug=819789
From: Sven Joachim <svenjoac@gmx.de>
Date: Sat, 2 Apr 2016 13:31:00 +0200
Subject: Prefer libtinfo over libcurses
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819789
Forwarded: no

Try to link with -ltinfo before -lcurses to avoid a spurious
dependency on systems where ncurses is built with "--with-termlib".
---
 configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/configure.ac
+++ b/configure.ac
@@ -669,6 +669,14 @@
     tgetent((char *)0, (char *)0);
 ],,
 olibs="$LIBS"
+LIBS="-ltinfo $olibs"
+AC_CHECKING(libtinfo)
+AC_TRY_LINK([
+    #include <curses.h>
+    #include <term.h>
+],[
+    tgetent((char *)0, (char *)0);
+],,
 LIBS="-lcurses $olibs"
 AC_CHECKING(libcurses)
 AC_TRY_LINK([
@@ -718,14 +726,6 @@
 AC_TRY_LINK([
     #include <curses.h>
     #include <term.h>
-],[
-    tgetent((char *)0, (char *)0);
-],,
-LIBS="-ltinfo $olibs"
-AC_CHECKING(libtinfo)
-AC_TRY_LINK([
-    #include <curses.h>
-    #include <term.h>
 ],[
     tgetent((char *)0, (char *)0);
 ],,