]> git.wh0rd.org Git - nano.git/commitdiff
2013-01-19 Chris Allegretta <chrisa@asty.org>
authorChris Allegretta <chrisa@asty.org>
Mon, 21 Jan 2013 03:36:18 +0000 (03:36 +0000)
committerChris Allegretta <chrisa@asty.org>
Mon, 21 Jan 2013 03:36:18 +0000 (03:36 +0000)
        * configure.ac: Make ncurses checking to set $LIBS and check the ncursesw lib
          actually works before defaulting to it over ncurses!  Shock!

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

ChangeLog
configure.ac

index 27962ce50ba2dc9ff943377d971e4c08ca960a64..5fda673716cf99860f47d2e40d56be3f7535abaf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,8 +6,8 @@
          Originally reported by dave festing.
 
 2013-01-19 Chris Allegretta <chrisa@asty.org>
-        * configure.ac: Make ncursesw checking dependent on the presence of ncursesw.h, 
-          since without the header files we can't compile.
+        * configure.ac: Make ncurses checking to set $LIBS and check the ncursesw lib
+          actually works before defaulting to it over ncurses!  Shock!
 
 2013-01-13 Chris Allegretta <chrisa@asty.org>
         * src/utils.c (parse_num): Initalize errno before calling strtol().  Fixes issue
index c1489f9cb9688c4d14e7bc263b07154313b15047..6db0b92c4fa386006eb8b89537385719fcb8cde5 100644 (file)
@@ -441,17 +441,17 @@ if eval "test x$CURSES_LIB_NAME = x"; then
     AC_CHECK_HEADERS(ncurses.h)
 
     if test x$enable_utf8 != xno; then
-       AC_CHECK_HEADERS(ncursesw/ncurses.h, [
-            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
-        ])
+       OLDLIBS="$LIBS"
+       AC_CHECK_TOOL(NCURSESW_CONFIG, ncursesw5-config, no)
+       if test "x$NCURSESW_CONFIG" != xno; then
+           CURSES_LIB=`$NCURSESW_CONFIG --libs`
+           LIBS="$CURSES_LIB $LIBS"
+           CPPFLAGS="`$NCURSESW_CONFIG --cflags` $CPPFLAGS"
+           AC_CHECK_LIB(ncursesw, get_wch, [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
+       LIBS="$OLDLIBS"
     fi
 
     if eval "test x$CURSES_LIB_NAME = x"; then