[2081] | 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 | |
---|
| 36 | AC_DEFUN([_ACLTX_TEST],[ |
---|
| 37 | AC_REQUIRE([ACLTX_PROG_LATEX]) |
---|
| 38 | rm -rf conftest.dir/.acltx |
---|
| 39 | AS_MKDIR_P([conftest.dir/.acltx]) |
---|
| 40 | cd conftest.dir/.acltx |
---|
| 41 | m4_ifval([$2],[$2="no"; export $2;]) |
---|
| 42 | cat > conftest.tex << ACLEOF |
---|
| 43 | $1 |
---|
| 44 | ACLEOF |
---|
[2091] | 45 | $latex conftest.tex 2>&1 1>output m4_ifval([$2],[&& $2=yes]) |
---|
[2081] | 46 | cd .. |
---|
| 47 | cd .. |
---|
[2091] | 48 | sed 's/^/| /' conftest.dir/.acltx/conftest.tex >&AS_MESSAGE_LOG_FD |
---|
| 49 | echo "$as_me:$LINENO: executing $latex conftest.tex" >&AS_MESSAGE_LOG_FD |
---|
| 50 | sed 's/^/| /' conftest.dir/.acltx/output >&AS_MESSAGE_LOG_FD |
---|
[2081] | 51 | m4_ifval([$3],,[rm -rf conftest.dir/.acltx]) |
---|
| 52 | ]) |
---|