From 2fd385c6703ef01fb52335179513392260add373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 12 Oct 2015 13:50:03 -0400 Subject: [PATCH] build-sys: check for xsltproc when building manpages Only check for xsltproc if it will be used. If not found, complain. https://github.com/systemd/systemd/issues/1521 --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 5e3cdd6d2b..c658c7fca3 100644 --- a/configure.ac +++ b/configure.ac @@ -93,7 +93,6 @@ AC_PROG_GREP AC_PROG_AWK AC_PATH_PROG([M4], [m4]) -AC_PATH_PROG([XSLTPROC], [xsltproc]) AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon], [$PATH:/usr/sbin:/sbin]) AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck], [$PATH:/usr/sbin:/sbin]) @@ -1286,7 +1285,12 @@ AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes]) # ------------------------------------------------------------------------------ have_manpages=no AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages])) -AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes]) +AS_IF([test "x$enable_manpages" != xno], [ + have_manpages=yes + AC_PATH_PROG([XSLTPROC], [xsltproc]) + AS_IF([test -z "$XSLTPROC"], + AC_MSG_ERROR([*** xsltproc is required for man pages])) +]) AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) # ------------------------------------------------------------------------------