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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
From 243d3c265289171f59de68f5da4de086afb58215 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sat, 31 Jul 2021 03:21:28 +0100
Subject: [PATCH] Use PKG_CHECK_MODULES for ncurses
We don't _always_ have split tinfo, e.g. Prefix.
Signed-off-by: Sam James <sam@gentoo.org>
---
Makefile.am | 4 ++--
configure.ac | 26 +-------------------------
2 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 8faaa11..18c6892 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,8 +22,8 @@ abook_SOURCES = abook.c abook_rl.c database.c edit.c \
EXTRA_DIST = config.rpath ANNOUNCE BUGS FAQ abook.1 abookrc.5 sample.abookrc \
abook.spec contrib doc/HOWTO.translating_abook RELEASE_NOTES
-abook_LDADD = @LIBINTL@
-
+abook_CFLAGS = $(ncurses_CFLAGS)
+abook_LDADD = @LIBINTL@ $(ncurses_LIBS)
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5
diff --git a/configure.ac b/configure.ac
index 5a9ae3b..73a7af0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,31 +74,7 @@ dnl -------------------
dnl (n)curses detection
dnl -------------------
-abook_cv_curses=/usr
-AC_ARG_WITH(curses, [ --with-curses=DIR Where ncurses is installed ],
- [if test $withval != yes; then
- abook_cv_curses=$withval
- fi
- if test x$abook_cv_curses != x/usr; then
- LDFLAGS="-L${abook_cv_curses}/lib $LDFLAGS"
- CPPFLAGS="$CPPFLAGS -I${abook_cv_curses}/include"
- fi])
-
-AC_CHECK_LIB(ncursesw, initscr,
- [LIBS="$LIBS -lncursesw"
- if test x$abook_cv_curses = x/usr -a -d /usr/include/ncursesw; then
- CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
- fi
- AC_CHECK_HEADERS(ncurses.h)],[
- ac_widec_possible=no
- AC_CHECK_LIB(ncurses, initscr,
- [LIBS="$LIBS -lncurses"
- if test x$abook_cv_curses = x/usr -a -d /usr/include/ncurses; then
- CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"
- fi
- AC_CHECK_HEADERS(ncurses.h)],
- [CF_CURSES_LIBS])
- ])
+PKG_CHECK_MODULES(ncurses, [ncursesw ncurses])
dnl --------------------------
dnl end of (n)curses detection
--
2.32.0
|