Included S-Lang and configure



Hi,

this patch has to fix system slang.h usage if mc is configured to use included
slang.

-- 
Regards,
Andrew V. Samoilov.
ChangeLog:

	* acinclude.m4 (MC_WITH_MCSLANG): Set screen_type to mcslang.
	* configure.ac: Define USE_INCLUDED_SLANG if screen_type is mcslang.

src/ChangeLog:

	* src/myslang.h: Check USE_INCLUDED_SLANG properly.

--- acinclude.m4	Mon Oct 11 15:07:16 2004
+++ acinclude.m4~	Mon Oct 11 13:11:22 2004
@@ -742,7 +742,7 @@
 dnl Use the included S-Lang library.
 dnl
 AC_DEFUN([MC_WITH_MCSLANG], [
-    screen_type=slang
+    screen_type=mcslang
     screen_msg="Included S-Lang library (mcslang)"
 
     # Search for terminfo database.
--- configure.ac~	Wed Sep 29 09:16:13 2004
+++ configure.ac	Mon Oct 11 13:26:23 2004
@@ -546,6 +546,10 @@
     AC_DEFINE(USE_INCLUDED_REGEX, 1, [Use the regex included here])
 fi
 
+if test "x$with_screen" = xmcslang; then
+    AC_DEFINE(USE_INCLUDED_SLANG, 1, [Use the S-Lang included here])
+fi
+
 if test x"$USE_MAINTAINER_MODE" = x"yes"; then
     if test x"${enable_gcc_warnings+set}" != x"set"; then
         CFLAGS="-Wall $CFLAGS"
--- src/myslang.h~	Mon Sep 20 09:22:12 2004
+++ src/myslang.h	Mon Oct 11 15:04:39 2004
@@ -1,15 +1,15 @@
 #ifndef __MYSLANG_H
 #define __MYSLANG_H
 
-#ifdef HAVE_SYSTEM_SLANG
+#if defined(USE_INCLUDED_SLANG) || !defined (HAVE_SYSTEM_SLANG)
+#    include "../slang/include/slang.h"
+#else
 #ifdef HAVE_SLANG_SLANG_H
 #    include <slang/slang.h>
 #else
 #    include <slang.h>
+#endif	/* HAVE_SLANG_SLANG_H */
 #endif
-#else /* !HAVE_SYSTEM_SLANG */
-#    include "../slang/include/slang.h"
-#endif /* !HAVE_SYSTEM_SLANG */
 
 enum {
     KEY_BACKSPACE = 400,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]