From beb1b5cd052a37386395d413dce6586149fa74db Mon Sep 17 00:00:00 2001 From: panne Date: Mon, 13 Sep 2004 19:25:38 +0000 Subject: [PATCH] [project @ 2004-09-13 19:25:38 by panne] Improve fop detection now that SuSE has fixed their broken /usr/bin/fop --- aclocal.m4 | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index f16094d..d5a6cd8 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -912,14 +912,66 @@ fi ])# FP_CHECK_DOCBOOK_DTD +# FP_GEN_FO +# ------------------ +# Generates a formatting objects document in conftest.fo. +AC_DEFUN([FP_GEN_FO], +[rm -f conftest.fo +cat > conftest.fo << EOF + + + + + + + + + + + Test! + + + + +EOF +]) # FP_GEN_FO + + +# FP_PROG_FOP +# ----------- +# Set the output variable 'FopCmd' to the first working 'fop' in the current +# 'PATH'. Note that /usr/bin/fop is broken in SuSE 9.1 (unpatched), so try +# /usr/share/fop/fop.sh in that case (or no 'fop'), too. +AC_DEFUN([FP_PROG_FOP], +[AC_PATH_PROGS([FopCmd1], [fop]) +if test -n "$FopCmd1"; then + AC_CACHE_CHECK([for $FopCmd1 usability], [fp_cv_fop_usability], + [FP_GEN_FO + if "$FopCmd1" -fo conftest.fo -ps conftest.ps > /dev/null 2>&1; then + fp_cv_fop_usability=yes + else + fp_cv_fop_usability=no + fi + rm -rf conftest*]) + if test x"$fp_cv_fop_usability" = xyes; then + FopCmd=$FopCmd1 + fi +fi +if test -z "$FopCmd"; then + AC_PATH_PROGS([FopCmd2], [fop.sh], , [/usr/share/fop]) + FopCmd=$FopCmd2 +fi +AC_SUBST([FopCmd]) +])# FP_PROG_FOP + + # FP_PROG_FO_PROCESSOR # -------------------- # Try to find an FO processor. PassiveTeX output is sometimes a bit strange, so -# try FOP first. Furthermore, /usr/bin/fop is broken in SuSE 9.1, so try the -# "real" fop.sh first. Sets the output variables FopCmd, XmltexCmd, DvipsCmd, -# and PdfxmltexCmd. +# try FOP first. Sets the output variables FopCmd, XmltexCmd, DvipsCmd, and +# PdfxmltexCmd. AC_DEFUN([FP_PROG_FO_PROCESSOR], -[AC_PATH_PROGS([FopCmd], [fop.sh fop], [], [$PATH:/usr/share/fop]) +[AC_REQUIRE([FP_PROG_FOP]) AC_PATH_PROG([XmltexCmd], [xmltex]) AC_PATH_PROG([DvipsCmd], [dvips]) if test -z "$FopCmd"; then -- 1.7.10.4