python312Packages.vdf: avoid using pname for src.repo
[NixPkgs.git] / pkgs / os-specific / linux / shadow / respect-xml-catalog-files-var.patch
blob7d922eae71fca8b6d68bff34e393aaf0dcc98931
1 diff --git a/acinclude.m4 b/acinclude.m4
2 index dd01f165..e23160ee 100644
3 --- a/acinclude.m4
4 +++ b/acinclude.m4
5 @@ -46,9 +46,21 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
6 ifelse([$3],,,[$3
7 ])dnl
8 else
9 - AC_MSG_RESULT([not found])
10 - ifelse([$4],,
11 - [AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])],
12 - [$4])
13 + jh_check_xml_catalog_saved_ifs="$IFS"
14 + IFS=' '
15 + for f in $XML_CATALOG_FILES; do
16 + if [[ -f "$f" ]] && \
17 + AC_RUN_LOG([$XMLCATALOG --noout "$f" "$1" >&2]); then
18 + jh_found_xmlcatalog=true
19 + AC_MSG_RESULT([found])
20 + ifelse([$3],,,[$3])
21 + break
22 + fi
23 + done
24 + IFS="$jh_check_xml_catalog_saved_ifs"
25 + if ! $jh_found_xmlcatalog; then
26 + AC_MSG_RESULT([not found])
27 + ifelse([$4],,[AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])],[$4])
28 + fi