Skip to content
Snippets Groups Projects
Verified Commit 1ec3923a authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Build system: by default, error out if LaTeX distribution is not there

A new --disable-doc configure flag has been introduced to skip the compilation
of the documentation.
parent a61565bd
No related branches found
No related tags found
No related merge requests found
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl Copyright © 2009-2018 Dynare Team dnl Copyright © 2009-2019 Dynare Team
dnl dnl
dnl This file is part of Dynare. dnl This file is part of Dynare.
dnl dnl
...@@ -77,19 +77,20 @@ CPPFLAGS="$CPPFLAGS_SAVED" ...@@ -77,19 +77,20 @@ CPPFLAGS="$CPPFLAGS_SAVED"
# Don't use deprecated hash structures # Don't use deprecated hash structures
AC_DEFINE([BOOST_NO_HASH], [], [Don't use deprecated STL hash structures]) AC_DEFINE([BOOST_NO_HASH], [], [Don't use deprecated STL hash structures])
# Check if internal documentation can be built
AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen]) AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen])
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
AC_CHECK_PROG([PDFLATEX], [pdflatex], [pdflatex]) # Check if user documentation can be built
AM_CONDITIONAL([HAVE_PDFLATEX], [test -n "$PDFLATEX"]) AC_ARG_ENABLE([doc], AS_HELP_STRING([--disable-doc], [disable compilation of documentation]), [], [enable_doc=yes])
AM_CONDITIONAL([ENABLE_DOC], [test "$enable_doc" = yes])
AC_CHECK_PROG([BIBTEX], [bibtex], [bibtex]) if test "$enable_doc" = yes; then
AM_CONDITIONAL([HAVE_BIBTEX], [test -n "$BIBTEX"]) AC_CHECK_PROG([PDFLATEX], [pdflatex], [pdflatex], [AC_MSG_ERROR([pdflatex cannot be found. If you want to skip the compilation of the documentation, pass the --disable-doc flag.])])
AC_CHECK_PROG([BIBTEX], [bibtex], [bibtex], [AC_MSG_ERROR([bibtex cannot be found. If you want to skip the compilation of the documentation, pass the --disable-doc flag.])])
if test -n "$PDFLATEX" -a -n "$BIBTEX"; then AX_LATEX_CLASS([beamer], [ax_latex_have_beamer], [], [AC_MSG_ERROR([beamer cannot be found. If you want to skip the compilation of the documentation, pass the --disable-doc flag.])])
AX_LATEX_CLASS([beamer], [ax_latex_have_beamer])
fi fi
AM_CONDITIONAL([HAVE_BEAMER], [test "$ax_latex_have_beamer" = yes])
AC_CONFIG_FILES([Makefile AC_CONFIG_FILES([Makefile
src/Makefile src/Makefile
...@@ -100,16 +101,15 @@ AC_CONFIG_FILES([Makefile ...@@ -100,16 +101,15 @@ AC_CONFIG_FILES([Makefile
]) ])
if test -n "$DOXYGEN"; then if test -n "$DOXYGEN"; then
BUILD_DYNARE_PREPROC_DOC="yes" BUILD_INTERNAL_DOC="yes"
else else
BUILD_DYNARE_PREPROC_DOC="no (missing doxygen)" BUILD_INTERNAL_DOC="no (missing doxygen)"
fi fi
if test "$enable_doc" = yes; then
if test -n "$PDFLATEX" -a "$ax_latex_have_beamer" = yes; then BUILD_DOC="yes"
BUILD_BEAMER_DOC="yes"
else else
BUILD_BEAMER_DOC="no (missing one of: pdflatex, beamer)" BUILD_DOC="no"
fi fi
AC_MSG_NOTICE([ AC_MSG_NOTICE([
...@@ -120,10 +120,10 @@ Binaries (with "make") ...@@ -120,10 +120,10 @@ Binaries (with "make")
Dynare preprocessor: yes Dynare preprocessor: yes
PDF documentation (with "make pdf"): PDF documentation (with "make pdf"):
Preprocessor & Macroprocessor presentations: $BUILD_BEAMER_DOC Preprocessor & Macroprocessor presentations: $BUILD_DOC
HTML documentation (with "make html"): HTML documentation (with "make html"):
Dynare preprocessor developer doc: $BUILD_DYNARE_PREPROC_DOC Dynare preprocessor internal doc: $BUILD_INTERNAL_DOC
]) ])
......
SUBDIRS = preprocessor macroprocessor SUBDIRS = preprocessor macroprocessor
PDF_TARGETS =
EXTRA_DIST = logos EXTRA_DIST = logos
pdf-local: $(PDF_TARGETS)
if HAVE_PDFLATEX if ENABLE_DOC
if HAVE_BEAMER
pdf-local: macroprocessor.pdf pdf-local: macroprocessor.pdf
endif endif
endif
SRC = macroprocessor.tex new-design.pdf SRC = macroprocessor.tex new-design.pdf
......
if HAVE_PDFLATEX if ENABLE_DOC
if HAVE_BEAMER
pdf-local: preprocessor.pdf pdf-local: preprocessor.pdf
endif endif
endif
SRC = preprocessor.tex expr.png expr-sharing.png matrices.png overview.png json-preprocessor.png SRC = preprocessor.tex expr.png expr-sharing.png matrices.png overview.png json-preprocessor.png
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment