summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBrendan Shanks <brendan.shanks@teradek.com>2018-05-09 17:50:13 -0700
committerOlivier CrĂȘte <olivier.crete@collabora.com>2018-10-21 03:32:15 -0400
commit6a2e7056d989fe2cd5c6d3f55e510141812d10b0 (patch)
tree70ff79427bad1313f144a4374c4c85ae38bcd3de /configure.ac
parent16409ef3d2db0c010e42ee68f469930cb6f870d2 (diff)
downloadlibnice-6a2e7056d989fe2cd5c6d3f55e510141812d10b0.tar.gz
stun: Add support to detect OpenSSL
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 17 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 36bd622..dcd0e5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -185,15 +185,28 @@ AC_SUBST(LIBRT)
# Dependencies
-GNUTLS_PACKAGES_PRIVATE="gnutls >= 2.12.0"
-PKG_CHECK_MODULES(GNUTLS, [$GNUTLS_PACKAGES_PRIVATE])
-
NICE_PACKAGES_PUBLIC="glib-2.0 >= $GLIB_REQ gio-2.0 >= $GLIB_REQ gobject-2.0 >= $GLIB_REQ"
NICE_PACKAGES_PRIVATE="gthread-2.0"
PKG_CHECK_MODULES(GLIB, [$NICE_PACKAGES_PUBLIC $NICE_PACKAGES_PRIVATE])
-NICE_PACKAGES_PRIVATE="$NICE_PACKAGES_PRIVATE $GNUTLS_PACKAGES_PRIVATE"
+GNUTLS_PACKAGES_PRIVATE="gnutls >= 2.12.0"
+PKG_CHECK_MODULES(GNUTLS, [$GNUTLS_PACKAGES_PRIVATE],
+ [
+ AC_DEFINE([HAVE_GNUTLS], [1], [Use GnuTLS])
+ NICE_PACKAGES_PRIVATE="$NICE_PACKAGES_PRIVATE $GNUTLS_PACKAGES_PRIVATE"
+ ],
+ [
+ AX_CHECK_OPENSSL(
+ [
+ AC_DEFINE([HAVE_OPENSSL], [1], [Use OpenSSL])
+ NICE_PACKAGES_PRIVATE="$NICE_PACKAGES_PRIVATE libcrypto"
+ ],
+ [
+ AC_MSG_ERROR([Neither GnuTLS or OpenSSL is available])
+ ]
+ )]
+)
AC_SUBST([NICE_PACKAGES_PUBLIC])
AC_SUBST([NICE_PACKAGES_PRIVATE])