[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH] search ncurses via pkg-config first
From: |
Mike Frysinger |
Subject: |
[Nano-devel] [PATCH] search ncurses via pkg-config first |
Date: |
Sun, 23 Mar 2014 16:58:26 -0400 |
Newer ncurses installs include pkg-config files which tell us the right
-I/-L paths we need, so default to that before trying the legacy ways.
---
configure.ac | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/configure.ac b/configure.ac
index ee3ef71..87336f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,7 @@ AC_PROG_CC
AC_PROG_LN_S
AC_ISC_POSIX
AC_SYS_LARGEFILE
+PKG_PROG_PKG_CONFIG
dnl Internationalization macros.
@@ -438,6 +439,23 @@ AC_CHECK_FUNCS(getopt_long)
dnl Checks for libraries.
if eval "test x$CURSES_LIB_NAME = x"; then
+ if test x$enable_utf8 != xno; then
+ PKG_CHECK_MODULES([NCURSESW], [ncursesw], [
+ CURSES_LIB=$NCURSESW_LIBS
+ CPPFLAGS="$NCURSESW_CFLAGS $CPPFLAGS"
+ CURSES_LIB_NAME=ncursesw
+ CURSES_LIB_WIDE=yes
+ ], [:])
+ else
+ PKG_CHECK_MODULES([NCURSES], [ncurses], [
+ CURSES_LIB=$NCURSES_LIBS
+ CPPFLAGS="$NCURSES_CFLAGS $CPPFLAGS"
+ CURSES_LIB_NAME=ncurses
+ ], [:])
+ fi
+fi
+
+if eval "test x$CURSES_LIB_NAME = x"; then
AC_CHECK_HEADERS(ncurses.h)
if test x$enable_utf8 != xno; then
--
1.9.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nano-devel] [PATCH] search ncurses via pkg-config first,
Mike Frysinger <=