Ticket #2926: fail to check ncurses library

...if --with-ncurses-inc and --with-ncurses-libs options are used.

m4.include/mc-with-screen-ncurses.m4: clarify usage of LDFLAGS in
ncurses library checking: add $ac_curses_lib_path.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-11-14 10:07:06 +04:00
parent 65569af255
commit a67d752ef2

View File

@ -13,7 +13,9 @@ AC_DEFUN([MC_CHECK_NCURSES_BY_PATH], [
fi
saved_CPPFLAGS="$CPPFLAGS"
saved_LDFLAGS="$LDFLAGS"
CPPFLAGS="$CPPFLAGS $ac_ncurses_inc_path"
LDFLAGS="$LDFLAGS $ac_ncurses_lib_path"
dnl Check for the headers
dnl Both headers should be in the same directory
@ -56,6 +58,7 @@ AC_DEFUN([MC_CHECK_NCURSES_BY_PATH], [
MCLIBS="$MCLIBS $ac_ncurses_lib_path"
else
CPPFLAGS="$saved_CPPFLAGS"
LDFLAGS="$saved_LDPFLAGS"
AC_MSG_ERROR([$error_msg_ncurses])
fi
])