summaryrefslogtreecommitdiff
blob: 08149226168585ccb96c47323d27a90887d7c713 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff -Naur burp/configure.ac burp-new/configure.ac
--- burp/configure.ac	2014-10-28 12:45:56.000000000 +0100
+++ burp-new/configure.ac	2014-11-10 17:40:50.996955441 +0100
@@ -1203,13 +1203,12 @@
 fi
 
 AC_CHECK_HEADERS(ncurses.h)
-AC_CHECK_LIB(ncurses, curs_set, [NCURSES_LIBS="-lncurses"])
 have_ncurses=no
-if test x$NCURSES_LIBS = x-lncurses; then
-   AC_DEFINE(HAVE_NCURSES, 1, [Defined to 1 if libncurses was found])
-   have_ncurses=yes
-fi
-AC_SUBST(NCURSES_LIBS)
+AC_CHECK_LIB(ncurses, endwin,
+	[NCURSES_LIBS="-lncurses"; have_ncurses=yes]
+	AC_SEARCH_LIBS(curs_set, tinfo, [NCURSES_LIBS="$NCURSES_LIBS $ac_res"]),
+	AC_DEFINE(HAVE_NCURSES, 1, [Defined to 1 if libncurses was found])
+	AC_SUBST(NCURSES_LIBS))
 
 dnl
 dnl Check if we have AFS on this system