Commit 410a3de5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Get rid of ligcrypt M4 macros

One day maybe, the gcrypt maintainer will get a clue, realize
that his library is not the center of the universe,
that his crappy macros breaks cross-compiling,
that pkg-config works on Windows as well as scripts (ligcrypt-config),
and accept the Debian .pc patches.

Until then...
parent 8b3e9a1d
...@@ -18,7 +18,6 @@ You will need the following tools if you plan to use the GIT version of vlc: ...@@ -18,7 +18,6 @@ You will need the following tools if you plan to use the GIT version of vlc:
- Automake version 1.9 or later - Automake version 1.9 or later
- gettext version 0.16.1 or later - gettext version 0.16.1 or later
- pkg-config - pkg-config
- libgcrypt 1.2 (or compatible)
After retrieving the GIT tree, you need to run the bootstrap script to After retrieving the GIT tree, you need to run the bootstrap script to
generate all the files needed to build vlc. You can then run configure. generate all the files needed to build vlc. You can then run configure.
......
...@@ -23,7 +23,7 @@ SUBDIRS = po compat src ...@@ -23,7 +23,7 @@ SUBDIRS = po compat src
if LOADER if LOADER
SUBDIRS += libs/loader SUBDIRS += libs/loader
endif endif
if HAVE_LIBGCRYPT if HAVE_GCRYPT
SUBDIRS += libs/srtp SUBDIRS += libs/srtp
endif endif
if HAVE_ZLIB if HAVE_ZLIB
......
...@@ -4588,16 +4588,27 @@ dnl ...@@ -4588,16 +4588,27 @@ dnl
dnl libgcrypt dnl libgcrypt
dnl dnl
AC_ARG_ENABLE(libgcrypt, AC_ARG_ENABLE(libgcrypt,
[ --disable-libgcrypt libgcrypts support (default enabled)]) [ --disable-libgcrypt gcrypt support (default enabled)])
AS_IF([test "${enable_libgcrypt}" != "no"], [ AS_IF([test "${enable_libgcrypt}" != "no"], [
AM_PATH_LIBGCRYPT([1:1.1.94], [have_libgcrypt="yes"], [have_libgcrypt="no"]) AC_CHECK_DECL([GCRYCTL_SET_THREAD_CBS], [
have_libgcrypt="yes"
GCRYPT_CFLAGS=""
GCRYPT_LIBS="-lgcrypt"
], [
AS_IF([test "${enable_libgcrypt}"], [
AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found.])
])
have_libgcrypt="no"
], [#include <gcrypt.h>])
]) ])
if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then
AS_IF([test "${have_libgcrypt}" = "yes"],[ AS_IF([test "${have_libgcrypt}" = "yes"],[
VLC_ADD_LIBS([rtp stream_out_rtp], [${LIBGCRYPT_LIBS}]) VLC_ADD_LIBS([rtp stream_out_rtp], [${GCRYPT_LIBS}])
]) ])
fi fi
AM_CONDITIONAL([HAVE_LIBGCRYPT], [test "${have_libgcrypt}" = "yes"]) AC_SUBST(GCRYPT_CFLAGS)
AC_SUBST(GCRYPT_LIBS)
AM_CONDITIONAL([HAVE_GCRYPT], [test "${have_libgcrypt}" = "yes"])
dnl dnl
dnl TLS/SSL dnl TLS/SSL
...@@ -4616,8 +4627,8 @@ AS_IF([test "${enable_gnutls}" != "no"], [ ...@@ -4616,8 +4627,8 @@ AS_IF([test "${enable_gnutls}" != "no"], [
]) ])
dnl The GnuTLS plugin invokes gcry_control directly. dnl The GnuTLS plugin invokes gcry_control directly.
AS_IF([test "${have_libgcrypt}" = "yes"],[ AS_IF([test "${have_libgcrypt}" = "yes"],[
VLC_ADD_LIBS([gnutls], [${LIBGCRYPT_LIBS}]) VLC_ADD_LIBS([gnutls], [${GCRYPT_LIBS}])
VLC_ADD_CFLAGS([gnutls], [${LIBGCRYPT_CFLAGS}]) VLC_ADD_CFLAGS([gnutls], [${GCRYPT_CFLAGS}])
]) ])
VLC_ADD_LIBS([gnutls], [$GNUTLS_LIBS]) VLC_ADD_LIBS([gnutls], [$GNUTLS_LIBS])
], [ ], [
...@@ -4637,8 +4648,8 @@ AC_ARG_ENABLE(remoteosd, ...@@ -4637,8 +4648,8 @@ AC_ARG_ENABLE(remoteosd,
AS_IF([test "${enable_remoteosd}" != "no"], [ AS_IF([test "${enable_remoteosd}" != "no"], [
AS_IF([test "${have_libgcrypt}" = "yes"],[ AS_IF([test "${have_libgcrypt}" = "yes"],[
VLC_ADD_PLUGIN([remoteosd]) VLC_ADD_PLUGIN([remoteosd])
VLC_ADD_LIBS([remoteosd], ${LIBGCRYPT_LIBS}) VLC_ADD_LIBS([remoteosd], ${GCRYPT_LIBS})
VLC_ADD_CFLAGS([remoteosd], ${LIBGCRYPT_CFLAGS}) VLC_ADD_CFLAGS([remoteosd], ${GCRYPT_CFLAGS})
], [ ], [
AC_MSG_ERROR([libgcrypt support required for RemoteOSD plugin]) AC_MSG_ERROR([libgcrypt support required for RemoteOSD plugin])
]) ])
...@@ -4652,8 +4663,8 @@ AC_MSG_CHECKING([whether to enable RAOP plugin]) ...@@ -4652,8 +4663,8 @@ AC_MSG_CHECKING([whether to enable RAOP plugin])
AS_IF([test "${have_libgcrypt}" = "yes"], [ AS_IF([test "${have_libgcrypt}" = "yes"], [
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
VLC_ADD_PLUGIN([stream_out_raop]) VLC_ADD_PLUGIN([stream_out_raop])
VLC_ADD_LIBS([stream_out_raop], [${LIBGCRYPT_LIBS} -lgpg-error]) VLC_ADD_LIBS([stream_out_raop], [${GCRYPT_LIBS} -lgpg-error])
VLC_ADD_CFLAGS([stream_out_raop], [${LIBGCRYPT_CFLAGS}]) VLC_ADD_CFLAGS([stream_out_raop], [${GCRYPT_CFLAGS}])
], [ ], [
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
AC_MSG_WARN([libgcrypt support required for RAOP plugin]) AC_MSG_WARN([libgcrypt support required for RAOP plugin])
...@@ -4671,8 +4682,8 @@ then ...@@ -4671,8 +4682,8 @@ then
then then
AC_MSG_ERROR([libgcrypt is required for update checking system]) AC_MSG_ERROR([libgcrypt is required for update checking system])
fi fi
VLC_ADD_LIBS([libvlccore], [${LIBGCRYPT_LIBS}]) VLC_ADD_LIBS([libvlccore], [${GCRYPT_LIBS}])
VLC_ADD_CFLAGS([libvlccore], [${LIBGCRYPT_CFLAGS}]) VLC_ADD_CFLAGS([libvlccore], [${GCRYPT_CFLAGS}])
AC_DEFINE([UPDATE_CHECK], 1, [Define if you want to use the VLC update mechanism]) AC_DEFINE([UPDATE_CHECK], 1, [Define if you want to use the VLC update mechanism])
fi fi
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
# License along with this library; if not, write to the Free Software # License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
AM_CPPFLAGS = @LIBGCRYPT_CFLAGS@ AM_CPPFLAGS = @GCRYPT_CFLAGS@
noinst_HEADERS = srtp.h noinst_HEADERS = srtp.h
...@@ -25,12 +25,12 @@ check_PROGRAMS = test-aes test-recv ...@@ -25,12 +25,12 @@ check_PROGRAMS = test-aes test-recv
TESTS = $(check_PROGRAMS) TESTS = $(check_PROGRAMS)
libvlc_srtp_la_SOURCES = srtp.c libvlc_srtp_la_SOURCES = srtp.c
libvlc_srtp_la_LIBADD = @LIBGCRYPT_LIBS@ libvlc_srtp_la_LIBADD = @GCRYPT_LIBS@
srtp_SOURCES = recv.c srtp_SOURCES = recv.c
srtp_LDADD = libvlc_srtp.la srtp_LDADD = libvlc_srtp.la
test_recv_LDADD = libvlc_srtp.la test_recv_LDADD = libvlc_srtp.la
test_aes_LDADD = @LIBGCRYPT_LIBS@ test_aes_LDADD = @GCRYPT_LIBS@
if !HAVE_WIN32 if !HAVE_WIN32
libvlc_srtp_la_LIBADD += -lpthread libvlc_srtp_la_LIBADD += -lpthread
......
if HAVE_LIBGCRYPT if HAVE_GCRYPT
# RTP plugin # RTP plugin
libvlc_LTLIBRARIES += \ libvlc_LTLIBRARIES += \
librtp_plugin.la librtp_plugin.la
......
...@@ -30,7 +30,7 @@ libvlc_LTLIBRARIES += \ ...@@ -30,7 +30,7 @@ libvlc_LTLIBRARIES += \
libstream_out_smem_plugin.la \ libstream_out_smem_plugin.la \
$(NULL) $(NULL)
if HAVE_LIBGCRYPT if HAVE_GCRYPT
# RTP plugin # RTP plugin
libvlc_LTLIBRARIES += \ libvlc_LTLIBRARIES += \
libstream_out_rtp_plugin.la libstream_out_rtp_plugin.la
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment