+AC_DEFUN(AC_STEPMAKE_KPATHSEA, [
+
+ kpathsea_b=yes
+ AC_ARG_WITH(kpathsea,
+ [ --with-kpathsea use kpathsea lib. Default: on],
+ [kpathsea_b=$enableval])
+
+ if test "$kpathsea_b" = "yes"; then
+ AC_HAVE_HEADERS(kpathsea/kpathsea.h)
+ AC_CHECK_LIB(kpathsea, kpse_find_file)
+ AC_CHECK_FUNCS(kpse_find_file,, AC_ERROR(Cannot find kpathsea functions. You should install kpathsea; see INSTALL.txt. Rerun ./configure --without-kpathsea only if kpathsea is not available for your platform.))
+ fi
+ AC_MSG_CHECKING(whether to use kpathsea)
+ if test "$kpathsea_b" = yes; then
+ AC_MSG_RESULT(yes)
+ KPATHSEA=1
+ else
+ AC_MSG_RESULT(no)
+ KPATHSEA=0
+ fi
+
+ AC_SUBST(KPATHSEA)
+ AC_DEFINE_UNQUOTED(KPATHSEA, $KPATHSEA)
+])
+