From 966be0bd34add5c124ceb1409466e7da2eff884c Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Fri, 12 Feb 2021 09:39:38 +0100 Subject: [PATCH] Fix warnings in libxml.m4 with autoconf 2.70+. Closes #219. --- libxml.m4 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libxml.m4 b/libxml.m4 index b5df9158..09de9fe2 100644 --- a/libxml.m4 +++ b/libxml.m4 @@ -1,4 +1,6 @@ # Configure paths for LIBXML2 +# Simon Josefsson 2020-02-12 +# Fix autoconf 2.70+ warnings # Mike Hommey 2004-06-19 # use CPPFLAGS instead of CFLAGS # Toshio Kuratomi 2001-04-21 @@ -58,7 +60,8 @@ dnl Now check if the installed libxml is sufficiently new. dnl (Also sanity checks the results of xml2-config to some extent) dnl rm -f conf.xmltest - AC_TRY_RUN([ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ #include #include #include @@ -133,7 +136,7 @@ main() } return 1; } -],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS" fi @@ -156,10 +159,11 @@ main() echo "*** Could not run libxml test program, checking why..." CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" LIBS="$LIBS $XML_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[ #include #include -], [ LIBXML_TEST_VERSION; return 0;], +]], [[ LIBXML_TEST_VERSION; return 0;]])], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBXML or finding the wrong" echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" -- GitLab