aclocal.glob, m4/: Split the monster into separate `aclocal'-ish files.
[runlisp] / m4 / mdw-dir-texmf.m4
CommitLineData
fb2149fc
MW
1dnl -*-autoconf-*-
2
3dnl --- *@-mdw_DIR_TEXMF-@* ---
4dnl
5dnl Author: Mark Wooding
6dnl
7dnl Synopsis: mdw_DIR_TEXMF
8dnl
9dnl Arguments: ---
10dnl
11dnl Use: Sets the substitution `texmfdir' as a sensible TeX install
12dnl tree.
13
14AC_DEFUN([mdw_DIR_TEXMF], [
15AC_ARG_WITH([texmfdir],
16[ --with-texmfdir=DIR set the TeX install directory to DIR],
17[texmfdir=$withval],
18[AC_MSG_CHECKING([where to put installed TeX files])
19mdw_DEFINE_PATHS([
20texmfdir='${datadir}/texmf'
21for d in \
22 '${datadir}/texmf' '${prefix}/lib/texmf' \
23 '${prefix}/texmf' '${libdir}/lib/texmf'; do
24 if test -d "mdw_PATH([$d])"; then
25 texmfdir=$d
26 break
27 fi
28done
29AC_MSG_RESULT([$texmfdir])])])
30AC_SUBST(texmfdir)])