Ticket #3955: mc-3955-autoconf-cleanup-ac_try_link-obsolete-warning.patch

File mc-3955-autoconf-cleanup-ac_try_link-obsolete-warning.patch, 3.0 KB (added by and, 6 years ago)
  • m4.include/mc-get-fs-info.m4

    From 9a0039e46d546ea6f92c644f0dc2c7a394a9a575 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Tue, 8 Jan 2019 08:06:54 +0000
    Subject: [PATCH] autoconf: Cleanup AC_TRY_LINK obsolete warning
    
    configure.ac:149: warning: The macro `AC_TRY_LINK' is obsolete.
    configure.ac:262: warning: The macro `AC_TRY_LINK' is obsolete.
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     m4.include/mc-get-fs-info.m4         | 6 +++---
     m4.include/mc-use-termcap.m4         | 6 +++---
     m4.include/mc-with-screen-ncurses.m4 | 8 ++++----
     3 files changed, 10 insertions(+), 10 deletions(-)
    
    diff --git a/m4.include/mc-get-fs-info.m4 b/m4.include/mc-get-fs-info.m4
    index 8b61ef296..bc96e99ee 100644
    a b dnl 
    55 
    66AC_DEFUN([gl_POSIX_FALLOCATE], [ 
    77    dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it. 
    8     AC_TRY_LINK([ 
     8    AC_LINK_IFELSE([AC_LANG_PROGRAM([[ 
    99        #define _XOPEN_SOURCE 600 
    1010        #include <stdlib.h> 
    1111        #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7) 
    1212            possibly broken posix_fallocate 
    1313        #endif 
    14     ], 
    15     [posix_fallocate(0, 0, 0);], 
     14    ]], 
     15    [[posix_fallocate(0, 0, 0);]])], 
    1616    [AC_DEFINE( 
    1717        [HAVE_POSIX_FALLOCATE], 
    1818        [1], 
  • m4.include/mc-use-termcap.m4

    diff --git a/m4.include/mc-use-termcap.m4 b/m4.include/mc-use-termcap.m4
    index b37f7496b..11f4a94a8 100644
    a b AC_DEFUN([mc_SLANG_TERMCAP], [ 
    1717    AC_CACHE_CHECK([if S-Lang uses termcap], [mc_cv_slang_termcap], [ 
    1818        ac_save_LIBS="$LIBS" 
    1919        LIBS="$LIBS -lslang" 
    20         AC_TRY_LINK([ 
     20        AC_LINK_IFELSE([AC_LANG_PROGRAM([[ 
    2121#ifdef HAVE_SLANG_SLANG_H 
    2222#include <slang/slang.h> 
    2323#else 
    2424#include <slang.h> 
    2525#endif 
    26                     ], 
    27                     [SLtt_get_terminfo(); SLtt_tgetflag((char*)"");], 
     26                    ]], 
     27                    [[SLtt_get_terminfo(); SLtt_tgetflag((char*)"");]])], 
    2828                    [mc_cv_slang_termcap=no], 
    2929                    [mc_cv_slang_termcap=yes]) 
    3030        LIBS="$ac_save_LIBS" 
  • m4.include/mc-with-screen-ncurses.m4

    diff --git a/m4.include/mc-with-screen-ncurses.m4 b/m4.include/mc-with-screen-ncurses.m4
    index 096192fac..80d8478c9 100644
    a b AC_DEFUN([mc_WITH_NCURSES], [ 
    143143    dnl check for ESCDELAY 
    144144    AC_CACHE_CHECK([for ESCDELAY variable], 
    145145                   [mc_cv_ncurses_escdelay], 
    146                    [AC_TRY_LINK([], [ 
     146                   [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[ 
    147147                        extern int ESCDELAY; 
    148148                        ESCDELAY = 0; 
    149                         ], 
     149                        ]])], 
    150150                        [mc_cv_ncurses_escdelay=yes], 
    151151                        [mc_cv_ncurses_escdelay=no]) 
    152152    ]) 
    AC_DEFUN([mc_WITH_NCURSESW], [ 
    194194 
    195195    AC_CACHE_CHECK([for ESCDELAY variable], 
    196196                   [mc_cv_ncursesw_escdelay], 
    197                    [AC_TRY_LINK([], [ 
     197                   [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[ 
    198198                        extern int ESCDELAY; 
    199199                        ESCDELAY = 0; 
    200                         ], 
     200                        ]])], 
    201201                        [mc_cv_ncursesw_escdelay=yes], 
    202202                        [mc_cv_ncursesw_escdelay=no]) 
    203203    ])