doc: for ps to pdf conversion, use "acrodist", "ps2pdf" or "pstopdf"
authorH. Peter Anvin <hpa@zytor.com>
Thu, 19 Jun 2008 18:39:23 +0000 (11:39 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 19 Jun 2008 18:39:23 +0000 (11:39 -0700)
For PostScript to PDF conversion, use whichever of "acrodist",
"ps2pdf", or "pstopdf" which we can find on the system.  I haven't
tried either acrodist or pstopdf myself, only going my the
documentation, but prefer acrodist since it is claimed to produce
smaller output files than ps2pdf.

configure.in
doc/Makefile.in

index 9e79f34..0d53653 100644 (file)
@@ -66,9 +66,11 @@ PA_ADD_CFLAGS([-Wall])
 PA_ADD_CFLAGS([-std=c99])
 PA_ADD_CFLAGS([-pedantic])
 
-dnl Look for "nroff" or "groff"
-AC_CHECK_PROGS(NROFF, nroff, echo)
-AC_SUBST(NROFF)
+dnl Look for programs...
+AC_CHECK_PROGS(NROFF,    nroff,    echo)
+AC_CHECK_PROGS(ACRODIST, acrodist, false)
+AC_CHECK_PROGS(PS2PDF,   ps2pdf,   false)
+AC_CHECK_PROGS(PSTOPDF,  pstopdf,  false)
 
 dnl Checks for header files.
 AC_HEADER_STDC
index 4f2328f..cf283ec 100644 (file)
@@ -19,7 +19,12 @@ INSTALL_DATA = @INSTALL_DATA@
 PERL           = perl
 MAKEINFO       = makeinfo
 TEXI2DVI        = texi2dvi
-PS2PDF          = ps2pdf               # Part of GhostScript
+TEXI2IPF       = texi2ipf
+IPFC           = ipfc
+
+ACRODIST       = @ACRODIST@            # Acrobat Distiller
+PSTOPDF                = @PSTOPDF@             # BSD/MacOS X utility
+PS2PDF          = @PS2PDF@             # Part of GhostScript
 
 SRCS           = nasmdoc.src
 OUT            = info html nasmdoc.txt nasmdoc.ps nasmdoc.pdf
@@ -57,7 +62,9 @@ nasmdoc.ps: nasmdoc.dip nasmlogo.eps $(srcdir)/../version genpsdriver.pl \
        $(PERL) $(srcdir)/genpsdriver.pl > nasmdoc.ps
 
 nasmdoc.pdf: nasmdoc.ps
-       $(PS2PDF) nasmdoc.ps
+       $(ACRODIST) -n -q --nosecurity -o $@ $< || \
+       $(PS2PDF) $< $@ || \
+       $(PSTOPDF) $< -o $@ 
 
 .PHONY: info
 info: info/nasm.info