Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
configure.ac | 9 +++------
m4/virt-xml-catalog.m4 | 33 +++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 6 deletions(-)
create mode 100644 m4/virt-xml-catalog.m4
diff --git a/configure.ac b/configure.ac
index 2639848218..ba20bd3d68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -386,11 +386,8 @@ else
fi
AC_SUBST([HTML_DIR])
-dnl Specific XML catalog file for validation of generated html
-LIBVIRT_ARG_WITH_ALT([XML_CATALOG_FILE],
- [path to XML catalog file for validating generated html],
- ['/etc/xml/catalog'])
-AC_SUBST([XML_CATALOG_FILE], [$with_xml_catalog_file])
+LIBVIRT_ARG_XML_CATALOG
+LIBVIRT_CHECK_XML_CATALOG
dnl if --prefix is /usr, don't use /usr/var for localstatedir
dnl or /usr/etc for sysconfdir
@@ -1835,7 +1832,7 @@ AC_MSG_NOTICE([ Use -Werror: $enable_werror])
AC_MSG_NOTICE([ Warning Flags: $WARN_CFLAGS])
LIBVIRT_RESULT_DTRACE
LIBVIRT_RESULT_NUMAD
-AC_MSG_NOTICE([ XML Catalog: $with_xml_catalog_file])
+LIBVIRT_RESULT_XML_CATALOG
LIBVIRT_RESULT_INIT_SCRIPT
LIBVIRT_RESULT_CHRDEV_LOCK_FILES
LIBVIRT_RESULT_DEFAULT_EDITOR
diff --git a/m4/virt-xml-catalog.m4 b/m4/virt-xml-catalog.m4
new file mode 100644
index 0000000000..c75476dc3d
--- /dev/null
+++ b/m4/virt-xml-catalog.m4
@@ -0,0 +1,33 @@
+dnl The XML catalog file check
+dnl
+dnl Copyright (C) 2016 Red Hat, Inc.
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License, or (at your option) any later version.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library. If not, see
+dnl <
http://www.gnu.org/licenses/>.
+dnl
+
+AC_DEFUN([LIBVIRT_ARG_XML_CATALOG], [
+ LIBVIRT_ARG_WITH_ALT([XML_CATALOG_FILE],
+ [path to XML catalog file for validating generated html],
+ ['/etc/xml/catalog'])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_XML_CATALOG], [
+ dnl Specific XML catalog file for validation of generated html
+ AC_SUBST([XML_CATALOG_FILE], [$with_xml_catalog_file])
+])
+
+AC_DEFUN([LIBVIRT_RESULT_XML_CATALOG], [
+ AC_MSG_NOTICE([ XML Catalog: $with_xml_catalog_file])
+])
--
2.11.0