chiark / gitweb /
m4/mdw-dir-texmf.m4, m4/mdw-manext.m4: Use `AS_HELP_STRING'.
[runlisp] / m4 / mdw-dir-texmf.m4
1 dnl -*-autoconf-*-
2
3 ### SYNOPSIS
4 ###
5 ###   mdw_DIR_TEXMF
6 ###
7 ### DESCRIPTION
8 ###
9 ###   Define the substitution `@texmfdir@' to name a sensible TeX
10 ###   installation root directory.
11 ###
12 ###   A `--with-texmfdir' command-line option is defined, which allows the
13 ###   end user to select a specific installation root.  The default is chosen
14 ###   according to a heuristic, which is currently to use the first of
15 ###
16 ###     * `DATADIR/texmf',
17 ###     * `PREFIX/lib/texmf',
18 ###     * `PREFIX/texmf',
19 ###     * `LIBDIR/lib/texmf'.
20 ###
21 ### LICENSE
22 ###
23 ###   Copyright (c) 2002 Mark Wooding <mdw@distorted.org.uk>
24 ###
25 ###   This program is free software: you can redistribute it and/or modify it
26 ###   under the terms of the GNU General Public License as published by the
27 ###   Free Software Foundation, either version 2 of the License, or (at your
28 ###   option) any later version.
29 ###
30 ###   This program is distributed in the hope that it will be useful, but
31 ###   WITHOUT ANY WARRANTY; without even the implied warranty of
32 ###   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
33 ###   General Public License for more details.
34 ###
35 ###   You should have received a copy of the GNU General Public License along
36 ###   with this program. If not, see <http://www.gnu.org/licenses/>.
37 ###
38 ###   As a special exception, the respective Autoconf Macro's copyright owner
39 ###   gives unlimited permission to copy, distribute and modify the configure
40 ###   scripts that are the output of Autoconf when processing the Macro. You
41 ###   need not follow the terms of the GNU General Public License when using
42 ###   or distributing such scripts, even though portions of the text of the
43 ###   Macro appear in them. The GNU General Public License (GPL) does govern
44 ###   all other use of the material that constitutes the Autoconf Macro.
45 ###
46 ###   This special exception to the GPL applies to versions of the Autoconf
47 ###   Macro released by the Autoconf Archive. When you make and distribute a
48 ###   modified version of the Autoconf Macro, you may extend this special
49 ###   exception to the GPL to apply to your modified version as well.
50
51 # serial 1
52 AC_DEFUN([mdw_DIR_TEXMF],[
53 AC_ARG_WITH([texmfdir],
54 [AS_HELP_STRING([--with-texmfdir=DIR],
55                 [set the TeX install directory to DIR])],
56 [texmfdir=$withval],
57 [AC_MSG_CHECKING([where to put installed TeX files])
58 mdw_DEFINE_PATHS([
59 texmfdir='${datadir}/texmf'
60 for d in \
61   '${datadir}/texmf' '${prefix}/lib/texmf' \
62   '${prefix}/texmf' '${libdir}/lib/texmf'; do
63   if test -d "mdw_PATH([$d])"; then
64     texmfdir=$d
65     break
66   fi
67 done
68 AC_MSG_RESULT([$texmfdir])])])
69 AC_SUBST(texmfdir)])