chiark / gitweb /
6e1c0ee5cf7818de1e74f7344d9466d3abfbf5cd
[runlisp] / m4 / mdw-dir-texmf.m4
1 dnl -*-autoconf-*-
2
3 dnl --- *@-mdw_DIR_TEXMF-@* ---
4 dnl
5 dnl Author:     Mark Wooding
6 dnl
7 dnl Synopsis:   mdw_DIR_TEXMF
8 dnl
9 dnl Arguments:  ---
10 dnl
11 dnl Use:        Sets the substitution `texmfdir' as a sensible TeX install
12 dnl             tree.
13
14 AC_DEFUN([mdw_DIR_TEXMF], [
15 AC_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])
19 mdw_DEFINE_PATHS([
20 texmfdir='${datadir}/texmf'
21 for 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
28 done
29 AC_MSG_RESULT([$texmfdir])])])
30 AC_SUBST(texmfdir)])