+AC_CHECK_FUNCS([chroot fopencookie funopen gettext isinf mbrtowc memmem snprintf vsnprintf wcrtomb])
+AC_CHECK_HEADERS([utf8/wchar.h], LIBS="$LIBS -lutf8")
+AC_SEARCH_LIBS(mbrtowc, [mingwex msvcp60])
+
+STEPMAKE_PROGS(PKG_CONFIG, pkg-config, REQUIRED, 0.9.0)
+
+if test "$gui_b" = "yes"; then
+ STEPMAKE_GTK2(gtk+-2.0, REQUIRED, 2.4.0)
+fi
+
+if test "$reloc_b" = "yes"; then
+ AC_DEFINE(ARGV0_RELOCATION)
+fi
+
+
+HOST_ARCH=`$CC -dumpmachine`
+AC_SUBST(HOST_ARCH)
+
+STEPMAKE_PANGO_FT2(pangoft2, REQUIRED, 1.6.0)
+#STEPMAKE_PANGO(pango, REQUIRED, 1.6.0)
+STEPMAKE_FONTCONFIG(fontconfig, REQUIRED, 2.2.0)
+STEPMAKE_FREETYPE2(freetype2, REQUIRED, 2.1.10)
+
+STEPMAKE_WINDOWS
+
+## Optional tools for building documentation, website, extra fonts.
+
+# guile executable for some scripts
+STEPMAKE_GUILE(OPTIONAL)
+
+# perl for help2man.
+STEPMAKE_PERL(OPTIONAL)
+
+# New makeinfo for multi-page website docs Simply always require new
+# makeinfo should avoid bug reports; if people want to build lily
+# without the docs, they can find this comment and use an older
+# makeinfo--but hopefully won't report makeinfo problems.
+STEPMAKE_PROGS(MAKEINFO, makeinfo, REQUIRED, 4.8)