1 diff --git a/configure.ac b/configure.ac
2 index 465a502..f4ce5de 100644
5 @@ -172,10 +172,12 @@ AC_ARG_WITH(openssl-libs,
7 if test "x$ac_ssl" = "xgnutls"; then
9 - AM_PATH_LM_LIBGNUTLS($GNUTLS_REQUIRED, have_libgnutls=yes, have_libgnutls=no)
10 - if test "x$have_libgnutls" = "xyes"; then
11 - CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
12 - LIBS="$LIBS $LIBGNUTLS_LIBS"
13 + PKG_CHECK_MODULES(GNUTLS, gnutls >= $GNUTLS_REQUIRED, have_gnutls=yes, have_gnutls=no)
14 + if test "x$have_gnutls" = "xyes"; then
15 + AC_SUBST(ASYNCNS_CFLAGS)
16 + AC_SUBST(ASYNCNS_LIBS)
17 + CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
18 + LIBS="$LIBS $GNUTLS_LIBS"
19 AC_DEFINE(HAVE_GNUTLS, 1, [whether to use GnuTSL support.])