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
33
34
35
36
37
|
--- a/configure.ac
+++ b/configure.ac
@@ -1,3 +1,4 @@
+
dnl Process this file with autoconf to produce a configure script.
dnl require a recent autoconf
@@ -276,21 +277,22 @@
dnl -----------------------------------------------------------
have_ncurses=no
-AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h],
+m4_ifdef([PKG_CHECK_MODULES],
[
- AC_CHECK_LIB([ncurses], [curs_set],
+ PKG_CHECK_MODULES([ncurses], [ncurses],
[
- NCURSES_LIBS="-lncurses"
- have_ncurses=yes
- AC_DEFINE([HAVE_NCURSES], [1], [Set to 1 if we have ncurses])
- ]
+ have_ncurses=yes
+ NCURSES_LIBS="$ncurses_LIBS"
+ CFLAGS="$CFLAGS $ncurses_CFLAGS -DHAVE_NCURSES_H=1"
+ AC_DEFINE([HAVE_NCURSES], [1], [Set to 1 if we have ncurses])
+ ],
+ []
)
]
)
AC_SUBST([NCURSES_LIBS])
-
dnl -----------------------------------------------------------
dnl Check whether libcheck ('Check') is available
dnl -----------------------------------------------------------
|