[PATCH] aclocal.m4: Enable configure to detect the presence of ncurses on OpenBSD 3.2
Pavel Tsekov
ptsekov at gmx.net
Wed Jan 29 16:45:57 UTC 2003
Hello,
OpenBSD 3.2 (I think also earlier versions, but cannot confirm) comes
with ncurses as the default screen library. However it is installed as
/usr/lib/libcurses.so, there is no libncurses in OpenBSD by default.
This patch alters the macro MC_WITH_NCURSES to properly handle this
situation - it first tries to find the 'has_colors' symbol in libncurses
and then fallbacks to libcurses.
Please check the patch for possible errors, since I'm not good in auto*
stuff.
Thanks!
-------------- next part --------------
--- aclocal.m4 2003-01-29 17:32:36.000000000 +0100
+++ aclocal.m4.OpenBSD.patch1 2003-01-29 17:33:50.000000000 +0100
@@ -812,7 +812,9 @@ dnl or you'll have to press Esc three ti
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"],
+ 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
@@ -829,8 +831,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([], [
More information about the mc-devel
mailing list