AC_DEFUN([AC_SEARCH_LATEX_MK],
[
  success=no
  AC_CHECK_PROGS([ac_latex_mk],latex-mk, no)
  if test "x$ac_latex_mk" != xno; then
        if test -n "$LATEX_MK_DIR"; then
            AC_SUBST(LATEX_MK, "$ac_latex_mk")
            success=yes
        else 
            AC_WARN(latex-mk environment variable not set.)
        fi
  else
        AC_WARN(latex_mk not (properly) installed.)
  fi
  if test "x$success" != xyes; then
     AM_CONDITIONAL(HAVE_LATEX_MK, false)
  else
     AM_CONDITIONAL(HAVE_LATEX_MK, true)
  fi
])

