]> err.no Git - util-linux/commitdiff
cfdisk: search for ncursesw/ncurses.h
authorMike Frysinger <vapier@gentoo.org>
Thu, 1 Jul 2010 17:41:40 +0000 (13:41 -0400)
committerKarel Zak <kzak@redhat.com>
Wed, 7 Jul 2010 07:56:16 +0000 (09:56 +0200)
Some distros install the wide version of ncurses side by side with the
non-wide version and place the wide headers in an ncursesw/ subdir.  So
detect that behavior and include the right header with cfdisk.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
configure.ac
fdisk/cfdisk.c

index 8c5f92f42a9d3ee82bf24e5efd645538a7bd374d..e4f88840728cc73ba9a64225c3843c69521b76a6 100644 (file)
@@ -442,6 +442,7 @@ if test "x$with_ncurses" != xno; then
     if test "x$with_ncurses" = xauto; then
       UTIL_CHECK_LIB(ncursesw, initscr, ncurses)
       if test "x$have_ncurses" = xyes; then
+        AC_CHECK_HEADERS([ncursesw/ncurses.h])
         NCURSES_LIBS="-lncursesw"
       fi
     fi
index 552858b6b77639cf052f05f3c019752f5026d121..7fa0b1916521b7122ee707d2d356af70f1352c7c 100644 (file)
@@ -75,6 +75,8 @@
 #include <slcurses.h>
 #elif defined(HAVE_SLANG_SLCURSES_H)
 #include <slang/slcurses.h>
+#elif defined(HAVE_NCURSESW_NCURSES_H) && defined(HAVE_WIDECHAR)
+#include <ncursesw/ncurses.h>
 #elif defined(HAVE_NCURSES_H)
 #include <ncurses.h>
 #elif defined(HAVE_NCURSES_NCURSES_H)