From a33e291b6af8d245b6ebdf3cd8b51cf81428393c Mon Sep 17 00:00:00 2001 From: Richard Boulton Date: Sun, 7 Jan 2001 13:58:57 +0000 Subject: [PATCH] Add tests for -L png and -L eps arguments to fig2dev. Original commit message from CVS: Add tests for -L png and -L eps arguments to fig2dev. Correct slip in docs/manuals.mak which used HAVE_DB2PS instead of HAVE_PS2PDF. --- configure.in | 20 +++++++++++++++++++- docs/manuals.mak | 10 +++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index 2651de3216..6b312d4490 100644 --- a/configure.in +++ b/configure.in @@ -76,6 +76,23 @@ AC_CHECK_PROG(HAVE_PS2PDF, ps2pdf, true, false) dnl check for image conversion tool AC_CHECK_PROG(HAVE_FIG2DEV, fig2dev, true, false) +dnl The following is a hack: if fig2dev doesn't display an error message +dnl for the desired type, we assume it supports it. +HAVE_FIG2DEV_PNG=false +if test "x$HAVE_FIG2DEV" = "xtrue" ; then + fig2dev_quiet=`fig2dev -L png &1 >/dev/null` + if test "x$fig2dev_quiet" = "x" ; then + HAVE_FIG2DEV_PNG=true + fi +fi +HAVE_FIG2DEV_EPS=false +if test "x$HAVE_FIG2DEV" = "xtrue" ; then + fig2dev_quiet=`fig2dev -L eps &1 >/dev/null` + if test "x$fig2dev_quiet" = "x" ; then + HAVE_FIG2DEV_EPS=true + fi +fi + dnl Set up conditionals for (target) architecture: dnl ============================================== @@ -496,7 +513,8 @@ AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC) AM_CONDITIONAL(HAVE_DB2HTML, $HAVE_DB2HTML) AM_CONDITIONAL(HAVE_DB2PS, $HAVE_DB2PS) AM_CONDITIONAL(HAVE_PS2PDF, $HAVE_PS2PDF) -AM_CONDITIONAL(HAVE_FIG2DEV, $HAVE_FIG2DEV) +AM_CONDITIONAL(HAVE_FIG2DEV_PNG, $HAVE_FIG2DEV_PNG) +AM_CONDITIONAL(HAVE_FIG2DEV_EPS, $HAVE_FIG2DEV_EPS) AM_CONDITIONAL(HAVE_CDPARANOIA, test "x$HAVE_CDPARANOIA" = "xyes") AM_CONDITIONAL(HAVE_LIBLAME, test "x$HAVE_LIBLAME" = "xyes") AM_CONDITIONAL(HAVE_LIBESD, test "x$HAVE_LIBESD" = "xyes") diff --git a/docs/manuals.mak b/docs/manuals.mak index 4bba6ae992..dcdd1f044d 100644 --- a/docs/manuals.mak +++ b/docs/manuals.mak @@ -10,7 +10,7 @@ PDFFILES=$(manualname).pdf PSFILES=$(manualname).ps -if HAVE_FIG2DEV +if HAVE_FIG2DEV_PNG $(manualname)/$(htmlname): $(sgml_files) $(png_files) else $(manualname)/$(htmlname): $(sgml_files) @@ -29,12 +29,12 @@ else echo "Can't build $@: don't have ps2pdf tool" endif -if HAVE_FIG2DEV +if HAVE_FIG2DEV_EPS $(manualname).ps: $(sgml_files) $(eps_files) else $(manualname).ps: $(sgml_files) endif -if HAVE_PS2PDF +if HAVE_DB2PS @if [ -r $< ] ; then db2ps $(manualname).sgml ; fi else echo "Can't build $@: don't have db2ps tool" @@ -43,11 +43,15 @@ endif images : mkdir images +if HAVE_FIG2DEV_PNG images/%.png : %.fig images fig2dev -L png -s 16 $< $@ +endif +if HAVE_FIG2DEV_EPS images/%.eps : %.fig images fig2dev -L eps -s 16 -m 0.5 $< $@ +endif $(manualname)/images: @ln -sf ../images $(manualname)/images