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 |
5 | 5 | |
6 | 6 | AC_DEFUN([gl_POSIX_FALLOCATE], [ |
7 | 7 | dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it. |
8 | | AC_TRY_LINK([ |
| 8 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
9 | 9 | #define _XOPEN_SOURCE 600 |
10 | 10 | #include <stdlib.h> |
11 | 11 | #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7) |
12 | 12 | possibly broken posix_fallocate |
13 | 13 | #endif |
14 | | ], |
15 | | [posix_fallocate(0, 0, 0);], |
| 14 | ]], |
| 15 | [[posix_fallocate(0, 0, 0);]])], |
16 | 16 | [AC_DEFINE( |
17 | 17 | [HAVE_POSIX_FALLOCATE], |
18 | 18 | [1], |
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], [ |
17 | 17 | AC_CACHE_CHECK([if S-Lang uses termcap], [mc_cv_slang_termcap], [ |
18 | 18 | ac_save_LIBS="$LIBS" |
19 | 19 | LIBS="$LIBS -lslang" |
20 | | AC_TRY_LINK([ |
| 20 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
21 | 21 | #ifdef HAVE_SLANG_SLANG_H |
22 | 22 | #include <slang/slang.h> |
23 | 23 | #else |
24 | 24 | #include <slang.h> |
25 | 25 | #endif |
26 | | ], |
27 | | [SLtt_get_terminfo(); SLtt_tgetflag((char*)"");], |
| 26 | ]], |
| 27 | [[SLtt_get_terminfo(); SLtt_tgetflag((char*)"");]])], |
28 | 28 | [mc_cv_slang_termcap=no], |
29 | 29 | [mc_cv_slang_termcap=yes]) |
30 | 30 | LIBS="$ac_save_LIBS" |
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], [ |
143 | 143 | dnl check for ESCDELAY |
144 | 144 | AC_CACHE_CHECK([for ESCDELAY variable], |
145 | 145 | [mc_cv_ncurses_escdelay], |
146 | | [AC_TRY_LINK([], [ |
| 146 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[ |
147 | 147 | extern int ESCDELAY; |
148 | 148 | ESCDELAY = 0; |
149 | | ], |
| 149 | ]])], |
150 | 150 | [mc_cv_ncurses_escdelay=yes], |
151 | 151 | [mc_cv_ncurses_escdelay=no]) |
152 | 152 | ]) |
… |
… |
AC_DEFUN([mc_WITH_NCURSESW], [ |
194 | 194 | |
195 | 195 | AC_CACHE_CHECK([for ESCDELAY variable], |
196 | 196 | [mc_cv_ncursesw_escdelay], |
197 | | [AC_TRY_LINK([], [ |
| 197 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[ |
198 | 198 | extern int ESCDELAY; |
199 | 199 | ESCDELAY = 0; |
200 | | ], |
| 200 | ]])], |
201 | 201 | [mc_cv_ncursesw_escdelay=yes], |
202 | 202 | [mc_cv_ncursesw_escdelay=no]) |
203 | 203 | ]) |