configure.ac: Added --with-hls-crypto=auto|nettle|libgcrypt|openssl option to build the source using the desired cryptographic library for HLS

https://bugzilla.gnome.org/show_bug.cgi?id=755319
This commit is contained in:
Julian Bouzas 2015-11-05 10:12:41 +00:00 committed by Sebastian Dröge
parent 3015cd75e4
commit 44a5fbe8e0

View File

@ -3176,28 +3176,62 @@ AG_GST_CHECK_FEATURE(SNDIO, [sndio audio], sndio, [
fi fi
]) ])
dnl *** hls-crypto ***
AC_ARG_WITH([hls-crypto],
AS_HELP_STRING([--with-hls-crypto=auto|nettle|libgcrypt|openssl], [
which cryptographic library version to compile against for hls (default: auto)
]), [
AS_CASE([$with_hls_crypto],
[nettle],[],
[libgcrypt],[],
[openssl],[],
[with_hls_crypto=auto]
)
]
)
dnl *** hls *** dnl *** hls ***
translit(dnm, m, l) AM_CONDITIONAL(USE_HLS, true) translit(dnm, m, l) AM_CONDITIONAL(USE_HLS, true)
AG_GST_CHECK_FEATURE(HLS, [http live streaming plugin], hls, [ AG_GST_CHECK_FEATURE(HLS, [http live streaming plugin], hls, [
PKG_CHECK_MODULES(NETTLE, nettle, AS_CASE([$with_hls_crypto],
[ [nettle], [
AC_DEFINE(HAVE_NETTLE, 1, [Define if nettle is available]) PKG_CHECK_MODULES(NETTLE, nettle, [
HAVE_HLS="yes" AC_DEFINE(HAVE_NETTLE, 1, [Define if nettle is available])
], [ HAVE_HLS="yes"
AM_PATH_LIBGCRYPT([1.2.0], ],[AC_MSG_ERROR([Could not find nettle library])])
[ ],
AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define if libgcrypt is available]) [libgcrypt], [
HAVE_HLS="yes" AM_PATH_LIBGCRYPT([1.2.0], [
], [ AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define if libgcrypt is available])
PKG_CHECK_MODULES(OPENSSL, openssl, HAVE_HLS="yes"
[ ],[AC_MSG_ERROR([Could not find libgcrypt library])])
],
[openssl], [
PKG_CHECK_MODULES(OPENSSL, openssl, [
AC_DEFINE(HAVE_OPENSSL, 1, [Define if openssl is available]) AC_DEFINE(HAVE_OPENSSL, 1, [Define if openssl is available])
HAVE_HLS="yes" HAVE_HLS="yes"
], [ ],[AC_MSG_ERROR([Could not find openssl library])])
HAVE_HLS="no" ],
[
dnl Try to find a valid crypto library
PKG_CHECK_MODULES(NETTLE, nettle, [
AC_DEFINE(HAVE_NETTLE, 1, [Define if nettle is available])
HAVE_HLS="yes"
],[
AM_PATH_LIBGCRYPT([1.2.0], [
AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define if libgcrypt is available])
HAVE_HLS="yes"
],[
PKG_CHECK_MODULES(OPENSSL, openssl, [
AC_DEFINE(HAVE_OPENSSL, 1, [Define if openssl is available])
HAVE_HLS="yes"
],[
HAVE_HLS="no"
])
])
]) ])
]) ]
]) )
]) ])
dnl *** x265 (H.265/HEVC encoder) *** dnl *** x265 (H.265/HEVC encoder) ***