summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Kramlich <grim@reaperworld.com>2021-06-07 22:21:56 -0500
committerGary Kramlich <grim@reaperworld.com>2021-06-07 22:21:56 -0500
commit8ab24a7ab56c6d4fef17d1ef8c7982b277c59332 (patch)
treed02e52870c86593ee3fd3114bf6ad1958f638810
parenta4a9972b27ea5d6259d18bfdc46e30c691a8e16b (diff)
downloadpidgin-8ab24a7ab56c6d4fef17d1ef8c7982b277c59332.tar.gz
Check pkg-config for ncurses before manually looking for it.
This patch originated from https://bugs.gentoo.org/461482 but is being applied by Gary Kramlich <grim@reaperworld.com> Testing Done: Configured only, worked fine on debian unstable. Reviewed at https://reviews.imfreedom.org/r/729/
-rw-r--r--configure.ac18
1 files changed, 12 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 54471d3329..23c13dcbf7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -603,9 +603,11 @@ AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR],
[compile finch against the ncurses includes in DIR])],
[ac_ncurses_includes="$withval"], [ac_ncurses_includes=""])
if test "x$enable_consoleui" = "xyes"; then
- AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no])
- AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"],
- [enable_consoleui=no], [$GNT_LIBS])
+ PKG_CHECK_MODULES([GNT], [ncursesw panelw], [], [
+ AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no])
+ AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"],
+ [enable_consoleui=no], [$GNT_LIBS])
+ ])
if test "x$enable_consoleui" = "xyes"; then
dnl # Some distros put the headers in ncursesw/, some don't
@@ -655,9 +657,13 @@ if test "x$enable_consoleui" = "xyes"; then
else
# ncursesw was not found. Look for plain old ncurses
enable_consoleui=yes
- AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no])
- AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"],
- [enable_consoleui=no], [$GNT_LIBS])
+
+ PKG_CHECK_MODULES([GNT], [ncurses panel], [] , [
+ AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no])
+ AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"],
+ [enable_consoleui=no], [$GNT_LIBS])
+ ])
+
AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.])
if test x"$ac_ncurses_includes" != "x"; then
GNT_CFLAGS="-I$ac_ncurses_includes"