configure: Replace obsolete AC_TRY_LINK with AC_LINK_IFELSE

This patch replaces obsolete AC_TRY_LINK with AC_LINK_IFELSE.
It has been confirmed that GNU 'autoconf' 2.69 doesn't change the
'configure' file and suppressed obsolete warning.
This commit is contained in:
Naohiro Tamura 2021-02-17 01:20:17 +00:00 committed by Mike Frysinger
parent 3907c7bf0f
commit e9e7f24543

View File

@ -1578,7 +1578,8 @@ if test "$with_gd" != "no"; then
LDFLAGS="$LDFLAGS $libgd_ldflags"
old_LIBS="$LIBS"
LIBS="$LIBS -lgd -lpng -lz -lm"
AC_TRY_LINK([#include <gd.h>], [gdImagePng (0, 0)], LIBGD=yes, LIBGD=no)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gd.h>]], [[gdImagePng (0, 0)]])],
[LIBGD=yes], [LIBGD=no])
CFLAGS="$old_CFLAGS"
LDFLAGS="$old_LDFLAGS"
LIBS="$old_LIBS"