check for gsed in addition to sed
diff --git a/configure.ac b/configure.ac
index 007e581..4c62497 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,7 +87,7 @@ AC_PATH_PROG(KPSEWHICH, kpsewhich, no)
AC_PATH_PROG(DVIPS, dvips, no)
AC_PATH_PROG(CONVERT, convert, no)
AC_PATH_PROG(EPSTOPDF, epstopdf, no)
-AC_PATH_TOOL(SED, sed, no)
+AC_PATH_PROGS(SED, gsed sed, no)
if test "${DVIPS}" = "no" -o "${KPSEWHICH}" = "no" -o "${EPSTOPDF}" = "no" \
-o "${CONVERT}" = "no" -o "${SED}" = "no"; then
LATEX="no"