From: Kevin McCarthy Date: Thu, 3 Nov 2016 01:27:09 +0000 (-0700) Subject: Make ncurses and ncursesw header checking the same. X-Git-Tag: mutt-1-8-rel~109 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f9ace76562da51cdc8158dc772dbf53d0a05ce9;p=mutt 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. --- diff --git a/configure.ac b/configure.ac index 82814455..f679ac4b 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]) ])