mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 23:20:55 +00:00
gtk-doc: clean up XML_CATALOG_FILES patch
libxml2 1.9.7 supports the XML_CATALOG_FILES environment variable natively by using empty catalogfile argument.
This commit is contained in:
parent
0f50d5ac19
commit
0124cbdac8
|
@ -1,28 +1,13 @@
|
|||
diff --git a/m4/gtkdoc_jh_check_xml_catalog.m4 b/m4/gtkdoc_jh_check_xml_catalog.m4
|
||||
index 618c1c9..1842a0d 100644
|
||||
--- a/m4/gtkdoc_jh_check_xml_catalog.m4
|
||||
+++ b/m4/gtkdoc_jh_check_xml_catalog.m4
|
||||
@@ -10,7 +10,21 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
|
||||
@@ -5,8 +5,8 @@
|
||||
[
|
||||
AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
|
||||
AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
|
||||
- if $jh_found_xmlcatalog && \
|
||||
- AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
|
||||
+ # empty argument forces libxml to use XML_CATALOG_FILES variable
|
||||
+ if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then
|
||||
AC_MSG_RESULT([found])
|
||||
ifelse([$3],,,[$3])
|
||||
else
|
||||
- AC_MSG_RESULT([not found])
|
||||
- ifelse([$4],,[AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])],[$4])
|
||||
+ jh_check_xml_catalog_saved_ifs="$IFS"
|
||||
+ IFS=' '
|
||||
+ for f in $XML_CATALOG_FILES; do
|
||||
+ if [[ -f "$f" ]] && \
|
||||
+ AC_RUN_LOG([$XMLCATALOG --noout "$f" "$1" >&2]); then
|
||||
+ jh_found_xmlcatalog=true
|
||||
+ AC_MSG_RESULT([found])
|
||||
+ ifelse([$3],,,[$3])
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
+ IFS="$jh_check_xml_catalog_saved_ifs"
|
||||
+ if ! $jh_found_xmlcatalog; then
|
||||
+ AC_MSG_RESULT([not found])
|
||||
+ ifelse([$4],,[AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])],[$4])
|
||||
+ fi
|
||||
fi
|
||||
])
|
||||
|
|
Loading…
Reference in a new issue