Ticket #2926: fail to check ncurses library
authorAndrew Borodin <aborodin@vmail.ru>
Wed, 14 Nov 2012 06:07:06 +0000 (14 10:07 +0400)
committerAndrew Borodin <aborodin@vmail.ru>
Tue, 18 Dec 2012 12:27:49 +0000 (18 16:27 +0400)
...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>
m4.include/mc-with-screen-ncurses.m4

index 14be9ed..1df7df9 100644 (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
 ])