mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
use pkg-config to check gnutls deps if available
Newer versions of these packages ship with pkg-config files, so if we can detect it via those, do so. If that fails, fall back to the old methods.
This commit is contained in:
parent
5ae5d2eaeb
commit
f48be4e0c6
@ -12,6 +12,9 @@
|
||||
* configure.ac: Use pkg-config to check for openssl presence and
|
||||
fallback to the previous code if that doesn't work.
|
||||
|
||||
* configure.ac: Use pkg-config to check for gnutls presence and
|
||||
fallback to the previous code if that doesn't work.
|
||||
|
||||
2014-07-28 Ángel González <keisial@gmail.com>
|
||||
* contrib: Created contrib folder.
|
||||
* contrib/tsocked-wget: Added wrapper for usage with socks proxy.
|
||||
|
28
configure.ac
28
configure.ac
@ -348,18 +348,26 @@ AS_IF([test x"$with_ssl" = xopenssl], [
|
||||
with_ssl=gnutls
|
||||
|
||||
dnl Now actually check for -lgnutls
|
||||
AC_LIB_HAVE_LINKFLAGS([gnutls], [], [
|
||||
#include <gnutls/gnutls.h>
|
||||
], [gnutls_global_init()])
|
||||
if test x"$LIBGNUTLS" != x
|
||||
then
|
||||
ssl_found=yes
|
||||
PKG_CHECK_MODULES([GNUTLS], [gnutls], [
|
||||
AC_MSG_NOTICE([compiling in support for SSL via GnuTLS])
|
||||
AC_LIBOBJ([gnutls])
|
||||
LIBS="$LIBGNUTLS $LIBS"
|
||||
else
|
||||
AC_MSG_ERROR([--with-ssl=gnutls was given, but GNUTLS is not available.])
|
||||
fi
|
||||
LIBS="$GNUTLS_LIBS $LIBS"
|
||||
CFLAGS="$GNUTLS_CFLAGS -DHAVE_LIBGNUTLS $CFLAGS"
|
||||
AC_DEFINE([HAVE_LIBGNUTLS], [1], [Define if using gnutls.])
|
||||
], [
|
||||
AC_LIB_HAVE_LINKFLAGS([gnutls], [], [
|
||||
#include <gnutls/gnutls.h>
|
||||
], [gnutls_global_init()])
|
||||
if test x"$LIBGNUTLS" != x
|
||||
then
|
||||
ssl_found=yes
|
||||
AC_MSG_NOTICE([compiling in support for SSL via GnuTLS])
|
||||
AC_LIBOBJ([gnutls])
|
||||
LIBS="$LIBGNUTLS $LIBS"
|
||||
else
|
||||
AC_MSG_ERROR([--with-ssl=gnutls was given, but GNUTLS is not available.])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_CHECK_FUNCS(gnutls_priority_set_direct)
|
||||
]) # endif: --with-ssl != no?
|
||||
|
Loading…
x
Reference in New Issue
Block a user