Browse Source

* acinclude.m4 (MC_WITH_NCURSES): Check -lcurses if -lncurses
doesn't work. Useful on OpenBSD 3.2.

Pavel Roskin 22 years ago
parent
commit
b0c4a45dcf
2 changed files with 9 additions and 4 deletions
  1. 5 0
      ChangeLog
  2. 4 4
      acinclude.m4

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2003-01-30  Pavel Tsekov  <ptsekov@gmx.net>
+
+	* acinclude.m4 (MC_WITH_NCURSES): Check -lcurses if -lncurses
+	doesn't work.  Useful on OpenBSD 3.2.
+
 2003-01-29  Pavel Roskin  <proski@gnu.org>
 
 	* lib/mc.ext.in: Fix missing semicolon that affected viewing RPM

+ 4 - 4
acinclude.m4

@@ -799,8 +799,10 @@ dnl or you'll have to press Esc three times to dismiss a dialog box.
 dnl
 AC_DEFUN([MC_WITH_NCURSES], [
     dnl has_colors() is specific to ncurses, it's not in the old curses
-    AC_CHECK_LIB([ncurses], [has_colors], [MCLIBS="$MCLIBS -lncurses"],
-		 [AC_MSG_ERROR([Cannot find ncurses library])])
+    save_LIBS="$LIBS"
+    LIBS=
+    AC_SEARCH_LIBS([has_colors], [ncurses curses], [MCLIBS="$MCLIBS $LIBS"],
+		   [AC_MSG_ERROR([Cannot find ncurses library])])
 
     dnl Check the header
     ncurses_h_found=
@@ -816,8 +818,6 @@ AC_DEFUN([MC_WITH_NCURSES], [
     AC_DEFINE(USE_NCURSES, 1,
 	      [Define to use ncurses for screen management])
 
-    save_LIBS="$LIBS"
-    LIBS="$LIBS -lncurses"
     AC_CACHE_CHECK([for ESCDELAY variable],
 		   [mc_cv_ncurses_escdelay],
 		   [AC_TRY_COMPILE([], [