summaryrefslogtreecommitdiff
blob: 7da23d474951cdf0e2cb5d3a2f292b41187f5c1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/src/configure.in
+++ b/src/configure.in
@@ -24,7 +24,16 @@ AC_ARG_ENABLE(purify,
 dnl Checks for libraries.
 AC_DEFINE(UNIX)
 AC_DEFINE(TERMCAP)
-AC_CHECK_LIB(terminfo, tgetstr,, [AC_CHECK_LIB(termcap, tgetstr,, [AC_CHECK_LIB(ncurses, tgetstr,, [AC_CHECK_LIB(curses, tgetstr)])])])
+PKG_CHECK_MODULES(
+   CURSES,
+   ncurses,
+   [
+       CPPFLAGS="$CURSES_CFLAGS $CPPFLAGS"
+       LIBS="$CURSES_LIBS $LIBS"
+   ],
+   [
+       AC_CHECK_LIB(terminfo, tgetstr,, [AC_CHECK_LIB(termcap, tgetstr,, [AC_CHECK_LIB(ncurses, tgetstr,, [AC_CHECK_LIB(curses, tgetstr)])])])
+   ])
 
 dnl Checks for header files.
 AC_HEADER_STDC