]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: clean up relation between ncurses[w] and wide-char support
authorKarel Zak <kzak@redhat.com>
Wed, 8 Jun 2016 10:03:15 +0000 (12:03 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 8 Jun 2016 10:03:15 +0000 (12:03 +0200)
* error if wide-char enabled/supported, but (non-wide) ncurses
  explicitly requested

* disable ncurses at all if widechar enabled/supported, but ncursesw
  not found

Reported-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac

index 1844bdaeefe9b05e52d6e3879ff63014040cb16c..c09a95c3902c9f1c9878000ee29524eeec086dff 100644 (file)
@@ -792,6 +792,14 @@ AC_ARG_WITH([ncurses],
   [], [with_ncurses=auto]
 )
 have_ncurses=no
+
+AS_CASE([$with_ncurses:$build_widechar],
+  [yes:yes], [AC_MSG_ERROR([wide-char support enabled, but non-wide ncurses selects])])
+
+AS_CASE([$have_ncursesw:$with_ncurses:$build_widechar],
+  [no:auto:yes],[AC_MSG_WARN( [wide-char support enabled, ncursesw not found, force --without-ncurses])
+                 with_ncurses=no])
+
 AS_IF([test "x$have_ncursesw" = xno -a "x$with_ncurses" != xno ], [
   PKG_CHECK_MODULES(NCURSES, [ncurses], [
     have_ncurses=yes
@@ -2196,6 +2204,7 @@ AC_MSG_RESULT([
        Bash completions:  ${with_bashcompletiondir}
        Systemd support:   ${have_systemd}
        Btrfs support:     ${have_btrfs}
+       Wide-char support: ${build_widechar}
 
        warnings: