[v2,2/3] Replaced obsolete AC_TRY_LINK to AC_LINK_IFELSE
Commit Message
This patch replaced obsolete AC_TRY_LINK to AC_LINK_IFELSE.
It has been confirmed that GNU 'autoconf' 2.69 doesn't change the
'configure' file and suppressed obsolete warning.
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On 17 Feb 2021 01:20, Naohiro Tamura wrote:
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1579,7 +1579,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])
i fixed the indentation & pushed the result.
- 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])
-mike
Mike-san,
>i fixed the indentation & pushed the result.
Thanks for fixing the indentation kindly and merging it!
Naohiro
@@ -1579,7 +1579,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"