<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Fri, 2010-01-22 at 09:39 -0800, Dan Nicholson wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Fri, Jan 22, 2010 at 6:34 AM, Gaetan Nadon <<A HREF="mailto:memsize@videotron.ca">memsize@videotron.ca</A>> wrote:
> The default is passiveTex which does not work.
> Add XMLFOP and HAVE_XMLFOP to skip pdf if fop is missing.
>
> Signed-off-by: Gaetan Nadon <<A HREF="mailto:memsize@videotron.ca">memsize@videotron.ca</A>>
> ---
> Makefile.am | 7 +++++--
> configure.ac | 9 +++++++++
> 2 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index fe4639c..41abd05 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -175,7 +175,10 @@ EXTRA_DIST += doc/xfs-design.xml doc/xfs-design.css doc/xfs-design.xsl
>
> if MAKE_DEVEL_DOCS
> if HAVE_XMLTO
> -noinst_DATA = doc/xfs-design/index.html doc/xfs-design.pdf doc/xfs-design.txt
> +noinst_DATA = doc/xfs-design/index.html doc/xfs-design.txt
> +if HAVE_XMLFOP
> +noinst_DATA += doc/xfs-design.pdf
> +endif HAVE_XMLFOP
> CLEANFILES += $(noinst_DATA)
>
> doc/xfs-design/index.html: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl doc/xfs-design/xfs-design.css
> @@ -190,7 +193,7 @@ clean-local:
> -rm -rf doc/xfs-design
>
> doc/xfs-design.pdf: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl
> - $(AM_V_GEN)$(XMLTO) -m $(srcdir)/doc/xfs-design.xsl -o doc pdf $(srcdir)/doc/xfs-design.xml
> + $(AM_V_GEN)$(XMLTO) --with-fop -m $(srcdir)/doc/xfs-design.xsl -o doc pdf $(srcdir)/doc/xfs-design.xml
>
> doc/xfs-design.txt: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl
> $(AM_V_GEN)$(XMLTO) -m $(srcdir)/doc/xfs-design.xsl -o doc txt $(srcdir)/doc/xfs-design.xml
> diff --git a/configure.ac b/configure.ac
> index b429ed5..85bcac6 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -95,6 +95,15 @@ AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [
> [ FONTPATH="${DEFAULT_FONT_PATH}" ])
> AC_SUBST([FONTPATH])
>
> +AC_PATH_PROG([XMLFOP], [fop])
> +if test "x$XMLFOP" = "x"; then
> + AC_MSG_WARN([fop not found - pdf documentation targets will be skipped])
> + have_xmlfop=no
Actually, AC_PATH_PROG will make the variable XMLFOP="no" when fop is
not found, not an empty string. So, the test should be "x$XMLFOP" =
xno.
</PRE>
</BLOCKQUOTE>
<BR>
It does not seem to behave that way on my system:<BR>
AC_PATH_PROG([XMLFOP], [fop])<BR>
AS_ECHO("---->"$XMLFOP"<-----")<BR>
yields:
<BLOCKQUOTE>
<PRE>
checking for fop... no
----><-----
</PRE>
</BLOCKQUOTE>
Autoconf 2.63 on Debian<BR>
<BR>
In config.log:<BR>
HAVE_XMLFOP_FALSE='' <BR>
HAVE_XMLFOP_TRUE='#' Means makefile code is commented out if true<BR>
<BR>
In Makefile:<BR>
#am__append_1 = doc/xfs-design.pdf This target is commented out, no pdf gets generated<BR>
<BR>
Thanks
<BLOCKQUOTE TYPE=CITE>
<PRE>
> +else
> + have_xmlfop=yes
> +fi
> +AM_CONDITIONAL([HAVE_XMLFOP], [test "$have_xmlfop" = yes])
Other than that, it looks fine to me.
Reviewed-by: Dan Nicholson <<A HREF="mailto:dbn.lists@gmail.com">dbn.lists@gmail.com</A>>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>