[Xcb] [PATCH] Make xsltproc optional

Daniel Martin consume.noise at gmail.com
Sun Aug 11 11:46:37 PDT 2013


Fix Bug 23863 - xcb still checks for xsltproc:
    https://bugs.freedesktop.org/show_bug.cgi?id=23863

xsltproc is used to generate the optional html page for `check` results,
only. So, it's not a hard build dependency.

Additionally, use yes/no instead of true/false in the HTML_CHECK_RESULT
variable for consistent output after a configure run.

Signed-off-by: Daniel Martin <consume.noise at gmail.com>
---
v2: - removed second output of HAVE_CHECK
    - changed HTML_CHECK_RESULT to use yes/no
    - output HTML_CHECK_RESULT below existing HAVE_CHECK

 configure.ac      | 12 +++++-------
 tests/Makefile.am |  2 +-
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 482f85b..72bd4f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,15 +27,12 @@ AC_LIBTOOL_WIN32_DLL
 AC_PROG_LIBTOOL
 AC_PROG_CC
 
-AC_PATH_PROG(XSLTPROC, xsltproc, no)
-if test "$XSLTPROC" = "no"; then
-   AC_MSG_ERROR([XCB requires xsltproc.])
-fi
-
-HTML_CHECK_RESULT=false
+XSLTPROC=no
+HTML_CHECK_RESULT=no
 if test x"$HAVE_CHECK" = xyes; then
+	AC_PATH_PROG(XSLTPROC, xsltproc, no)
 	if test x"$XSLTPROC" != xno; then
-		HTML_CHECK_RESULT=true
+		HTML_CHECK_RESULT=yes
 	fi
 fi
 AC_SUBST(HTML_CHECK_RESULT)
@@ -258,6 +255,7 @@ echo ""
 echo "  Configuration"
 echo "    XDM support.........: ${have_xdmcp}"
 echo "    Build unit tests....: ${HAVE_CHECK}"
+echo "      with html results.: ${HTML_CHECK_RESULT}"
 echo "    XCB buffer size.....: ${xcb_queue_buffer_size}"
 echo ""
 echo "  X11 extensions"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 20bdc72..ceef722 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -14,7 +14,7 @@ check_all_SOURCES =  check_all.c check_suites.h check_public.c
 
 check-local: check-TESTS
 	$(RM) CheckLog.html
-	if test x$(HTML_CHECK_RESULT) = xtrue; then \
+	if test x$(HTML_CHECK_RESULT) = xyes; then \
 		$(XSLTPROC) $(srcdir)/CheckLog.xsl CheckLog*.xml > CheckLog.html; \
 	else \
 		touch CheckLog.html; \
-- 
1.8.3.3



More information about the Xcb mailing list