diff --git a/configure.ac b/configure.ac index e6cbe21..417b09e 100644 --- a/configure.ac +++ b/configure.ac @@ -143,11 +143,15 @@ AM_CONDITIONAL(DOXYGEN, test "${DOXYGEN}" != "no") # Build LaTeX documentation? AC_PATH_PROG(LATEX, latex, no) +AC_PATH_PROG(DVIPS, dvips, no) +if test "${DVIPS}" = "no"; then + LATEX="no" +fi AC_MSG_CHECKING(for a4wide.sty) if test -f /usr/share/texmf/tex/latex/misc/a4wide.sty; then AC_MSG_RESULT(yes) else - LATEX=no + LATEX="no" AC_MSG_RESULT(no) fi AM_CONDITIONAL(LATEX, test "${LATEX}" != "no") diff --git a/doc/Makefile.am b/doc/Makefile.am index 735904b..97622a0 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -23,7 +23,9 @@ endif stamp-latex: stamp-doxygen if DOXYGEN if LATEX - rm -f latex/libcaca.ps + rm -f latex/libcaca.tex latex/libcaca.ps + mv latex/refman.tex latex/libcaca.tex + sed 's/setlength{/renewcommand{/' latex/libcaca.tex > latex/refman.tex cd latex && $(MAKE) $(AM_CFLAGS) ps mv latex/refman.ps latex/libcaca.ps touch stamp-latex