[libxml2] Fix warnings in libxml.m4 with autoconf 2.70+.



commit 4defa2c24a6d21a7b8f712dd2ea39f43ff113307
Author: Simon Josefsson <simon josefsson org>
Date:   Fri Feb 12 09:39:38 2021 +0100

    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 <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -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 <libxml/xmlversion.h>
 #include <stdio.h>
-],      [ 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"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]