summaryrefslogtreecommitdiff
path: root/sys-apps/irqbalance/files/irqbalance-1.2.0-tinfo.patch
blob: 20716542b6dd17c7d30879d9136ea1cacbb70af8 (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
From 287d50594fe624bdb4400611d0dbecec6ff38a41 Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Wed, 1 Mar 2017 17:11:42 +0100
Subject: [PATCH] Prefer pkgconfig to check for ncursesw.

That way we take possible separate tinfo lib into account.
---
 configure.ac | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 17b879a..77d8aa4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,13 @@ AC_CHECK_FUNCS(getopt_long)
 AC_CHECK_LIB(numa, numa_available)
 AC_CHECK_LIB(m, floor)
 
-AC_CHECK_LIB(curses, mvprintw)
+PKG_CHECK_MODULES([NCURSESW], [ncursesw], [has_ncursesw=yes], [AC_CHECK_LIB(curses, mvprintw)])
+AS_IF([test "x$has_ncursesw" = "xyes"], [
+  AC_SUBST([NCURSESW_CFLAGS])
+  AC_SUBST([NCURSESW_LIBS])
+  LIBS="$LIBS $NCURSESW_LIBS"
+  AC_SUBST([LIBS])
+])
 
 AC_C_CONST
 AC_C_INLINE
-- 
2.12.0