]> git.wh0rd.org Git - nano.git/commitdiff
2013-01-02 Mike Frysinger <vapier@gentoo.org>
authorChris Allegretta <chrisa@asty.org>
Thu, 10 Jan 2013 03:51:24 +0000 (03:51 +0000)
committerChris Allegretta <chrisa@asty.org>
Thu, 10 Jan 2013 03:51:24 +0000 (03:51 +0000)
        * configure.ac: Check for ncursesw5-config and base $CPPFLAGS based on it.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4562 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
configure.ac

index 19f0ebce263d35683a5e4036b2a3d05f6f0d9851..b3c2eafef89dbf158d7324ffca48a8005192131f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2013-01-02 Mike Frysinger <vapier@gentoo.org>
+        * configure.ac: Check for ncursesw5-config and base $CPPFLAGS based on it.
+
 2013-01-09 Fabian Groffen <grobian@Savannah>
         * configure.ac, src/nano.h: Make search for ncursesw more generalized.
 
index e999e41582049fb4e50e7806c03ab1a23623eeb0..c6c5e52370b93ebd3bbb5e0047acf95df539b47f 100644 (file)
@@ -442,7 +442,15 @@ if eval "test x$CURSES_LIB_NAME = x"; then
 
     if test x$enable_utf8 != xno; then
        AC_CHECK_HEADERS(ncursesw/ncurses.h)
-       AC_CHECK_LIB(ncursesw, get_wch, [CURSES_LIB="-lncursesw" 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" CURSES_LIB_NAME=ncursesw CURSES_LIB_WIDE=yes])
+        fi
     fi
 
     if eval "test x$CURSES_LIB_NAME = x"; then