diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | m4/.gitignore | 8 | ||||
-rw-r--r-- | m4/lout.m4 | 54 |
4 files changed, 64 insertions, 4 deletions
@@ -5,7 +5,6 @@ Makefile.in aclocal.m4 autom4te.cache build-aux/* -m4/* config.cache config.log config.status diff --git a/configure.ac b/configure.ac index c7e9df4..a2de438 100644 --- a/configure.ac +++ b/configure.ac @@ -47,9 +47,8 @@ GUILE_MODULE_REQUIRED([srfi srfi-35]) GUILE_MODULE_REQUIRED([srfi srfi-37]) -# Look for Lout. -AC_PATH_PROG([LOUT], [lout]) -AM_CONDITIONAL([HAVE_LOUT], [test "x$LOUT" != "x"]) +# Look for a suitable version of Lout. +LOUT_PROGRAM([LOUT_REQUIRED_PACKAGE([math])]) # Look for `ps2pdf' from GhostScript. AC_PATH_PROG([PS2PDF], [ps2pdf]) diff --git a/m4/.gitignore b/m4/.gitignore new file mode 100644 index 0000000..1edc327 --- /dev/null +++ b/m4/.gitignore @@ -0,0 +1,8 @@ +gettext.m4 +iconv.m4 +lib-ld.m4 +lib-link.m4 +lib-prefix.m4 +nls.m4 +po.m4 +progtest.m4 diff --git a/m4/lout.m4 b/m4/lout.m4 new file mode 100644 index 0000000..442b168 --- /dev/null +++ b/m4/lout.m4 @@ -0,0 +1,54 @@ +dnl Copyright (C) 2008 Ludovic Courtès <ludo@gnu.org> +dnl +dnl This file is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This file is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this file; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + +dnl Usage: LOUT_PROGRAM [ACTION-IF-FOUND] [ACTION-IF-NOT-FOUND] +dnl +dnl Look for Lout. If found, define the `LOUT' environment variable +dnl containing its path, define Automake condition `HAVE_LOUT', and +dnl run ACTION-IF-FOUND. If not found, run ACTION-IF-NOT-FOUND. +AC_DEFUN([LOUT_PROGRAM], +[ + AC_PATH_PROG([LOUT], [lout]) + AM_CONDITIONAL([HAVE_LOUT], [test "x$LOUT" != "x"]) + if test "x$LOUT" != "x"; then + : + $1 + else + : + $2 + fi +]) + +dnl Usage: LOUT_REQUIRED_PACKAGE PACKAGE +dnl +dnl Makes sure Lout has package PACKAGE. +AC_DEFUN([LOUT_REQUIRED_PACKAGE], +[ + AC_MSG_CHECKING([whether Lout has package `$1']) + echo "@SysInclude { $1 }" | "$LOUT" 2> /dev/null + if test "$?" -eq 0; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Your installation of Lout doesn't have package `$1', please upgrade.]) + fi +]) + +dnl Local Variables: +dnl mode: autoconf +dnl coding: utf-8 +dnl End |