[PATCH] cfdisk: search for ncursesw/ncurses.h

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

 



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@xxxxxxxxxx>
---
 configure.ac   |    1 +
 fdisk/cfdisk.c |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8c5f92f..e4f8884 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c
index 552858b..7fa0b19 100644
--- a/fdisk/cfdisk.c
+++ b/fdisk/cfdisk.c
@@ -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)
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux