Skip to content

Commit 600075f

Browse files
committed
build-sys: check version number only when verifying libxml2 in cross-compiling
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent 91f2883 commit 600075f

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

configure.ac

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,21 @@ AS_IF([test "x$enable_xml" != "xno"], [
687687
AC_DEFINE(HAVE_LIBXML)],
688688
[AC_MSG_RESULT([bad])
689689
AC_MSG_WARN([Xpath feature is disabled because the way of handling CRLF in libxml2 is broken.
690-
See https://gitlab.gnome.org/GNOME/libxml2/-/commit/43b511fa714df875dc4f40d108061eede0d4d76b])]
690+
See https://gitlab.gnome.org/GNOME/libxml2/-/commit/43b511fa714df875dc4f40d108061eede0d4d76b])],
691+
dnl In a context of cross-compiling: We can not do try-run.
692+
dnl Instead, we check the version number only.
693+
[PKG_CHECK_MODULES(LIBXML12d0, [libxml-2.0 = 2.12.0],
694+
[AC_MSG_WARN([Xpath feature is disabled because the way of handling CRLF in libxml2 2.12.0 may be broken.
695+
See https://gitlab.gnome.org/GNOME/libxml2/-/commit/43b511fa714df875dc4f40d108061eede0d4d76b])
696+
have_libxml=no],[
697+
PKG_CHECK_MODULES(LIBXML12d1, [libxml-2.0 = 2.12.1],
698+
[AC_MSG_WARN([Xpath feature is disabled because the way of handling CRLF in libxml2 2.12.1 may be broken.
699+
See https://gitlab.gnome.org/GNOME/libxml2/-/commit/43b511fa714df875dc4f40d108061eede0d4d76b])
700+
have_libxml=no],
701+
dnl The available libxml-2.0 is not 2.12.[01].
702+
[have_libxml=yes
703+
AC_DEFINE(HAVE_LIBXML)
704+
])])]
691705
)],
692706
[AS_IF([test "x$enable_xml" = "xyes"], [
693707
AC_MSG_ERROR([libxml2 not found])])])

0 commit comments

Comments
 (0)