m4/: Reformat to match current m4/shell style.
[runlisp] / m4 / mdw-dir-texmf.m4
index e2bfd45..1d9f60a 100644 (file)
@@ -49,20 +49,24 @@ dnl -*-autoconf-*-
 ###   exception to the GPL to apply to your modified version as well.
 
 # serial 1
-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_DEFUN([mdw_DIR_TEXMF],
+[AC_ARG_WITH([texmfdir],
+            [AS_HELP_STRING([--with-texmfdir=DIR],
+                            [set the TeX install directory to DIR])],
+            [texmfdir=$withval],
+            [texmfdir=guess])
+case $texmfdir in
+  guess)
+    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])
+    ;;
+esac
 AC_SUBST(texmfdir)])