Newer
Older
AM_CONDITIONAL(HAVE_ASDCP, [test "${have_asdcp}" = "yes"])
dnl
dnl Demux plugins
dnl
EXTEND_HELP_STRING([Mux/Demux plugins:])
dnl
dnl libdvbpsi check for ts mux/demux
dnl
have_dvbpsi="no"
PKG_WITH_MODULES([DVBPSI], [libdvbpsi >= 1.2.0], [have_dvbpsi="yes"])
AM_CONDITIONAL(HAVE_DVBPSI, [test "${have_dvbpsi}" = "yes"])
dnl
dnl GME demux plugin
dnl
AC_ARG_ENABLE(gme,
[AS_HELP_STRING([--enable-gme],
[use Game Music Emu (default auto)])])
AS_IF([test "${enable_gme}" != "no"], [
AC_CHECK_HEADER([gme/gme.h], [
VLC_ADD_PLUGIN([gme])
], [
AS_IF([test "x${enable_gme}" != "x"], [
AC_MSG_ERROR([GME cannot be found. Please install the development files.])
])
])
])
AC_ARG_ENABLE(sid,
[AS_HELP_STRING([--enable-sid],[C64 sid demux support (default auto)])])
AS_IF([test "${enable_sid}" != "no"], [
AC_LANG_PUSH(C++)
oldCPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $SID_CFLAGS"
AC_CHECK_HEADER([sidplay/builders/resid.h], [
VLC_ADD_PLUGIN([sid])
VLC_ADD_CFLAGS([sid], [$SID_CFLAGS])
VLC_ADD_LIBS([sid], [$SID_LIBS] [-lresid-builder])
], [
AS_IF([test -n "${enable_sid}"],
[AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
[AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
)
])
CPPFLAGS="$oldCPPFLAGS"
AC_LANG_POP(C++)
], [
AS_IF([test "x${enable_sid}" = "xyes"],
[AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
[AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
PKG_ENABLE_MODULES_VLC([OGG], [mux_ogg], [ogg >= 1.0], [Ogg demux support], [auto])
PKG_CHECK_MODULES(LIBVORBIS, [vorbis >= 1.1], [
AC_DEFINE(HAVE_LIBVORBIS, 1, [Define to 1 if you have the libvorbis])
PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto], [${LIBVORBIS_CFLAGS}], [${LIBVORBIS_LIBS}])
if test "${enable_sout}" != "no"; then
PKG_ENABLE_MODULES_VLC([SHOUT], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
PKG_ENABLE_MODULES_VLC([MATROSKA], [mkv], [libebml libmatroska], [MKV format support], [auto])
[AS_HELP_STRING([--disable-mod],
[do not use libmodplug (default auto)])])
if test "${enable_mod}" != "no" ; then
PKG_CHECK_MODULES(LIBMODPLUG, [libmodplug >= 0.8.4 libmodplug != 0.8.8], [

Jean-Baptiste Kempf
committed
VLC_ADD_PLUGIN([mod])
VLC_ADD_CXXFLAGS([mod],[$LIBMODPLUG_CFLAGS])
VLC_ADD_CFLAGS([mod],[$LIBMODPLUG_CFLAGS]) #modules/demux/mod.c needs CFLAGS_mod, not CXXFLAGS_mod

Jean-Baptiste Kempf
committed
VLC_ADD_LIBS([mod],[$LIBMODPLUG_LIBS])
AS_IF([test -n "${enable_mod}"],
[AC_MSG_ERROR([${LIBMODPLUG_PKG_ERRORS}.])],
[AC_MSG_WARN([${LIBMODPLUG_PKG_ERRORS}.])])
dnl
dnl mpc demux plugin
dnl
AC_ARG_ENABLE(mpc,
[AS_HELP_STRING([--disable-mpc], [do not use libmpcdec (default auto)])])
if test "${enable_mpc}" != "no"
then
VLC_ADD_LIBS([mpc],[-lmpcdec])],
[AC_CHECK_HEADERS([mpcdec/mpcdec.h], [
VLC_ADD_PLUGIN([mpc])
VLC_ADD_LIBS([mpc],[-lmpcdec])])])
fi
dnl
dnl wmafixed plugin
dnl
AC_ARG_ENABLE(wma-fixed,
[ --enable-wma-fixed libwma-fixed module (default disabled)])
if test "${enable_wma_fixed}" = "yes"
then
VLC_ADD_PLUGIN([wma_fixed])
fi
PKG_ENABLE_MODULES_VLC([SHINE], [], [shine >= 3.0.0], [MPEG Audio Layer 3 encoder], [auto], [], [], [])
dnl
dnl openmax il codec plugin
dnl
AC_ARG_ENABLE(omxil,
[ --enable-omxil openmax il codec module (default disabled)])
if test "${enable_omxil}" = "yes"
then
VLC_ADD_PLUGIN([omxil])
fi
dnl
dnl openmax il vout plugin
dnl
AC_ARG_ENABLE(omxil-vout,
[ --enable-omxil-vout openmax il video output module (default disabled)])
if test "${enable_omxil_vout}" = "yes"
then
VLC_ADD_PLUGIN([omxil_vout])
fi
dnl
dnl raspberry pi openmax il configuration
dnl
AC_ARG_ENABLE(rpi-omxil,
[ --enable-rpi-omxil openmax il configured for raspberry pi (default disabled)])
if test "${enable_rpi_omxil}" = "yes"
then
VLC_ADD_PLUGIN([omxil omxil_vout])
VLC_ADD_CFLAGS([omxil omxil_vout],[-DRPI_OMX])
fi
dnl
dnl CrystalHD codec plugin
dnl
AC_ARG_ENABLE(crystalhd,
[ --enable-crystalhd crystalhd codec plugin (default auto)])
if test "${enable_crystalhd}" != "no"; then
AC_CHECK_HEADER(libcrystalhd/libcrystalhd_if.h, [
VLC_ADD_PLUGIN([crystalhd])
VLC_ADD_LIBS([crystalhd], [-lcrystalhd])
],[
if test "${SYS}" = "mingw32" ; then
AC_CHECK_HEADERS(libcrystalhd/bc_dts_defs.h, [
AC_CHECK_HEADERS(libcrystalhd/bc_drv_if.h, [
VLC_ADD_LIBS([crystalhd], [-lbcmDIL])
])
AS_IF([test x"${enable_crystalhd}" = "xyes"],
[AC_MSG_ERROR("Could not find CrystalHD development headers")],
[AC_MSG_WARN("Could not find CrystalHD development headers")])
],[#define __LINUX_USER__
#include <libcrystalhd/bc_dts_types.h>
#include <libcrystalhd/bc_dts_types.h>
])
have_mad="no"
MAD_CFLAGS=""
MAD_LIBS=""
AC_ARG_WITH(mad, [ --with-mad=PATH path to libmad], [
enable_mad="yes"
], [
with_mad="no"
])
AS_IF([test "${with_mad}" != "no"], [
MAD_CFLAGS="-I${with_mad}/include"
MAD_LIBS="-L${with_mad}/lib"
])
AC_ARG_ENABLE(mad,
[ --enable-mad libmad module (default enabled)])
AS_IF([test "${enable_mad}" != "no"], [
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${MAD_CFLAGS}"
LDFLAGS="${LDFLAGS} ${MAD_LIBS}"
AC_CHECK_HEADERS(mad.h, [
AC_CHECK_LIB(mad, mad_bit_init, [
have_mad="yes"
MAD_LIBS="${MAD_LIBS} -lmad"
])
])
VLC_RESTORE_FLAGS
AS_IF([test -n "$enable_mad" -a "${have_mad}" = "no"], [
AC_MSG_ERROR([Could not find libmad. Install it or pass --disable-mad to disable it.])
])
])
AC_SUBST(MAD_CFLAGS)
AC_SUBST(MAD_LIBS)
AM_CONDITIONAL([HAVE_MAD], [test "${have_mad}" = "yes"])
dnl mpg123 plugin
dnl
dnl
PKG_ENABLE_MODULES_VLC([MPG123], [mpg123], [libmpg123], [libmpg123 decoder support], [auto])
dnl
dnl gstreamer stuff
dnl
AC_ARG_ENABLE(gst-decode,
[ --enable-gst-decode GStreamer based decoding support (currently supports only video decoding) (default auto)])
have_gst_decode="no"
AS_IF([test "${enable_gst_decode}" != "no"], [
PKG_CHECK_MODULES([GST_APP], [gstreamer-app-1.0], [
PKG_CHECK_MODULES([GST_VIDEO], [gstreamer-video-1.0], [
have_gst_decode="yes"
], [
AC_MSG_WARN([${GST_VIDEO_PKG_ERRORS}. GStreamer decoder module will not be built.])
])
], [
AC_MSG_WARN([${GST_APP_PKG_ERRORS}. GStreamer modules will not be built.])
])
])
AM_CONDITIONAL([HAVE_GST_DECODE], [test "${have_gst_decode}" = "yes"])
dnl
dnl avcodec decoder/encoder plugin
dnl
AC_ARG_ENABLE(merge-ffmpeg,
[ --enable-merge-ffmpeg merge FFmpeg-based plugins (default disabled)],, [
enable_merge_ffmpeg="no"
])
AM_CONDITIONAL([MERGE_FFMPEG], [test "$enable_merge_ffmpeg" != "no"])
AC_MSG_CHECKING([for libavutil variant])
PKG_CHECK_EXISTS([libavutil], [
libavutil_version="$(${PKG_CONFIG} --modversion libavutil)"
libavutil_micro="${libavutil_version##*.}"
AS_IF([test ${libavutil_micro} -le 99], [
avfork="libav"
], [
avfork="ffmpeg"
])
], [
avfork="none"
])
AC_MSG_RESULT([${avfork}])
AC_ARG_ENABLE(avcodec,
AS_IF([test "${enable_avcodec}" != "no"], [
dnl We need >=57.16.0 from libav or >=57.37.100 from ffmpeg
case "${avfork}" in
libav) av_codec_ver="57.16.0" ;;
ffmpeg) av_codec_ver="57.37.100" ;;
*) AC_MSG_ERROR([Missing libav or FFmpeg])
esac
PKG_CHECK_MODULES(AVCODEC,[libavcodec >= ${av_codec_ver} libavutil >= 52.0.0], [
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
AC_CHECK_HEADERS(libavcodec/avcodec.h)
AC_CHECK_HEADERS(libavutil/avutil.h)
VLC_RESTORE_FLAGS
have_avcodec="yes"
],[
AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
])
], [
have_avcodec="no"
])
AM_CONDITIONAL([HAVE_AVCODEC], [test "${have_avcodec}" != "no"])
dnl
dnl libva needs avcodec
dnl
AC_ARG_ENABLE(libva,
[ --enable-libva VAAPI GPU decoding support (libVA) (default auto)])
AS_IF([test "${enable_libva}" = "yes" -a "${have_avcodec}" != "yes" ], [
AC_MSG_ERROR([--enable-libva and --disable-avcodec options are mutually exclusive. Use --enable-avcodec.])
])
have_vaapi="no"
have_vaapi_drm="no"
have_vaapi_x11="no"
AS_IF([test "${enable_libva}" != "no"], [
PKG_CHECK_MODULES([LIBVA], [libva >= 0.38], [
AS_IF([test -n "${enable_libva}"], [
AC_MSG_ERROR([${LIBVA_PKG_ERRORS}.])
], [
AC_MSG_WARN([${LIBVA_PKG_ERRORS}.])
PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm], [
have_vaapi_drm="yes"
], [
AC_MSG_WARN([${LIBVA_DRM_PKG_ERRORS}.])
])
PKG_CHECK_MODULES(LIBVA_X11, [libva-x11], [
have_vaapi_x11="yes"
], [
AC_MSG_WARN([${LIBVA_X11_PKG_ERRORS}.])
])
])
AM_CONDITIONAL([HAVE_VAAPI_DRM], [test "${have_vaapi_drm}" = "yes"])
AM_CONDITIONAL([HAVE_VAAPI_X11], [test "${have_vaapi_x11}" = "yes"])
have_avcodec_vaapi="no"
AS_IF([test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"], [
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
AC_CHECK_HEADERS([libavcodec/vaapi.h], [
AC_MSG_NOTICE([VA API acceleration activated])
have_avcodec_vaapi="yes"
],[
AS_IF([test -n "${enable_libva}"], [
AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing])
], [
AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ])
])
])
VLC_RESTORE_FLAGS
AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_avcodec_vaapi}" = "yes"])
dnl
dnl dxva2 needs avcodec
dnl
AC_ARG_ENABLE(dxva2,
[ --enable-dxva2 DxVA2 GPU decoding support (default auto)])
have_avcodec_dxva2="no"
AS_IF([test "${enable_dxva2}" != "no"], [
if test "${SYS}" = "mingw32"; then
AS_IF([test "x${have_avcodec}" = "xyes"], [
[
AC_CHECK_HEADERS(libavcodec/dxva2.h, [
AC_MSG_NOTICE([DxVA2 acceleration activated])
have_avcodec_dxva2="yes"
AS_IF([test "${enable_dxva2}" = "yes"],
[AC_MSG_ERROR([dxva2 is present but libavcodec/dxva2.h is missing])],
[AC_MSG_WARN([dxva2 is present but libavcodec/dxva2.h is missing ])])
], [#undef _WIN32_WINNT
/* DXVA2 is only available in Vista and above */
#define _WIN32_WINNT 0x600])
[AC_MSG_ERROR([Could not find required dxva2api.h])],
[AC_MSG_WARN([dxva2api.h not found])])
AS_IF([test "x${enable_dxva2}" != "x"], [
AC_MSG_ERROR([--enable-dxva2 and --disable-avcodec options are mutually exclusive.])
])
AM_CONDITIONAL([HAVE_AVCODEC_DXVA2], [test "${have_avcodec_dxva2}" = "yes"])
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
dnl
dnl d3d11va needs avcodec
dnl
AC_ARG_ENABLE(d3d11va,
[ --enable-d3d11va D3D11 GPU decoding support (default auto)])
have_avcodec_d3d11va="no"
AS_IF([test "${enable_d3d11va}" != "no"], [
if test "${SYS}" = "mingw32"; then
AS_IF([test "x${have_avcodec}" = "xyes"], [
AC_CHECK_TYPES([ID3D11VideoDecoder],
[
AC_CHECK_HEADERS(dxva2api.h,
[
AC_CHECK_HEADERS(libavcodec/d3d11va.h, [
AC_MSG_NOTICE([D3D11 acceleration activated])
AC_DEFINE(HAVE_AVCODEC_D3D11VA, 1, [Define if the d3d11va module is built])
have_avcodec_d3d11va="yes"
],[
AS_IF([test "${enable_d3d11va}" = "yes"],
[AC_MSG_ERROR([d3d11va is present but libavcodec/d3d11va.h is missing])],
[AC_MSG_WARN([d3d11va is present but libavcodec/d3d11va.h is missing ])])
], [#undef _WIN32_WINNT
/* D3D11 is only available in Vista and above */
#define _WIN32_WINNT 0x600])
],[
AS_IF([test "${enable_d3d11va}" = "yes"],
[AC_MSG_ERROR([Could not find required dxva2api.h])],
[AC_MSG_WARN([dxva2api.h not found])])
],[
AS_IF([test "${enable_d3d11va}" = "yes"],
[AC_MSG_ERROR([Could not find required ID3D11VideoDecoder in d3d11.h])],
[AC_MSG_WARN([ID3D11VideoDecoder not found])])
], [#include <d3d11.h>])
],[
AS_IF([test "x${enable_d3d11va}" != "x"], [
AC_MSG_ERROR([--enable-d3d11va and --disable-avcodec options are mutually exclusive.])
])
])
fi
])
AM_CONDITIONAL([HAVE_AVCODEC_D3D11VA], [test "${have_avcodec_d3d11va}" = "yes"])
dnl
dnl DXGI debug
dnl
AC_CHECK_HEADERS(dxgidebug.h)
dnl
dnl avformat demuxer/muxer plugin
dnl
AC_ARG_ENABLE(avformat,
[ --enable-avformat libavformat containers (default enabled)],, [
enable_avformat="${have_avcodec}"
])
have_avformat="no"
AS_IF([test "${enable_avformat}" != "no"], [
PKG_CHECK_MODULES(AVFORMAT,[libavformat >= 53.21.0 libavcodec libavutil], [
have_avformat="yes"
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}"
CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}"
AC_CHECK_HEADERS(libavformat/avformat.h libavformat/avio.h)
AC_CHECK_HEADERS(libavutil/avutil.h)

Rémi Denis-Courmont
committed
AS_IF([test "$enable_merge_ffmpeg" = "no"], [

Rémi Denis-Courmont
committed
])
VLC_RESTORE_FLAGS
],[
AC_MSG_ERROR([${AVFORMAT_PKG_ERRORS}. Pass --disable-avformat to ignore this error.])
])
])
AM_CONDITIONAL([HAVE_AVFORMAT], [test "${enable_avformat}" != "no"])
dnl
dnl swscale image scaling and conversion plugin
dnl
AC_ARG_ENABLE(swscale,
AS_HELP_STRING([--enable-swscale],[libswscale image scaling and conversion
if test "${enable_swscale}" != "no"
then
PKG_CHECK_MODULES(SWSCALE,[libswscale],
[
dionoea
committed
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${SWSCALE_CFLAGS}"
CFLAGS="${CFLAGS} ${SWSCALE_CFLAGS}"
AC_CHECK_HEADERS(libswscale/swscale.h)
AC_CHECK_HEADERS(libavutil/avutil.h)
VLC_ADD_PLUGIN([swscale])
VLC_ADD_LIBS([swscale],[$SWSCALE_LIBS])
VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS])
AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
VLC_ADD_LIBS([swscale],[${ac_cv_ld_bsymbolic}])
])
dionoea
committed
VLC_RESTORE_FLAGS
],[
AC_MSG_ERROR([${SWSCALE_PKG_ERRORS}. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.])
])
fi
dnl
dnl postproc plugin
dnl
dionoea
committed
AC_ARG_ENABLE(postproc,
[ --enable-postproc libpostproc image post-processing (default auto)])
if test "${enable_postproc}" != "no"
then
PKG_CHECK_MODULES(POSTPROC,[libpostproc libavutil],
[
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
AC_CHECK_HEADERS(postproc/postprocess.h)
VLC_ADD_PLUGIN([postproc])
dionoea
committed
VLC_RESTORE_FLAGS
],[
AC_MSG_WARN([${POSTPROC_PKG_ERRORS}.])
dnl
dnl faad decoder plugin
dnl
AC_ARG_ENABLE(faad,
[ --enable-faad faad codec (default auto)])
have_faad="no"
AS_IF([test "${enable_faad}" != "no"], [
AC_CHECK_HEADERS([neaacdec.h], [
AC_CHECK_LIB(faad, NeAACDecOpen, [have_faad="yes"],, [$LIBM])
AS_IF([test "${have_faad}" = "yes"], [
VLC_ADD_PLUGIN([faad])
VLC_ADD_LIBS([faad],[-lfaad])
], [
AS_IF([test "${enable_faad}" = "yes"], [
AC_MSG_ERROR([cannot find FAAD library])
], [
AC_MSG_WARN([cannot find FAAD library])
])
])
])
])
dnl
dnl AOM decoder plugin
dnl
PKG_ENABLE_MODULES_VLC([AOM], [], [aom], [experimental AV1 codec], [disabled])
dnl
dnl libvpx decoder plugin
dnl
AC_ARG_ENABLE(vpx,
AS_HELP_STRING([--enable-vpx],[libvpx VP8/VP9 encoder and decoder (default auto)]))
PKG_CHECK_MODULES([VPX], [vpx >= 1.5.0], [
VLC_ADD_PLUGIN([vpx])
VLC_ADD_CPPFLAGS([vpx], [${VPX_CFLAGS}])
VLC_ADD_LIBS([vpx], [${VPX_LIBS}])
AC_CHECK_LIB([vpx],[vpx_codec_vp8_dx], [
VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP8_DECODER])
], [], [${VPX_LIBS}])
AC_CHECK_LIB([vpx],[vpx_codec_vp9_dx], [
VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP9_DECODER])
], [], [${VPX_LIBS}])
AC_CHECK_LIB([vpx],[vpx_codec_vp8_cx], [
VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP8_ENCODER])
], [], [${VPX_LIBS}])
AC_CHECK_LIB([vpx],[vpx_codec_vp9_cx], [
VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP9_ENCODER])
], [], [${VPX_LIBS}])
AC_MSG_ERROR([libvpx 1.5.0 or higher was not found])
dnl
Christophe Massiot
committed
dnl twolame encoder plugin
dnl
PKG_ENABLE_MODULES_VLC([TWOLAME], [], [twolame], [MPEG Audio Layer 2 encoder], [auto], [], [], [ -DLIBTWOLAME_STATIC])

Sergio Ammirata
committed
dnl
dnl fdk-aac encoder plugin
dnl
PKG_ENABLE_MODULES_VLC([FDKAAC], [], [fdk-aac], [FDK-AAC encoder], [disabled])
[ --enable-a52 A/52 support with liba52 (default enabled)])
Samuel Hocevar
committed
AC_ARG_WITH(a52,
[ --with-a52=PATH a52 headers and libraries])
Samuel Hocevar
committed
LDFLAGS_test=""
CPPFLAGS_test=""
Samuel Hocevar
committed
LDFLAGS_test="-L${with_a52}/lib"
CPPFLAGS_test="-I${with_a52}/include"
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_test} ${CPPFLAGS_a52}"
LDFLAGS="${LDFLAGS} ${LDFLAGS_test} ${LIBS_a52}"
AC_CHECK_HEADERS(a52dec/a52.h, [
VLC_ADD_LIBS([a52],[${LDFLAGS_test} -la52 $LIBM])
VLC_ADD_CPPFLAGS([a52],[${CPPFLAGS_test}])
AC_MSG_ERROR([Could not find liba52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.])
],[
AC_MSG_ERROR([Could not find liba52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.])
VLC_RESTORE_FLAGS
PKG_ENABLE_MODULES_VLC([DCA], [dca], [libdca >= 0.0.5], [DTS Coherent Acoustics support with libdca], [auto])
dnl
dnl
PKG_ENABLE_MODULES_VLC([FLAC], [], [flac], [libflac decoder/encoder support], [auto])

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([LIBMPEG2], [], [libmpeg2 > 0.3.2], [libmpeg2 decoder support], [auto])

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([VORBIS], [], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorbis decoder and encoder], [auto])
dnl
dnl Tremor plugin
dnl
AC_ARG_ENABLE(tremor,
[ --enable-tremor Tremor decoder support (default disabled)])
PKG_ENABLE_MODULES_VLC([SPEEX], [], [ogg speex >= 1.0.5], [Speex support], [auto])
have_speexdsp="no"
AS_IF([test "${enable_speex}" != "no"], [
PKG_CHECK_MODULES([SPEEXDSP], [speexdsp], [
have_speexdsp="yes"
], [
])
])
AM_CONDITIONAL([HAVE_SPEEXDSP], [test "$have_speexdsp" = "yes"])
PKG_ENABLE_MODULES_VLC([OPUS], [], [ogg opus >= 1.0.3], [Opus support], [auto])
PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theoradec >= 1.0 theoraenc], [experimental theora codec], [auto])
dnl
dnl OggSpots decoder plugin
dnl
PKG_ENABLE_MODULES_VLC([OGGSPOTS], [], [ogg], [experimental OggSpots codec], [auto])
dnl
dnl Daala decoder plugin
dnl
PKG_ENABLE_MODULES_VLC([DAALA], [], [daaladec daalaenc], [experimental daala codec], [disabled])
dnl
dnl schroedinger decoder plugin (for dirac format video)
dnl
PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [], [schroedinger-1.0 >= 1.0.10], [dirac decoder and encoder using schroedinger], [auto])
dnl
dnl PNG decoder module
dnl
AC_ARG_ENABLE(png,
[ --enable-png PNG support (default enabled)])
AS_IF([test "${enable_png}" != "no"], [
VLC_SAVE_FLAGS
AC_CHECK_LIB(png, png_set_rows, [
VLC_ADD_PLUGIN([png])
], [], [-lz $LIBM])
VLC_RESTORE_FLAGS
dnl
dnl JPEG decoder module
dnl
AC_ARG_ENABLE(jpeg,
[ --enable-jpeg JPEG support (default enabled)])
AS_IF([test "${enable_jpeg}" != "no"], [
AC_CHECK_HEADERS(jpeglib.h, [
VLC_ADD_PLUGIN([jpeg])
])
])
dnl
dnl BPG decoder module
dnl
AC_ARG_ENABLE(bpg,
[ --enable-bpg BPG support (default disabled)])
AS_IF([test "${enable_bpg}" != "no"], [
AC_CHECK_HEADERS(libbpg.h, [
VLC_ADD_PLUGIN([bpg])
])
])
dnl
dnl H262 encoder plugin (lib262)
dnl
AC_ARG_ENABLE(x262,
[ --enable-x262 H262 encoding support with static libx262 (default disabled)])
if test "${enable_x262}" != "no"; then
PKG_CHECK_MODULES(X262, x262, [
VLC_ADD_PLUGIN([x262])
VLC_ADD_LDFLAGS([x262],[${X262_LIBS}])
AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
VLC_ADD_LIBS([x262],[${av_cv_ld_bsymbolic}])
])
VLC_ADD_CFLAGS([x262],[${X262_CFLAGS}])
if echo ${X262_LIBS} |grep -q 'pthreadGC2'; then
VLC_ADD_CFLAGS([x262], [-DPTW32_STATIC_LIB])
fi
], [
if test "${enable_x262}" = "yes"; then
AC_MSG_ERROR([x262 module doesn't work without staticly compiled libx262.a])
fi
])
fi
PKG_ENABLE_MODULES_VLC([X265],, [x265], [HEVC/H.265 encoder], [auto])

Ilkka Ollakka
committed
dnl
dnl H264 encoder plugin (10-bit lib264)
dnl
AC_ARG_ENABLE(x26410b,
[ --enable-x26410b H264 10-bit encoding support with static libx264 (default disabled)])
if test "${enable_x26410b}" != "no"; then
PKG_CHECK_MODULES(X26410B, x26410b, [
VLC_ADD_PLUGIN([x26410b])
VLC_ADD_LIBS([x26410b],[${X26410B_LIBS}])
AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
VLC_ADD_LDFLAGS([x26410b],[${ac_cv_ld_bsymbolic}])

Ilkka Ollakka
committed
])
VLC_ADD_CFLAGS([x26410b],[${X26410B_CFLAGS}])
if echo ${X26410B_LIBS} |grep -q 'pthreadGC2'; then
VLC_ADD_CFLAGS([x26410b], [-DPTW32_STATIC_LIB])
fi
], [

Ilkka Ollakka
committed
AC_MSG_ERROR([x26410b module doesn't work without staticly compiled libx264.a])

Ilkka Ollakka
committed
])
fi
dnl
dnl H264 encoder plugin (using libx264)
dnl
AC_ARG_ENABLE(x264,
[ --enable-x264 H264 encoding support with libx264 (default enabled)])
if test "${enable_x264}" != "no"; then
PKG_CHECK_MODULES(X264,x264 >= 0.86, [
VLC_ADD_LIBS([x264],[${X264_LIBS}])
AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
VLC_ADD_LDFLAGS([x264],[${ac_cv_ld_bsymbolic}])
if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
fi
],[
if test "${enable_x264}" = "yes"; then
AC_MSG_ERROR([${X264_PKG_ERRORS}: you may get it from http://www.videolan.org/x264.html])
dnl
dnl Intel QuickSync (aka MediaSDK) H264/H262 encoder
dnl
PKG_ENABLE_MODULES_VLC([MFX], [qsv], [libmfx], [Intel QuickSync MPEG4-Part10/MPEG2 (aka H.264/H.262) encoder], [auto])
dnl
dnl libfluidsynth (MIDI synthetizer) plugin
dnl
PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth >= 1.1.2], [MIDI synthetiser with libfluidsynth], [auto])
PKG_ENABLE_MODULES_VLC([FLUIDLITE], [fluidsynth], [fluidlite], [MIDI synthetiser with libfluidsynth], [auto])
AC_CHECK_HEADERS(fluidlite.h, [AC_SUBST([FLUIDSYNTH_LIBS], ${FLUIDLITE_LIBS})])

Jean-Paul Saman
committed
dnl
Christophe Mutricy
committed
dnl Teletext Modules

Jean-Paul Saman
committed
dnl vbi decoder plugin (using libzbvi)
Christophe Mutricy
committed
dnl telx module
dnl uncompatible

Jean-Paul Saman
committed
dnl
AC_ARG_ENABLE(zvbi,
AS_HELP_STRING([--enable-zvbi],[VBI (inc. Teletext) decoding support with
Christophe Mutricy
committed
AC_ARG_ENABLE(telx,
AS_HELP_STRING([--enable-telx],[Teletext decoding module (conflicting with
zvbi) (default enabled if zvbi is absent)]))
Christophe Mutricy
committed
AS_IF( [test "${enable_zvbi}" != "no"],[
PKG_CHECK_MODULES(ZVBI, [zvbi-0.2 >= 0.2.28],
AC_DEFINE(ZVBI_COMPILED, 1, [Define if the zvbi module is built])
AS_IF( [test "${enable_telx}" = "yes"],[
AC_MSG_WARN([The zvbi and telx modules are incompatible. Using zvbi.])
AC_MSG_WARN([${ZVBI_PKG_ERRORS}. Enabling the telx module instead.])
AS_IF( [test "${enable_telx}" != "no" ],[
Christophe Mutricy
committed
])

Jean-Paul Saman
committed
dnl
dnl libass subtitle rendering module
dnl
AC_ARG_ENABLE(libass,
[ --enable-libass Subtitle support using libass (default enabled)])
AS_IF( [test "${enable_libass}" != "no"], [
PKG_CHECK_MODULES(LIBASS, [libass >= 0.9.8],
AC_CHECK_HEADERS(fontconfig/fontconfig.h,
[VLC_ADD_CPPFLAGS([libass],[-DHAVE_FONTCONFIG])
VLC_ADD_LIBS([libass],[-lfontconfig])
])
AC_MSG_WARN([${LIBASS_PKG_ERRORS}.])
dnl
dnl ARIB subtitles rendering module
dnl
AC_ARG_ENABLE(aribsub,
[ --enable-aribsub ARIB Subtitles support (default enabled)])
AS_IF( [test "${enable_aribsub}" != "no" ],[
PKG_CHECK_MODULES(ARIBB24, [aribb24 >= 1.0.1], [
have_aribb24="yes"
VLC_ADD_PLUGIN([aribsub])
VLC_ADD_LIBS([aribsub],[-laribb24])
AC_DEFINE(HAVE_ARIBB24, 1, [Define if libaribb24 is available.])
],[
AC_MSG_WARN(Library [aribb24] needed for [aribsub] was not found)
have_aribb24="no"
])
])
AM_CONDITIONAL([HAVE_ARIBB24], [test x"${have_aribb24}" = x"yes"])
dnl
dnl ARIB B25
dnl
PKG_ENABLE_MODULES_VLC([ARIBB25], [aribcam], [aribb25 >= 0.2.6], [ARIB STD-B25], [auto])
dnl
dnl kate decoder plugin
dnl
PKG_ENABLE_MODULES_VLC([KATE], [], [kate >= 0.3.0], [kate codec], [auto])
dnl tiger rendering for kate decoder plugin
dnl
AC_ARG_ENABLE(tiger,
[ --enable-tiger Tiger rendering library for Kate streams (default auto)])
AS_IF([test "${enable_tiger}" != "no"], [
PKG_CHECK_MODULES(TIGER,[tiger >= 0.3.1], [
AC_DEFINE(HAVE_TIGER, 1, [Define if libtiger is available.])],[
AS_IF([test -n "${enable_tiger}"], [
AC_MSG_ERROR([${TIGER_PKG_ERRORS}.])

Rémi Denis-Courmont
committed
PKG_CHECK_MODULES([EGL], [egl], [
have_egl="yes"
], [
have_egl="no"
])
AM_CONDITIONAL([HAVE_EGL], [test "${have_egl}" = "yes"])
have_gl="no"
PKG_CHECK_MODULES([GL], [gl], [
have_gl="yes"
], [
AC_MSG_CHECKING([for OpenGL])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef _WIN32
# include <GL/glew.h>
#endif
#include <GL/gl.h>
]], [
[int t0 = GL_TEXTURE0;]])
], [
have_gl="yes"
AS_IF([test "${SYS}" != "mingw32"], [
GL_LIBS="-lGL"
], [
GL_LIBS="-lopengl32"
])
AC_MSG_RESULT([${have_gl}])
AM_CONDITIONAL([HAVE_GL], [test "${have_gl}" = "yes"])
dnl OpenGL ES 2: depends on EGL 1.1
PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled])
dnl
dnl Xlib
dnl
AC_PATH_XTRA()
AC_CHECK_HEADERS(X11/Xlib.h)
dnl
dnl X C Bindings modules
dnl
AC_ARG_ENABLE(xcb,
[ --enable-xcb X11 support with XCB (default enabled)],, [
AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "darwin"], [
enable_xcb="yes"
], [
enable_xcb="no"
])
])
AC_ARG_ENABLE(xvideo,
[ --enable-xvideo XVideo support (default enabled)],, [
enable_xvideo="$enable_xcb"
])
have_xcb_randr="no"
AS_IF([test "${enable_xcb}" != "no"], [
dnl libxcb
PKG_CHECK_MODULES(XCB, [xcb >= 1.6])
PKG_CHECK_MODULES(XCB_COMPOSITE, [xcb-composite])
AS_IF([test "${enable_xvideo}" != "no"], [
PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [have_xcb_xvideo="yes"])
PKG_CHECK_MODULES(XCB_RANDR, [xcb-randr >= 1.3], [have_xcb_randr="yes"])