source: branches/0.5-stable/m4/_acltx_test.m4 @ 2081

Last change on this file since 2081 was 2081, checked in by Peter, 12 years ago

adding new macro from autoconf macro archive. refs #569

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Date
File size: 1.8 KB
Line 
1# ===========================================================================
2#              http://autoconf-archive.cryp.to/_acltx_test.html
3# ===========================================================================
4#
5# SYNOPSIS
6#
7#   _ACLTX_TEST(FILEDATA,VARIABLETOSET,[NOCLEAN])
8#
9# DESCRIPTION
10#
11#   This macros execute the latex application with FILEDATA as input and set
12#   VARIABLETOSET the yes or no depending of the result if NOCLEAN is set,
13#   the folder used for the test is not delete after testing.
14#
15# LAST MODIFICATION
16#
17#   2008-04-12
18#
19# COPYLEFT
20#
21#   Copyright (c) 2008 Boretti Mathieu <boretti@eig.unige.ch>
22#
23#   This library is free software; you can redistribute it and/or modify it
24#   under the terms of the GNU Lesser General Public License as published by
25#   the Free Software Foundation; either version 2.1 of the License, or (at
26#   your option) any later version.
27#
28#   This library is distributed in the hope that it will be useful, but
29#   WITHOUT ANY WARRANTY; without even the implied warranty of
30#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
31#   General Public License for more details.
32#
33#   You should have received a copy of the GNU Lesser General Public License
34#   along with this library. If not, see <http://www.gnu.org/licenses/>.
35
36AC_DEFUN([_ACLTX_TEST],[
37AC_REQUIRE([ACLTX_PROG_LATEX])
38rm -rf conftest.dir/.acltx
39AS_MKDIR_P([conftest.dir/.acltx])
40cd conftest.dir/.acltx
41m4_ifval([$2],[$2="no"; export $2;])
42cat > conftest.tex << ACLEOF
43$1
44ACLEOF
45cat conftest.tex | $latex 2>&1 1>output m4_ifval([$2],[&& $2=yes])
46cd ..
47cd ..
48sed 's/^/| /' conftest.dir/.acltx/conftest.tex >&5
49echo "$as_me:$LINENO: executing cat conftest.tex | $latex" >&5
50sed 's/^/| /' conftest.dir/.acltx/output >&5
51m4_ifval([$3],,[rm -rf conftest.dir/.acltx])
52])
Note: See TracBrowser for help on using the repository browser.