Build system: test for eplain (TeX package needed for Dynare++ source documentation)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2947 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
7ab6f19bbc
commit
af2e195d56
13
configure.ac
13
configure.ac
|
@ -62,6 +62,15 @@ AC_DEFINE([BOOST_NO_HASH])
|
|||
AC_CHECK_PROG([PDFTEX], [pdftex], [pdftex])
|
||||
AM_CONDITIONAL([HAVE_PDFTEX], [test "x$PDFTEX" != "x"])
|
||||
|
||||
if test "x$PDFTEX" != "x"; then
|
||||
AC_MSG_CHECKING([for eplain])
|
||||
AX_TEX_TEST([\input eplain
|
||||
\end
|
||||
], [ax_tex_have_eplain])
|
||||
AC_MSG_RESULT([$ax_tex_have_eplain])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_EPLAIN], [test "x$ax_tex_have_eplain" = "xyes"])
|
||||
|
||||
AC_CHECK_PROG([PDFLATEX], [pdflatex], [pdflatex])
|
||||
AM_CONDITIONAL([HAVE_PDFLATEX], [test "x$PDFLATEX" != "x"])
|
||||
|
||||
|
@ -172,10 +181,10 @@ else
|
|||
BUILD_DYNAREPLUSPLUS="no (missing one of: BLAS, LAPACK, POSIX Threads)"
|
||||
fi
|
||||
|
||||
if test "x$CWEAVE" != "x" -a x"$PDFTEX" != "x"; then
|
||||
if test "x$CWEAVE" != "x" -a x"$PDFTEX" != "x" -a "x$ax_tex_have_eplain" = "xyes"; then
|
||||
BUILD_DYNAREPLUSPLUS_SRCDOC="yes"
|
||||
else
|
||||
BUILD_DYNAREPLUSPLUS_SRCDOC="no (missing one of: cweave, pdftex)"
|
||||
BUILD_DYNAREPLUSPLUS_SRCDOC="no (missing one of: cweave, pdftex, eplain)"
|
||||
fi
|
||||
|
||||
if test "x$XSLTPROC" != "x" -a "x$DOCBOOK_XSLT_CURRENT_VERSION" != "xno"; then
|
||||
|
|
|
@ -43,11 +43,13 @@ dummy.ch:
|
|||
|
||||
if HAVE_CWEAVE
|
||||
if HAVE_PDFTEX
|
||||
if HAVE_EPLAIN
|
||||
pdf: main.web $(CWEBSRC)
|
||||
$(CWEAVE) -bhp main.web
|
||||
$(PDFTEX) main
|
||||
mv main.pdf integ.pdf
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
CLEANFILES = dummy.ch integ.pdf main.idx main.log main.scn main.tex main.toc
|
||||
|
|
|
@ -81,11 +81,13 @@ dummy.ch:
|
|||
|
||||
if HAVE_CWEAVE
|
||||
if HAVE_PDFTEX
|
||||
if HAVE_EPLAIN
|
||||
pdf: main.web $(CWEBSRC)
|
||||
$(CWEAVE) -bhp main.web
|
||||
$(PDFTEX) main
|
||||
mv main.pdf kord.pdf
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
CLEANFILES = dummy.ch kord.pdf main.idx main.log main.scn main.tex main.toc out.txt
|
||||
|
|
|
@ -109,11 +109,13 @@ dummy.ch:
|
|||
|
||||
if HAVE_CWEAVE
|
||||
if HAVE_PDFTEX
|
||||
if HAVE_EPLAIN
|
||||
pdf: main.web $(CWEBSRC)
|
||||
$(CWEAVE) -bhp main.web
|
||||
$(PDFTEX) main
|
||||
mv main.pdf tl.pdf
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
CLEANFILES = dummy.ch tl.pdf main.idx main.log main.scn main.tex main.toc
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
# ===========================================================================
|
||||
# http://www.nongnu.org/autoconf-archive/ax_latex_test.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# OBSOLETE MACRO
|
||||
#
|
||||
# Deprecated because of licensing issues. The Lesser GPL imposes licensing
|
||||
# restrictions on the generated configure script unless it is augmented
|
||||
# with an Autoconf Exception clause.
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_TEX_TEST(FILEDATA,VARIABLETOSET,[NOCLEAN])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macros execute the pdftex application with FILEDATA as input and set
|
||||
# VARIABLETOSET the yes or no depending of the result if NOCLEAN is set,
|
||||
# the folder used for the test is not delete after testing.
|
||||
#
|
||||
# The macro assumes that the variable PDFTEX is set.
|
||||
#
|
||||
# Adapted from the macro AX_LATEX_TEST by Sébastien Villemot.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Boretti Mathieu <boretti@eig.unige.ch>
|
||||
# Copyright (c) 2009 Dynare Team
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([AX_TEX_TEST],[
|
||||
rm -rf conftest.dir/.acltx
|
||||
AS_MKDIR_P([conftest.dir/.acltx])
|
||||
cd conftest.dir/.acltx
|
||||
m4_ifval([$2],[$2="no"; export $2;])
|
||||
cat > conftest.tex << ACLEOF
|
||||
$1
|
||||
ACLEOF
|
||||
cat conftest.tex | $PDFTEX 2>&1 1>output m4_ifval([$2],[&& $2=yes])
|
||||
cd ..
|
||||
cd ..
|
||||
sed 's/^/| /' conftest.dir/.acltx/conftest.tex >&5
|
||||
echo "$as_me:$LINENO: executing cat conftest.tex | $latex" >&5
|
||||
sed 's/^/| /' conftest.dir/.acltx/output >&5
|
||||
m4_ifval([$3],,[rm -rf conftest.dir/.acltx])
|
||||
])
|
Loading…
Reference in New Issue