Commit f6c31d1c authored by Thibault Saunier's avatar Thibault Saunier

build: Do not link plugin against lzma and bz2 if using system install

And bump version to 1.9.2
parent f5f32986
#mesondefine HAVE_LZMA
#mesondefine HAVE_BZ2
#mesondefine LIBAV_SOURCE
#mesondefine PACKAGE_VERSION
#mesondefine PACKAGE
......@@ -244,30 +244,6 @@ case $host_os in
esac
AC_SUBST(DARWIN_LDFLAGS)
dnl *** Check for bz2
save_LIBS=$LIBS
LIBS="$LIBS -lbz2"
AC_MSG_CHECKING([for BZ2_bzlibVersion in -lbz2])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bzlib.h>]], [[const char *version = BZ2_bzlibVersion ();]])],[HAVE_BZ2=yes],[HAVE_BZ2=no])
AC_MSG_RESULT($HAVE_BZ2)
LIBS=$save_LIBS
AM_CONDITIONAL(HAVE_BZ2, test "x$HAVE_BZ2" = "xyes")
if test "x$HAVE_BZ2" = "xno"; then
AC_WARN([libbz2 not found, matroska demuxer will not be able to read bz2 tracks])
fi
dnl *** Check for lzma
save_LIBS=$LIBS
LIBS="$LIBS -llzma"
AC_MSG_CHECKING([for lzma_version_string in -llzma])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <lzma.h>]], [[const char *version = lzma_version_string ();]])],[HAVE_LZMA=yes],[HAVE_LZMA=no])
AC_MSG_RESULT($HAVE_LZMA)
LIBS=$save_LIBS
AM_CONDITIONAL(HAVE_LZMA, test "x$HAVE_LZMA" = "xyes")
if test "x$HAVE_LZMA" = "xno"; then
AC_WARN([lzma not found, tiff reader will not be able to read lzma files])
fi
AC_ARG_ENABLE(gpl,
[AC_HELP_STRING([--enable-gpl], [build a GPL licensed gst-libav])])
AM_CONDITIONAL(GST_LIBAV_ENABLE_GPL, test "x$enable_gpl" = "xyes")
......@@ -282,6 +258,8 @@ HAVE_LIBAV_UNINSTALLED=1
AC_ARG_WITH(system-libav,
[AC_HELP_STRING([--with-system-libav], [use system Libav libraries])])
HAVE_LZMA = "no"
HAVE_BZ2 = "no"
if test "x$with_system_libav" = "xyes"; then
PKG_CHECK_MODULES(LIBAV, libavfilter libavformat libavcodec libavutil)
PKG_CHECK_MODULES(SWSCALE, libswscale libavutil)
......@@ -309,6 +287,28 @@ if test "x$with_system_libav" = "xyes"; then
else
AC_MSG_NOTICE([Using local Libav snapshot])
dnl *** Check for bz2
save_LIBS=$LIBS
LIBS="$LIBS -lbz2"
AC_MSG_CHECKING([for BZ2_bzlibVersion in -lbz2])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bzlib.h>]], [[const char *version = BZ2_bzlibVersion ();]])],[HAVE_BZ2=yes],[HAVE_BZ2=no])
AC_MSG_RESULT($HAVE_BZ2)
LIBS=$save_LIBS
if test "x$HAVE_BZ2" = "xno"; then
AC_WARN([libbz2 not found, matroska demuxer will not be able to read bz2 tracks])
fi
dnl *** Check for lzma
save_LIBS=$LIBS
LIBS="$LIBS -llzma"
AC_MSG_CHECKING([for lzma_version_string in -llzma])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <lzma.h>]], [[const char *version = lzma_version_string ();]])],[HAVE_LZMA=yes],[HAVE_LZMA=no])
AC_MSG_RESULT($HAVE_LZMA)
LIBS=$save_LIBS
if test "x$HAVE_LZMA" = "xno"; then
AC_WARN([lzma not found, tiff reader will not be able to read lzma files])
fi
dnl libgstlibav.la: include dirs
LIBAV_CFLAGS="-I \$(top_srcdir)/gst-libs/ext/libav \
-I \$(top_builddir)/gst-libs/ext/libav \
......@@ -466,6 +466,9 @@ else
AC_MSG_NOTICE([Using included Libav code])
fi
AM_CONDITIONAL(HAVE_BZ2, test "x$HAVE_BZ2" = "xyes")
AM_CONDITIONAL(HAVE_LZMA, test "x$HAVE_LZMA" = "xyes")
AC_SUBST(LIBAV_CFLAGS)
AC_SUBST(LIBAV_DEPS)
AC_SUBST(LIBAV_LIBS)
......
......@@ -18,7 +18,7 @@ gstlibav = library('gstlibav',
c_args : gst_libav_args,
include_directories : [configinc],
dependencies : libav_deps + [gst_dep, gstbase_dep, gstvideo_dep,
gstaudio_dep, gstpbutils_dep, libm, bz2lib],
gstaudio_dep, gstpbutils_dep],
install : true,
install_dir : plugins_install_dir,
)
project('gst-libav', 'c', 'cpp',
version : '1.9.1.1',
version : '1.9.2.1',
meson_version : '>= 0.33.0',
default_options : [ 'warning_level=1',
'c_std=gnu99',
......@@ -26,7 +26,7 @@ check_ffmpeg_src = '''#include <libavcodec/avcodec.h>
#error libav provider should be FFmpeg
#endif'''
if not cc.compiles(check_ffmpeg_src, name : 'whether libav is provided by FFmpeg')
if not cc.compiles(check_ffmpeg_src, name : 'libav is provided by FFmpeg')
error('Uncompatible libavcodec found')
endif
......@@ -49,20 +49,6 @@ gstpbutils_dep = dependency('gstreamer-pbutils-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'pbutils_dep'])
libm = cc.find_library('m', required : false)
bz2lib = cc.find_library('bz2', required : false)
if bz2lib.found()
cdata.set('HAVE_BZ2', 1)
else
message('WARN: libbz2 not found, matroska demuxer will not be able to read bz2 tracks')
endif
lzmalib = cc.find_library('lzma', required : false)
if lzmalib.found()
cdata.set('HAVE_LZMA', 1)
else
message('WARN: lzma not found, tiff reader will not be able to read lzma files')
endif
configure_file(input : 'config.h.meson',
output : 'config.h',
configuration : cdata)
......
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