dnl -*-fundamental-*- *@--GLOB-HEADER--@*
dnl
-dnl $Id: aclocal.glob,v 1.14 2002/02/03 19:15:15 mdw Exp $
+dnl $Id: aclocal.glob,v 1.16 2003/04/23 12:47:22 mdw Exp $
dnl
dnl Common library of autoconf macros
dnl
dnl----- Revision history ---------------------------------------------------
dnl
dnl $Log: aclocal.glob,v $
+dnl Revision 1.16 2003/04/23 12:47:22 mdw
+dnl Add mdw_MANEXT.
+dnl
+dnl Revision 1.15 2002/02/19 22:50:24 mdw
+dnl Fix spelling. Add new macro which works out where to put TeX files.
+dnl
dnl Revision 1.14 2002/02/03 19:15:15 mdw
dnl Add SDL-finding equipment. Quote some macro names which need it. Add
dnl long-overdue macros for expanding configured paths (and do it
dnl----- Common files distribution --------------------------- *@--NOTICE--@*
dnl
-dnl $Id: aclocal.glob,v 1.14 2002/02/03 19:15:15 mdw Exp $
+dnl $Id: aclocal.glob,v 1.16 2003/04/23 12:47:22 mdw Exp $
dnl --- *@-AM_PROG_CC_STDC-@* ---
dnl
dnl
dnl Author: Mark Wooding
dnl
-dnl Synopsys: mdw_DEFINE_FILES(CODE)
+dnl Synopsis: mdw_DEFINE_FILES(CODE)
dnl
dnl Arguments: CODE = shell script code to execute
dnl
AC_DEFUN([mdw_DEFINE_PROG], [AC_DEFINE_UNQUOTED([$1], ["mdw_PROG([$2])"])])
AC_DEFUN([mdw_DEFINE_PATH], [AC_DEFINE_UNQUOTED([$1], ["mdw_PATH([$2])"])])
+dnl --- *@-mdw_DIR_TEXMF-@* ---
+dnl
+dnl Author: Mark Wooding
+dnl
+dnl Synopsis: mdw_DIR_TEXMF
+dnl
+dnl Arguments: ---
+dnl
+dnl Use: Sets the substitution `texmfdir' as a sensible TeX install
+dnl tree.
+
+AC_DEFUN([mdw_DIR_TEXMF], [
+AC_ARG_WITH([texmfdir],
+[ --with-texmfdir=DIR set the TeX install directory to DIR],
+[texmfdir=$withval],
+[AC_MSG_CHECKING([where to put installed TeX files])
+mdw_DEFINE_PATHS([
+texmfdir='${datadir}/texmf'
+for d in \
+ '${datadir}/texmf' '${prefix}/lib/texmf' \
+ '${prefix}/texmf' '${libdir}/lib/texmf'; do
+ if test -d "mdw_PATH([$d])"; then
+ texmfdir=$d
+ break
+ fi
+done
+AC_MSG_RESULT([$texmfdir])])])
+AC_SUBST(texmfdir)])
+
+dnl --- *@-mdw_MANEXT-@* ---
+dnl
+dnl Author: Mark Wooding
+dnl
+dnl Synopsis: mdw_MANEXT
+dnl
+dnl Arguments: ---
+dnl
+dnl Use: Sets the substitution `manext' for man page extensions.
+
+AC_DEFUN([mdw_MANEXT], [
+AC_ARG_WITH([man-ext],
+[ --with-man-ext=EXT give manpages the EXT extension (e.g., foo.3EXT)],
+[manext=$withval], [manext=mLib])
+AC_SUBST(manext)])
+
dnl----- That's all, folks --------------------------------- *@--GLOB-END--@*