[v2,2/3] Replaced obsolete AC_TRY_LINK to AC_LINK_IFELSE

Message ID 20210217012017.215961-1-naohirot@fujitsu.com
State Committed
Headers
Series [v2,1/3] Replaced obsolete AC_TRY_COMPILE to AC_COMPILE_IFELSE |

Commit Message

Naohiro Tamura Feb. 17, 2021, 1:20 a.m. UTC
  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

Mike Frysinger Feb. 21, 2021, 11:40 p.m. UTC | #1
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
  
Naohiro Tamura Feb. 22, 2021, 1:50 a.m. UTC | #2
Mike-san,

>i fixed the indentation & pushed the result.

Thanks for fixing the indentation kindly and merging it!
Naohiro
  

Patch

diff --git a/configure.ac b/configure.ac
index d8ccb6c119..14e85a221f 100644
--- 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])
   CFLAGS="$old_CFLAGS"
   LDFLAGS="$old_LDFLAGS"
   LIBS="$old_LIBS"