From 16020c5fd96427961734c4a8f5b2b5e901b1bb60 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 21 Jul 2022 13:47:06 +0900 Subject: [PATCH] build: Fix for modern Autoconf. * m4/glib-2.0.m4: Use AC_RUN_IFELSE and AC_LINK_IFELSE. -- Signed-off-by: NIIBE Yutaka --- m4/glib-2.0.m4 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/m4/glib-2.0.m4 b/m4/glib-2.0.m4 index cb284307..ec3fc9a7 100644 --- a/m4/glib-2.0.m4 +++ b/m4/glib-2.0.m4 @@ -87,7 +87,7 @@ dnl Now check if the installed GLIB is sufficiently new. (Also sanity dnl checks the results of pkg-config to some extent) dnl rm -f conf.glibtest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -158,7 +158,7 @@ main () } return 1; } -],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -180,10 +180,9 @@ main () ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" - AC_TRY_LINK([ -#include + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include #include -], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], +]], [[ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ]])], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"