summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorEmmanuel Bouthenot <kolter@openics.org>2009-06-07 16:46:53 +0200
committerEmmanuel Bouthenot <kolter@openics.org>2009-06-07 16:46:53 +0200
commit452a1d6b9ea39d362fa7c44456ac2b659159ea9e (patch)
tree233e2401e5ac59c4d0782b8471b39aa74a2da571 /configure.in
parent1bbafc3d4e4834fac58af0e149eb9a9acff26d4e (diff)
downloadweechat-452a1d6b9ea39d362fa7c44456ac2b659159ea9e.zip
Change the way to detect gnutls (using pkg-config instead of libgnutls-config)
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in23
1 files changed, 14 insertions, 9 deletions
diff --git a/configure.in b/configure.in
index 6c36b34d1..e2d28efd9 100644
--- a/configure.in
+++ b/configure.in
@@ -779,20 +779,25 @@ fi
# ------------------------------------------------------------------------------
if test "x$enable_gnutls" = "xyes" ; then
- found_gnutls="no"
- AM_PATH_LIBGNUTLS( 1.0.0, found_gnutls=yes, AC_MSG_WARN([[
+ AC_CHECK_HEADER(gnutls/gnutls.h,ac_found_gnutls_header="yes",ac_found_gnutls_header="no")
+ AC_CHECK_LIB(gnutls,gnutls_global_init,ac_found_gnutls_lib="yes",ac_found_gnutls_lib="no")
+
+ AC_MSG_CHECKING(for gnutls headers and librairies)
+ if test "x$ac_found_gnutls_header" = "xno" -o "x$ac_found_gnutls_lib" = "xno" ; then
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([
*** libgnutls was not found. You may want to get it from ftp://ftp.gnutls.org/pub/gnutls/
-*** WeeChat will be built without GnuTLS support.]]))
- if test "x$found_gnutls" = "xyes" ; then
- GNUTLS_CFLAGS=`libgnutls-config --cflags`
- GNUTLS_LFLAGS=`libgnutls-config --libs`
+*** WeeChat will be built without GnuTLS support.])
+ enable_gnutls="no"
+ not_found="$not_found gnutls"
+ else
+ AC_MSG_RESULT(yes)
+ GNUTLS_CFLAGS=`pkg-config gnutls --cflags`
+ GNUTLS_LFLAGS=`pkg-config gnutls --libs`
AC_SUBST(GNUTLS_CFLAGS)
AC_SUBST(GNUTLS_LFLAGS)
AC_DEFINE(HAVE_GNUTLS)
CFLAGS="$CFLAGS -DHAVE_GNUTLS"
- else
- enable_gnutls="no"
- not_found="$not_found gnutls"
fi
else
not_asked="$not_asked gnutls"