  
  dnl --------------------------------------------------
  dnl Check for generally needed libraries
-@@ -251,6 +252,47 @@
+@@ -251,6 +252,50 @@
  AM_CONDITIONAL(HAVE_LIBSPEEX, test "x$have_libspeex" = "xyes")
  AC_SUBST(SPEEX_LIBS)
  
 +dnl ------------------- Kate -------------------------
 +
++KATE_CFLAGS=""
 +KATE_LIBS=""
 +if test "x$build_kate" = xyes; then
 +  AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
 +  if test "x$HAVE_PKG_CONFIG" = "xyes"
 +  then
-+    PKG_CHECK_MODULES(KATE, kate, HAVE_KATE=yes, HAVE_KATE=no)
++    PKG_CHECK_MODULES(KATE, oggkate, HAVE_KATE=yes, HAVE_KATE=no)
 +  fi
 +  if test "x$HAVE_KATE" = "xno"
 +  then

diff -ru vorbis-tools/configure.ac vorbis-tools-with-kate/configure.ac
--- vorbis-tools/configure.ac	2008-04-15 13:57:29.000000000 +0100
+++ vorbis-tools-with-kate/configure.ac	2008-05-06 21:16:31.000000000 +0100
@@ -100,6 +100,7 @@
 AC_ARG_ENABLE(vorbiscomment, [  --disable-vorbiscomment   Skip building vorbiscomment], build_vorbiscomment="$enableval", build_vorbiscomment="yes")
 AC_ARG_WITH(flac,     [  --without-flac     Do not compile FLAC support], build_flac="$withval", build_flac="yes")

+      AC_MSG_WARN(liboggkate headers missing)
+      HAVE_KATE=no,[ ])
+  
+  fi
+  if test "x$HAVE_KATE" = xyes; then
+    AC_DEFINE(HAVE_KATE, 1, [Defined if we have libkate])
+  else
+    build_kate="no"
+    KATE_CFLAGS=""
+    KATE_LIBS=""
+  fi
+fi
+AM_CONDITIONAL(HAVE_KATE, test "x$HAVE_KATE" = "xyes")
+AC_SUBST(KATE_CFLAGS)
+AC_SUBST(KATE_LIBS)
+
 dnl --------------------------------------------------
 dnl Check for headers
 dnl --------------------------------------------------
@@ -358,4 +403,8 @@
         AC_MSG_WARN([curl libraries and/or headers missing, ogg123 
 will NOT be built with http support.])
     fi
