summaryrefslogtreecommitdiff
blob: daf9cde9f57553e38d2e8a196aae1f969d7fbcf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/configure.ac b/configure.ac
index 66bcbc0..f15f06e 100644
--- a/configure.in
+++ b/configure.in
@@ -302,6 +302,14 @@ AC_DEFUN(AC_CURSES, [
 if test  "$curses_driver_test" = yes; then
 if $search_ncurses
 then
     AC_CHECKING("location of curses")
+    PKG_CHECK_MODULES([CURSES], [ncurses], [
+      AC_MSG_RESULT([Found ncurses via pkg-config: CURSES_CFLAGS="$CURSES_CFLAGS" CURSES_LIBS="$CURSES_LIBS"])
+        CFLAGS="$CFLAGS $CURSES_CFLAGS"
+        LIBS="$LIBS $CURSES_LIBS"
+        AALIB_LIBS="$AALIB_LIBS $CURSES_LIBS"
+        search_ncurses=false
+        curses_driver=true
+    ], [])
 
     AC_NCURSES(/usr/include, ncurses.h, , -I/usr/include/ncurses , "ncurses on /usr/include")