summaryrefslogtreecommitdiff
blob: 6430a9761d79b9163bd4c6e87390b0420f96a9b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- configure.ac.orig	2014-05-15 13:09:49.433810160 +0400
+++ configure.ac	2014-05-15 13:10:33.441813996 +0400
@@ -21,6 +21,7 @@
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_INSTALL
+PKG_PROG_PKG_CONFIG
 
 # Checks for header files.
 AC_HEADER_STDC
@@ -52,7 +53,7 @@
 
 # Tests involving libraries
 AC_CHECK_LIB([m], [pow], [],              [AC_MSG_ERROR(math library not found)])
-AC_CHECK_LIB([ncurses], [waddstr], [],    [AC_MSG_ERROR(ncurses library not found)])
+PKG_CHECK_MODULES([ncurses], [ncurses], [LIBS="$LIBS $ncurses_LIBS"], AC_MSG_ERROR([ncurses is required but was not found]))
 AC_CHECK_LIB([pthread], [pthread_create], [CFLAGS="$CFLAGS -pthread"],
 					  [AC_MSG_ERROR(pthread library not found)])
 AC_CHECK_LIB([cap], [cap_get_flag])