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.
This commit is contained in:
Richard Boulton 2001-01-07 13:58:57 +00:00
parent 0459d59aeb
commit a33e291b6a
2 changed files with 26 additions and 4 deletions

View file

@ -76,6 +76,23 @@ AC_CHECK_PROG(HAVE_PS2PDF, ps2pdf, true, false)
dnl check for image conversion tool dnl check for image conversion tool
AC_CHECK_PROG(HAVE_FIG2DEV, fig2dev, true, false) 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 </dev/null 2>&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 </dev/null 2>&1 >/dev/null`
if test "x$fig2dev_quiet" = "x" ; then
HAVE_FIG2DEV_EPS=true
fi
fi
dnl Set up conditionals for (target) architecture: dnl Set up conditionals for (target) architecture:
dnl ============================================== dnl ==============================================
@ -496,7 +513,8 @@ AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC)
AM_CONDITIONAL(HAVE_DB2HTML, $HAVE_DB2HTML) AM_CONDITIONAL(HAVE_DB2HTML, $HAVE_DB2HTML)
AM_CONDITIONAL(HAVE_DB2PS, $HAVE_DB2PS) AM_CONDITIONAL(HAVE_DB2PS, $HAVE_DB2PS)
AM_CONDITIONAL(HAVE_PS2PDF, $HAVE_PS2PDF) 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_CDPARANOIA, test "x$HAVE_CDPARANOIA" = "xyes")
AM_CONDITIONAL(HAVE_LIBLAME, test "x$HAVE_LIBLAME" = "xyes") AM_CONDITIONAL(HAVE_LIBLAME, test "x$HAVE_LIBLAME" = "xyes")
AM_CONDITIONAL(HAVE_LIBESD, test "x$HAVE_LIBESD" = "xyes") AM_CONDITIONAL(HAVE_LIBESD, test "x$HAVE_LIBESD" = "xyes")

View file

@ -10,7 +10,7 @@
PDFFILES=$(manualname).pdf PDFFILES=$(manualname).pdf
PSFILES=$(manualname).ps PSFILES=$(manualname).ps
if HAVE_FIG2DEV if HAVE_FIG2DEV_PNG
$(manualname)/$(htmlname): $(sgml_files) $(png_files) $(manualname)/$(htmlname): $(sgml_files) $(png_files)
else else
$(manualname)/$(htmlname): $(sgml_files) $(manualname)/$(htmlname): $(sgml_files)
@ -29,12 +29,12 @@ else
echo "Can't build $@: don't have ps2pdf tool" echo "Can't build $@: don't have ps2pdf tool"
endif endif
if HAVE_FIG2DEV if HAVE_FIG2DEV_EPS
$(manualname).ps: $(sgml_files) $(eps_files) $(manualname).ps: $(sgml_files) $(eps_files)
else else
$(manualname).ps: $(sgml_files) $(manualname).ps: $(sgml_files)
endif endif
if HAVE_PS2PDF if HAVE_DB2PS
@if [ -r $< ] ; then db2ps $(manualname).sgml ; fi @if [ -r $< ] ; then db2ps $(manualname).sgml ; fi
else else
echo "Can't build $@: don't have db2ps tool" echo "Can't build $@: don't have db2ps tool"
@ -43,11 +43,15 @@ endif
images : images :
mkdir images mkdir images
if HAVE_FIG2DEV_PNG
images/%.png : %.fig images images/%.png : %.fig images
fig2dev -L png -s 16 $< $@ fig2dev -L png -s 16 $< $@
endif
if HAVE_FIG2DEV_EPS
images/%.eps : %.fig images images/%.eps : %.fig images
fig2dev -L eps -s 16 -m 0.5 $< $@ fig2dev -L eps -s 16 -m 0.5 $< $@
endif
$(manualname)/images: $(manualname)/images:
@ln -sf ../images $(manualname)/images @ln -sf ../images $(manualname)/images