summaryrefslogtreecommitdiff
blob: ce62c8100f9bbbb2c99cff39485bf8ffec799d9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- a/configure.in
+++ b/configure.in
@@ -15,11 +15,12 @@
 
 AC_TYPE_SIGNAL
 
+PKG_CHECK_MODULES(ncurses,ncurses,,AC_MSG_ERROR([ncurses is needed]))
 
 AC_CHECK_LIB(ncurses,initscr,[
-    NMON_LIB="${NMON_LIB} -lncurses"
-    BMON_LIB="${BMON_LIB} -lncurses"
-    CMON_LIB="${CMON_LIB} -lncurses"
+    NMON_LIB="${NMON_LIB} $ncurses_LIBS"
+    BMON_LIB="${BMON_LIB} $ncurses_LIBS"
+    CMON_LIB="${CMON_LIB} $ncurses_LIBS"
 ],[
     echo
     echo "Missing dependency"