---
 configure.in                |    8 ++++----
 lib/gnutls.pc.in            |    3 ++-
 libextra/gnutls-extra.pc.in |    3 ++-
 3 files changed, 8 insertions(+), 6 deletions(-)

--- gnutls-2.2.2.orig/configure.in
+++ gnutls-2.2.2/configure.in
@@ -698,17 +698,17 @@ AC_MSG_RESULT([***
 *** Detecting options for shared libraries...
 ])
 AC_LIBTOOL_WIN32_DLL
 AC_PROG_LIBTOOL
 
-LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBTASN1_LIBS $LIBGCRYPT_LIBS $LIBS"
-LIBGNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS $LIBTASN1_CFLAGS -I${includedir}"
+LIBGNUTLS_LIBS="-lgnutls $LIBTASN1_LIBS $LIBGCRYPT_LIBS $LIBS"
+LIBGNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS $LIBTASN1_CFLAGS"
 AC_SUBST(LIBGNUTLS_LIBS)
 AC_SUBST(LIBGNUTLS_CFLAGS)
 
-LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LTLIBOPENCDK $LZO_LIBS $LIBGNUTLS_LIBS"
-LIBGNUTLS_EXTRA_CFLAGS="$INCOPENCDK -I${includedir}"
+LIBGNUTLS_EXTRA_LIBS="-lgnutls-extra $LTLIBOPENCDK $LZO_LIBS $LIBGNUTLS_LIBS"
+LIBGNUTLS_EXTRA_CFLAGS="$INCOPENCDK"
 AC_SUBST(LIBGNUTLS_EXTRA_LIBS)
 AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS)
 export ac_full
 
 AM_CFLAGS="${AM_CFLAGS} ${LIBGCRYPT_CFLAGS}"
--- gnutls-2.2.2.orig/lib/gnutls.pc.in
+++ gnutls-2.2.2/lib/gnutls.pc.in
@@ -16,8 +16,9 @@ libdir=@libdir@
 includedir=@includedir@
 
 Name: GnuTLS
 Description: Transport Security Layer implementation for the GNU system
 Version: @VERSION@
+Requires.private: libgcrypt
 Libs: -L${libdir} -lgnutls
-Libs.private: @LIBGNUTLS_LIBS@ 
+Libs.private: -L${libdir} -lgnutls
 Cflags: -I${includedir}
--- gnutls-2.2.2.orig/libextra/gnutls-extra.pc.in
+++ gnutls-2.2.2/libextra/gnutls-extra.pc.in
@@ -16,9 +16,10 @@ libdir=@libdir@
 includedir=@includedir@
 
 Name: GnuTLS-extra
 Description: Additional add-ons for GnuTLS licensed under GPL
 Requires: gnutls
+Requires.private: gnutls
 Version: @VERSION@
 Libs: -L${libdir} -lgnutls-extra
-Libs.private: @LIBGNUTLS_EXTRA_LIBS@
+Libs.private: -L${libdir} -lgnutls-extra
 Cflags: -I${includedir}
