From 8c9cb09998bfa98f1ff5b9390145752eb3a2fd4f Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Wed, 2 Nov 2016 18:27:09 -0700 Subject: [PATCH] Make ncurses and ncursesw header checking the same. Previously, ncurses.h wasn't searched for directly in the include directory for ncursesw. Also, fix a test in case $withval is empty. Thanks to Sylvain Bertrand for the original patch. --- configure.ac | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 828144558..f679ac4b4 100644 --- a/configure.ac +++ b/configure.ac @@ -273,7 +273,7 @@ main () [mutt_cv_curses=/usr AC_ARG_WITH(curses, AS_HELP_STRING([--with-curses=DIR],[Where ncurses is installed]), - [if test $withval != yes; then + [if test x$withval != xyes; then mutt_cv_curses=$withval fi if test x$mutt_cv_curses != x/usr; then @@ -292,12 +292,9 @@ main () AC_CHECK_LIB(tinfo, tgetent, [MUTTLIBS="$MUTTLIBS -ltinfo"]) - if test "$cf_ncurses" = ncursesw; then - AC_CHECK_HEADERS(ncursesw/ncurses.h,[cf_cv_ncurses_header="ncursesw/ncurses.h"]) - else - AC_CHECK_HEADERS(ncurses/ncurses.h,[cf_cv_ncurses_header="ncurses/ncurses.h"], - [AC_CHECK_HEADERS(ncurses.h,[cf_cv_ncurses_header="ncurses.h"])]) - fi], + AC_CHECK_HEADERS($cf_ncurses/ncurses.h,[cf_cv_ncurses_header="$cf_ncurses/ncurses.h"], + [AC_CHECK_HEADERS(ncurses.h,[cf_cv_ncurses_header="ncurses.h"])]) + ], [CF_CURSES_LIBS]) ]) -- 2.40.0