Newer
Older
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).])]

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([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([MUX_OGG], [], [ogg >= 1.0], [Ogg mux support], [auto])
PKG_ENABLE_MODULES_VLC([SHOUT], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
[AS_HELP_STRING([--disable-mkv],
[do not use libmatroska (default auto)])])
if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS(ebml/EbmlVersion.h, [
AC_MSG_CHECKING(for libebml version >= 1.0.0)
AC_EGREP_CPP(yes,
[#include <ebml/EbmlVersion.h>
#ifdef LIBEBML_VERSION
#if LIBEBML_VERSION >= 0x010000
yes
#endif
#endif],
[AC_MSG_RESULT([yes])
AC_CHECK_HEADERS(matroska/KaxVersion.h, [
AC_MSG_CHECKING(for libmatroska version >= 1.0.0)
AC_EGREP_CPP(yes,
[#include <matroska/KaxVersion.h>
#ifdef LIBMATROSKA_VERSION
#if LIBMATROSKA_VERSION >= 0x010000
yes
#endif
#endif],
[AC_MSG_RESULT([yes])
AC_CHECK_HEADERS(matroska/KaxAttachments.h)
VLC_ADD_LIBS([mkv],[-lmatroska -lebml_pic])
VLC_ADD_LIBS([mkv],[-lmatroska -lebml])
AC_MSG_ERROR([Your libmatroska is too old: you may get a more recent one from http://dl.matroska.org/downloads/libmatroska/. Alternatively you can use --disable-mkv to disable the matroska plugin.])
])
],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([Your libebml is too old: you may get a more recent one from http://dl.matroska.org/downloads/libebml/. Alternatively you can use --disable-mkv to disable the matroska plugin.])
Samuel Hocevar
committed
])
[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>
])
AC_ARG_ENABLE(mad,
[ --enable-mad libmad module (default enabled)])
if test "${enable_mad}" != "no"
then
AC_ARG_WITH(mad,
[ --with-mad=PATH path to libmad],[],[])
if test "${with_mad}" != "no" -a -n "${with_mad}"
then
VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${with_mad}/include])
VLC_ADD_LIBS([mpgatofixed32],[-L${with_mad}/lib])
fi
AC_ARG_WITH(mad-tree,
[ --with-mad-tree=PATH mad tree for static linking],[],[])
if test "${with_mad_tree}" != "no" -a -n "${with_mad_tree}"
then
real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
if test -z "${real_mad_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
fi
dnl Use a custom libmad
AC_MSG_CHECKING(for mad.h in ${real_mad_tree})
if test -f ${real_mad_tree}/mad.h
then
AC_MSG_RESULT(yes)
VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${real_mad_tree}])
VLC_ADD_LIBS([mpgatofixed32],[-L${real_mad_tree}/.libs])
VLC_SAVE_FLAGS
LDFLAGS="${LDFLAGS} ${LIBS_mpgatofixed32}"
AC_CHECK_LIB(mad, mad_bit_init, [
VLC_ADD_PLUGIN([mpgatofixed32])
VLC_ADD_LIBS([mpgatofixed32],[-lmad])
],[ AC_MSG_ERROR([the specified tree has not been compiled ])
VLC_RESTORE_FLAGS
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_mpgatofixed32}"
LDFLAGS="${LDFLAGS} ${LIBS_mpgatofixed32}"
AC_CHECK_HEADERS(mad.h, ,
[ AC_MSG_ERROR([Could not find libmad on your system: you may get it from http://www.underbit.com/products/mad/. Alternatively you can use --disable-mad to disable the mad plugin.]) ])
AC_CHECK_LIB(mad, mad_bit_init, [
VLC_ADD_PLUGIN([mpgatofixed32])
VLC_ADD_LIBS([mpgatofixed32],[-lmad])],
[ AC_MSG_ERROR([Cannot find libmad library...]) ])
VLC_RESTORE_FLAGS
Samuel Hocevar
committed

Rémi Denis-Courmont
committed
AC_ARG_ENABLE(merge-ffmpeg,
[ --enable-merge-ffmpeg merge FFmpeg-based plugins (default disabled)],, [

Rémi Denis-Courmont
committed
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}])
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(avcodec,
AS_IF([test "${enable_avcodec}" != "no"], [
PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 54.25.0 libavutil >= 52.0.0], [
dnl PKG_CHECK_EXISTS([libavcodec < 56],, [
dnl AC_MSG_ERROR([libavcodec versions 56 and later are not supported yet.])
dnl ])
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_EXISTS([libva], [
have_vaapi="yes"
], [
AS_IF([test -n "${enable_libva}"], [
AC_MSG_ERROR([${LIBVA_PKG_ERRORS}.])
], [
AC_MSG_WARN([${LIBVA_PKG_ERRORS}.])
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
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([VAAPI 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"])
dnl
dnl vda needs avcodec
dnl
AC_ARG_ENABLE(vda,
[ --enable-vda VDA support (default auto)])
have_avcodec_vda="no"
AS_IF([test "${enable_vda}" != "no"], [
if test "${SYS}" = "darwin"; then
AS_IF([test "x${have_avcodec}" = "xyes"], [
AC_CHECK_HEADERS(VideoDecodeAcceleration/VDADecoder.h,
[
AC_CHECK_HEADERS(libavcodec/vda.h, [
have_avcodec_vda="yes"
],[
[AC_MSG_ERROR([vda is present but libavcodec/vda.h is missing])],
[AC_MSG_WARN([vda is present but libavcodec/vda.h is missing ])])
])
],[
AS_IF([test "${enable_vda}" = "yes"],
[AC_MSG_ERROR([Could not find required VideoDecodeAcceleration/VDADecoder.h])],
[AC_MSG_WARN([VideoDecodeAcceleration/VDADecoder.h not found])])
])
],[
AS_IF([test "x${enable_vda}" != "x"], [
AC_MSG_ERROR([--enable-vda and --disable-avcodec options are mutually exclusive.])
])
AS_IF([test "${have_avcodec_vda}" = "yes"], [
SAVE_LIBS=$LIBS
LIBS="$LIBS $AVCODEC_LIBS"
AC_CHECK_FUNCS([av_vda_alloc_context])
LIBS=$SAVE_LIBS
])
fi
AM_CONDITIONAL([HAVE_AVCODEC_VDA], [test "${have_avcodec_vda}" = "yes"])
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])
VLC_ADD_LIBS([postproc],[$POSTPROC_LIBS $AVUTIL_LIBS])
VLC_ADD_CFLAGS([postproc],[$POSTPROC_CFLAGS $AVUTIL_CFLAGS])
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)])
if test "${enable_faad}" != "no"; then
AC_ARG_WITH(faad-tree, [ --with-faad-tree=PATH faad tree for static linking])
if test -n "${with_faad_tree}"; then
AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
if test -z "${real_faad_tree}"; then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
fi
if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"; then
dnl Use the custom faad
AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
VLC_ADD_LIBS([faad],[${real_faad_tree}/libfaad/.libs/libfaad.a])
VLC_ADD_CPPFLAGS([faad],[-I${real_faad_tree}/include])
else
dnl The given libfaad wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
fi
else
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_faad}"
LDFLAGS="${LDFLAGS} ${LIBS_faad}"
AC_CHECK_HEADERS(faad.h,
[ AC_CHECK_LIB(faad, faacDecOpen, [
VLC_ADD_PLUGIN([faad])
VLC_ADD_LIBS([faad],[-lfaad]) ], [
AC_CHECK_LIB(faad, NeAACDecOpen, [
VLC_ADD_PLUGIN([faad])
VLC_ADD_LIBS([faad],[-lfaad]) ], [
AS_IF([test "${enable_faad}" = "yes"],
[ AC_MSG_ERROR([Cannot find libfaad library...]) ],
[ AC_MSG_WARN([Cannot find libfaad library...]) ]) ]) ])
] , [ AS_IF([test "${enable_faad}" = "yes"],
[ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ],
[ AC_MSG_WARN([Cannot find development headers for libfaad...]) ]) ])
VLC_RESTORE_FLAGS
fi
fi
dnl
dnl libvpx decoder plugin
dnl
AC_ARG_ENABLE(vpx,
AS_HELP_STRING([--enable-vpx],[libvpx VP8/VP9 decoder (default auto)]))
AS_IF([test "${enable_vpx}" != "no"],[
PKG_CHECK_MODULES([VPX], [vpx] , [
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}])
], [
AS_IF([test "${enable_vpx}" = "yes"],[
AC_MSG_ERROR([libvpx 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])
dnl
dnl QuickTime plugin
dnl
AC_ARG_ENABLE(quicktime,
[ --enable-quicktime QuickTime module (deprecated)])
if test "${enable_quicktime}" = "yes"; then

Felix Paul Kühne
committed
[ VLC_ADD_PLUGIN([quicktime])

Felix Paul Kühne
committed
VLC_ADD_LIBS([quicktime],[-Wl,-framework,QuickTime,-framework,Carbon])
[ --enable-a52 A/52 support with liba52 (default enabled)])
Samuel Hocevar
committed
AC_ARG_WITH(a52,
[ --with-a52=PATH a52 headers and libraries])
[ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
if test "${with_a52_tree}" != "no" -a -n "${with_a52_tree}"
fi
dnl Use a custom a52dec
AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
if test -f ${real_a52_tree}/include/a52.h
then
AC_MSG_RESULT(yes)
VLC_ADD_CPPFLAGS([a52tofloat32],[-I${real_a52_tree}])
VLC_ADD_LIBS([a52tofloat32],[-L${real_a52_tree}/liba52/.libs])
VLC_SAVE_FLAGS
LDFLAGS="${LDFLAGS} ${LIBS_a52tofloat32}"
VLC_ADD_CPPFLAGS([a52tofloat32],[-DUSE_A52DEC_TREE])
VLC_ADD_LIBS([a52tofloat32],[-la52])
AC_MSG_ERROR([make sure you have at least a52dec-0.7.3 ($real_a52_tree)])
])
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_a52tofloat32}"
LDFLAGS="${LDFLAGS} ${LDFLAGS_test} ${LIBS_a52tofloat32}"
AC_CHECK_HEADERS(a52dec/a52.h, [
VLC_ADD_LIBS([a52tofloat32],[${LDFLAGS_test} -la52])
VLC_ADD_CPPFLAGS([a52tofloat32],[${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], [dtstofloat32], [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 Daala decoder plugin
dnl
PKG_ENABLE_MODULES_VLC([DAALA], [], [ogg 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])
])
])
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
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
AC_ARG_WITH(x262-tree,
[ --with-x262-tree=PATH H262 encoding module with libx262 (static linking)],[],[])
if test "${with_x262_tree}" != "no" -a -n "${with_x262_tree}"
then
real_x262_tree="̧`cd ${with_x262_tree} 2>/dev/null && pwd`"
if test -z "${real_x262_tree}"
then
AC_MSG_RESULT(no)
AC_MSG_ERROR([${with_x262_tree} directory does not exist])
fi
AC_MSG_CHECKING(for x262.h in ${real_x262_tree})
if test -f ${with_x262_tree}/x262_config.h
then
VLC_ADD_PLUGIN([x262])
VLC_ADD_CFLAGS([x262],[-I${with_x262_tree}])
VLC_ADD_LIBS([x262],[-L${with_x262_tree} -lm -lpthread -lx262])
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([${with_x262_tree} doesnt have x262_config.h])
fi
else
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
fi
PKG_ENABLE_MODULES_VLC([X265],, [x265], [HEVC/H.265 encoder], [auto])

Ilkka Ollakka
committed
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
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
AC_ARG_WITH(x26410b-tree,
[ --with-x26410b-tree=PATH H264 10-bit encoding module with libx264 (static linking)],[],[])
if test "${with_x26410b_tree}" != "no" -a -n "${with_x26410b_tree}"
then
real_x26410b_tree="̧`cd ${with_x26410b_tree} 2>/dev/null && pwd`"
if test -z "${real_x26410b_tree}"
then
AC_MSG_RESULT(no)
AC_MSG_ERROR([${with_x26410b_tree} directory does not exist])
fi
AC_MSG_CHECKING(for x264.h in ${real_x26410b_tree})
if test -f ${with_x26410b_tree}/x264_config.h
then
AC_MSG_RESULT(yes)
AC_MSG_CHECKING(for 10-bit build of x264)
if grep -q "BIT_DEPTH.*10" ${with_x26410b_tree}/x264_config.h ;then
AC_MSG_RESULT(yes)
VLC_ADD_PLUGIN([x26410b])
VLC_ADD_CFLAGS([x26410b],[-I${with_x26410b_tree}])
VLC_ADD_LIBS([x26410b],[-L${with_x26410b_tree} -lm -lpthread -lx264])
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([${with_x26410b_tree} isnt build 10-bit])
fi
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([${with_x26410b_tree} doesnt have x264_config.h])
fi
else
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
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
AC_ARG_WITH(x264-tree,
[ --with-x264-tree=PATH x264 tree for static linking ],[],[])
if test "${with_x264_tree}" != "no" -a -n "${with_x264_tree}"
then
real_x264_tree="`cd ${with_x264_tree} 2>/dev/null && pwd`"
if test -z "${real_x264_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([${with_x264_tree} directory does not exist])
fi
dnl Use a custom libx264
AC_MSG_CHECKING(for x264.h in ${real_x264_tree})
if test -f ${real_x264_tree}/x264.h
then
AC_MSG_RESULT(yes)
VLC_ADD_CPPFLAGS([x264],[-I${real_x264_tree}])
VLC_ADD_LIBS([x264],[-L${real_x264_tree}])

Felix Paul Kühne
committed
VLC_ADD_LIBS([x264],[${X264_LIBS}])
if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
fi
])
else
AC_MSG_RESULT(no)
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])
fi
])
fi
fi
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])

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