[libvirt] [libvirt-php 1/3] build: add error message

Lyre liyong at skybility.com
Fri Feb 25 13:45:25 UTC 2011


* configure.ac: issue an error message when tools not found
* libvirt-php.spec.in: add BuildRequires: libxslt
---
 configure.ac        |   18 +++++++++++++++---
 libvirt-php.spec.in |    1 +
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8d81b9d..ed1e65f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,9 +82,21 @@ AC_ARG_WITH([xml-catalog-file],
 AC_SUBST([XML_CATALOG_FILE])
 
 # External programs to generate documentation
-AC_PATH_PROG([XSLTPROC], [xsltproc], [/usr/bin/xsltproc])
-AC_PATH_PROG([XMLLINT], [xmllint], [/usr/bin/xmllint])
-AC_PATH_PROG([XMLCATALOG], [xmlcatalog], [/usr/bin/xmlcatalog])
+AC_PATH_PROG([XSLTPROC], [xsltproc], [no])
+if test "x$XSLTPROC" = "xno"; then
+    AC_MSG_ERROR([xsltproc not found])
+fi
+
+AC_PATH_PROG([XMLLINT], [xmllint], [no])
+if test "x$XMLLINT" = "xno"; then
+    AC_MSG_ERROR([xmllint not found])
+fi
+
+AC_PATH_PROG([XMLCATALOG], [xmlcatalog], [no])
+if test "x$XMLCATALOG" = "xno"; then
+    AC_MSG_ERROR([xmlcatalog not found])
+fi
+
 
 dnl Specific dir for HTML output ?
 AC_ARG_WITH([html-dir], [AC_HELP_STRING([--with-html-dir=path],
diff --git a/libvirt-php.spec.in b/libvirt-php.spec.in
index 465532c..9507927 100644
--- a/libvirt-php.spec.in
+++ b/libvirt-php.spec.in
@@ -26,6 +26,7 @@ BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires:	php-devel
 BuildRequires:	libvirt-devel >= %{req_libvirt_version}
 BuildRequires:	libxml2-devel
+BuildRequires:	libxslt
 %if 0%{?suse_version}  
 BuildRequires:	xhtml-dtd
 %else
-- 
1.7.1





More information about the libvir-list mailing list