Ticket #3607: mc-3607-configure-summary-omits-S-Lang-when-used-as-screen-library.patch

File mc-3607-configure-summary-omits-S-Lang-when-used-as-screen-library.patch, 1.8 KB (added by mooffie, 9 years ago)
  • m4.include/mc-with-screen-slang.m4

    From 55a208bbb5359c52749584c0641b7cb106e7e8c2 Mon Sep 17 00:00:00 2001
    From: Mooffie <mooffie@gmail.com>
    Date: Wed, 16 Mar 2016 18:47:22 +0200
    Subject: [PATCH] configure summary omits "S-Lang" when used as screen library.
    
    When using slang, 'configure' prints blank in the "Screen library" name:
    
        ...
        File system:                Midnight Commander Virtual Filesystem
                                    cpio, extfs, fish, ftp, sfs, sftp, smb, tar
        Screen library:
        Mouse support:              gpm and xterm
        X11 events support:         yes
        ...
    
    This occurs when slang is found using pkg-config (as opposed to explicit path
    search). The patch fixes this by moving the 'screen_msg' assignment one level
    up, to the controlling function (mc_WITH_SLANG) so that it's effective for
    however method the library was found.
    
    The problem was mentioned on our mailing list:
    
        https://mail.gnome.org/archives/mc-devel/2016-March/msg00021.html
    ---
     m4.include/mc-with-screen-slang.m4 | 5 ++---
     1 file changed, 2 insertions(+), 3 deletions(-)
    
    diff --git a/m4.include/mc-with-screen-slang.m4 b/m4.include/mc-with-screen-slang.m4
    index 6ae263f..2a315ce 100644
    a b int main (void) 
    137137    fi 
    138138 
    139139    if test x"$found_slang" = x"yes"; then 
    140         screen_type=slang 
    141         screen_msg="S-Lang library" 
    142  
    143140        MCLIBS="$ac_slang_lib_path -lslang $MCLIBS" 
    144141        dnl do not reset CPPFLAGS 
    145142        dnl if CPPFLAGS are reset then cpp does not find the specified header 
    AC_DEFUN([mc_WITH_SLANG], [ 
    206203        fi 
    207204    fi 
    208205 
     206    screen_type=slang 
     207    screen_msg="S-Lang library" 
    209208    AC_DEFINE(HAVE_SLANG, 1, [Define to use S-Lang library for screen management]) 
    210209 
    211210    mc_CHECK_SLANG_HEADER