[Disclaimer: I'm not on the list. Feel free to Cc: me, I'll try to read
the mail archive though.]

Hi there,

I just saw the mc-4.6.0-pre1 announcement and tried to build it on
Solaris 2.6. I have (non-native) ncurses and slang installed on the
machine. But I can't get this version to use either its internal or my
system slang, I can't even do "--without-ncurses", ncurses always gets
found and used. Interestingly enough, a directory no/lib and no/include
is being used. ;-) Reason: configure.in checks only "if test x$withval
!= xyes", and assumes if it's not "yes" I'm sending, it's a path. But
I'm sending "no", because I'm using "--with-slang=/my/path" and
"--without-ncurses", the latter equaling "--with-ncurses=no".

All other macros have a proper:

if test x$withval != xno; then
  if test x$withval != xyes
    [...]
  fi
fi

it's just missing for ncurses.

A patch is attached, proved to work here for the one configuration I
have now tried. (The patch only wraps the macro into "if test x$withval
!= xno; then [...]; fi"; it's blurred by indentation, sorry.)

"Works for me", mc in color again :-),
thanks for listening,
Moritz
--- mc-4.6.0-pre1/configure.in.orig     2002-08-21 09:30:57.000000000 +0200
+++ mc-4.6.0-pre1/configure.in  2002-08-22 11:07:58.984678850 +0200
@@ -329,25 +329,27 @@
 
 AC_ARG_WITH(ncurses,
        [--with-ncurses[=base-dir]    Compile with ncurses/locate base dir],
-       [if test x$withval != xyes; then
-               MCLIBS="$MCLIBS -L$withval/lib"
-               CPPFLAGS="$CPPFLAGS -I$withval/include"
-       fi
+       [if test x$withval != xno; then
+               if test x$withval != xyes; then
+                       MCLIBS="$MCLIBS -L$withval/lib"
+                       CPPFLAGS="$CPPFLAGS -I$withval/include"
+               fi
 
-       AC_CHECK_HEADERS([ncurses/curses.h ncurses.h curses.h],
-                        [ncurses_h_found=yes; break])
-       if test -z "$ncurses_h_found"; then
-           AC_MSG_ERROR([Could not find ncurses header])
-       fi
+               AC_CHECK_HEADERS([ncurses/curses.h ncurses.h curses.h],
+                                [ncurses_h_found=yes; break])
+               if test -z "$ncurses_h_found"; then
+                   AC_MSG_ERROR([Could not find ncurses header])
+               fi
 
-       dnl curses_version is specific to ncurses, it's not in old curses
-       AC_CHECK_LIB(ncurses, has_colors, [MCLIBS="$MCLIBS -lncurses"],
-                    [AC_MSG_ERROR([Could not find ncurses library])])
-
-       screen_type="ncurses"
-       screen_manager="ncurses"
-       AC_DEFINE(USE_NCURSES, 1,
-                 [Define to use ncurses for screen management])
+               dnl curses_version is specific to ncurses, it's not in old curses
+               AC_CHECK_LIB(ncurses, has_colors, [MCLIBS="$MCLIBS -lncurses"],
+                            [AC_MSG_ERROR([Could not find ncurses library])])
+
+               screen_type="ncurses"
+               screen_manager="ncurses"
+               AC_DEFINE(USE_NCURSES, 1,
+                         [Define to use ncurses for screen management])
+       fi
 ])
 
 AC_ARG_WITH(hsc,

Reply via email to