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

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto])
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_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
dnl
dnl shine fixed point mp3 encoder
dnl
AC_ARG_ENABLE(shine,
[ --enable-shine shine mp3 encoding module (default disabled)])
if test "${enable_shine}" = "yes"
then
VLC_ADD_PLUGIN([shine])
fi
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"])
dnl
dnl avcodec decoder/encoder plugin
dnl
AC_ARG_ENABLE(avcodec,
AS_IF([test "${enable_avcodec}" != "no"], [
PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.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_avcodec_vaapi="no"
AS_IF([test "${enable_libva}" != "no" -a "${have_avcodec}" = "yes"], [
PKG_CHECK_MODULES(LIBVA, [libva libva-x11], [
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
AS_IF([test -n "${enable_libva}"], [
AC_MSG_ERROR([${LIBVA_PKG_ERRORS}.])
], [
AC_MSG_WARN([${LIBVA_PKG_ERRORS}.])
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"
AS_IF([test "${enable_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.])
])
])
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)
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
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"])
dnl
dnl Opus plugin
dnl
PKG_ENABLE_MODULES_VLC([OPUS], [], [ogg opus], [Opus support], [auto])
PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theoradec >= 1.0 theoraenc], [experimental theora codec], [auto])
dnl
dnl dirac encoder plugin
dnl

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([DIRAC], [], [dirac >= 0.10.0], [dirac encoder], [auto])
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
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
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

Ilkka Ollakka
committed
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
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
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 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}.])
dnl
dnl OpenGL
dnl
PKG_CHECK_MODULES([GL], [gl], [
have_gl="yes"
], [
AC_CHECK_HEADER([GL/gl.h], [
have_gl="yes"
GL_CFLAGS=""
AS_IF([test "${SYS}" = "mingw32"], [
GL_LIBS="-lopengl32"
], [
GL_LIBS="-lGL"
])
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 OpenGL ES 1: depends on EGL 1.0
PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 support], [disabled])
AC_ARG_ENABLE(egl,
[ --enable-egl OpenGL support through EGL (default disabled)],, [
enable_egl="no"
])
AS_IF([test "$enable_egl" != "no"], [
PKG_CHECK_MODULES([EGL], [egl], [
VLC_ADD_PLUGIN([egl])
])
])
dnl
dnl Xlib
dnl
AC_PATH_XTRA()
AC_CHECK_HEADERS(X11/Xlib.h)