autoconf: AC_TRY_LINK is obsolete, use AC_LINK_IFELSE instead.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andreas Mohr 2019-01-08 08:06:54 +00:00 committed by Andrew Borodin
parent 8788ff7010
commit 217fd64afd
3 changed files with 10 additions and 10 deletions

View File

@ -5,14 +5,14 @@ dnl
AC_DEFUN([gl_POSIX_FALLOCATE], [
dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
AC_TRY_LINK([
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _XOPEN_SOURCE 600
#include <stdlib.h>
#if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
possibly broken posix_fallocate
#endif
],
[posix_fallocate(0, 0, 0);],
]],
[[posix_fallocate(0, 0, 0);]])],
[AC_DEFINE(
[HAVE_POSIX_FALLOCATE],
[1],

View File

@ -17,14 +17,14 @@ AC_DEFUN([mc_SLANG_TERMCAP], [
AC_CACHE_CHECK([if S-Lang uses termcap], [mc_cv_slang_termcap], [
ac_save_LIBS="$LIBS"
LIBS="$LIBS -lslang"
AC_TRY_LINK([
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_SLANG_SLANG_H
#include <slang/slang.h>
#else
#include <slang.h>
#endif
],
[SLtt_get_terminfo(); SLtt_tgetflag((char*)"");],
]],
[[SLtt_get_terminfo(); SLtt_tgetflag((char*)"");]])],
[mc_cv_slang_termcap=no],
[mc_cv_slang_termcap=yes])
LIBS="$ac_save_LIBS"

View File

@ -143,10 +143,10 @@ AC_DEFUN([mc_WITH_NCURSES], [
dnl check for ESCDELAY
AC_CACHE_CHECK([for ESCDELAY variable],
[mc_cv_ncurses_escdelay],
[AC_TRY_LINK([], [
[AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
extern int ESCDELAY;
ESCDELAY = 0;
],
]])],
[mc_cv_ncurses_escdelay=yes],
[mc_cv_ncurses_escdelay=no])
])
@ -194,10 +194,10 @@ AC_DEFUN([mc_WITH_NCURSESW], [
AC_CACHE_CHECK([for ESCDELAY variable],
[mc_cv_ncursesw_escdelay],
[AC_TRY_LINK([], [
[AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
extern int ESCDELAY;
ESCDELAY = 0;
],
]])],
[mc_cv_ncursesw_escdelay=yes],
[mc_cv_ncursesw_escdelay=no])
])