nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] [PATCH] uses ncursesw5-config by default


From: Mike Frysinger
Subject: [Nano-devel] [PATCH] uses ncursesw5-config by default
Date: Sun, 20 Nov 2011 03:33:23 -0500

The ncurses package exports a ncursesw5-config script that lets you query
the library/compiler flags needed to build against it.  So let's use that
if it's available rather than hardcoding search paths.

Signed-off-by: Mike Frysinger <address@hidden>
---
 configure.ac |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 987ca1a..1f61ae4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -442,7 +442,15 @@ if eval "test x$CURSES_LIB_NAME = x"; then
     AC_CHECK_HEADERS(ncurses.h)
 
     if test x$enable_utf8 != xno; then
-       AC_CHECK_LIB(ncursesw, get_wch, [CURSES_LIB="-lncursesw" 
CPPFLAGS="-I/usr/include/ncursesw $CPPFLAGS" CURSES_LIB_NAME=ncursesw 
CURSES_LIB_WIDE=yes])
+       AC_CHECK_TOOL(NCURSESW_CONFIG, ncursesw5-config, no)
+       if test "x$NCURSESW_CONFIG" != xno; then
+           CURSES_LIB=`$NCURSESW_CONFIG --libs`
+           CPPFLAGS="`$NCURSESW_CONFIG --cflags` $CPPFLAGS"
+           CURSES_LIB_NAME=ncursesw
+           CURSES_LIB_WIDE=yes
+       else
+           AC_CHECK_LIB(ncursesw, get_wch, [CURSES_LIB="-lncursesw" 
CPPFLAGS="-I/usr/include/ncursesw $CPPFLAGS" CURSES_LIB_NAME=ncursesw 
CURSES_LIB_WIDE=yes])
+       fi
     fi
 
     if eval "test x$CURSES_LIB_NAME = x"; then
-- 
1.7.6.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]