Newer
Older
VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${with_mad}/include])
VLC_ADD_LIBS([mpgatofixed32],[-L${with_mad}/lib])
[ --with-mad-tree=PATH mad tree for static linking],[],[])
if test "${with_mad_tree}" != "no" -a -n "${with_mad_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
fi
dnl Use a custom libmad
AC_MSG_CHECKING(for mad.h in ${real_mad_tree})
if test -f ${real_mad_tree}/mad.h
VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${real_mad_tree}])
VLC_ADD_LIBS([mpgatofixed32],[-L${real_mad_tree}/.libs])
LDFLAGS="${LDFLAGS_save} ${LIBS_mpgatofixed32}"
VLC_ADD_LIBS([mpgatofixed32],[-lmad])
Samuel Hocevar
committed
LDFLAGS="${LDFLAGS_save}"
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([the specified tree doesn't have mad.h])
fi
else
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mpgatofixed32}"
LDFLAGS="${LDFLAGS_save} ${LIBS_mpgatofixed32}"
[ 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.]) ])
VLC_ADD_PLUGIN([mpgatofixed32])
VLC_ADD_LIBS([mpgatofixed32],[-lmad])],
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}"
LDFLAGS="${LDFLAGS_save}"
dnl libid3tag support (FIXME!!! doesn't work with new input)
[ --disable-id3tag id3tag metadata reader plugin (default disabled)])
AS_IF([test "${enable_id3tag}" = "yes"], [
AS_IF([test "${have_zlib}" = "yes"],[
VLC_ADD_LIBS([id3tag],[-lid3tag -lz])
VLC_ADD_PLUGIN([id3tag])
])
])
Samuel Hocevar
committed
dnl
dnl avcodec decoder/encoder plugin
dnl
if test "${with_ffmpeg_tree}"
then
AC_MSG_WARN([--with-ffmpeg-tree is deprecated. Use PKG_CONFIG_PATH instead.])
fi
AC_ARG_ENABLE(avcodec,
if test "${enable_avcodec}" != "no"
then
PKG_CHECK_MODULES(AVCODEC,[libavcodec libavutil],
[
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h)
AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h)
VLC_ADD_PLUGIN([avcodec])
VLC_ADD_LIBS([avcodec],[$AVCODEC_LIBS])
VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS])
VLC_RESTORE_FLAGS
],[
dionoea
committed
AC_MSG_FAILURE([Could not find libavcodec or libavutil. Use --disable-avcodec to ignore this error.])
])
fi
dnl
dnl avformat demuxer/muxer plugin
dnl
AC_ARG_ENABLE(avformat,
[ --enable-avformat libavformat containers (default enabled)])
if test "${enable_avformat}" != "no"
then
PKG_CHECK_MODULES(AVFORMAT,[libavformat libavutil],
[
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}"
CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}"
AC_CHECK_HEADERS(libavformat/avformat.h ffmpeg/avformat.h)
AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h)
VLC_ADD_PLUGIN([avformat])
VLC_ADD_LIBS([avformat],[$AVFORMAT_LIBS])
VLC_ADD_CFLAGS([avformat],[$AVFORMAT_CFLAGS])
VLC_RESTORE_FLAGS
],[
dionoea
committed
AC_MSG_FAILURE([Could not find libavformat or libavutil. Use --disable-avformat to ignore this error.])
])
fi
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 ffmpeg/swscale.h)
VLC_ADD_PLUGIN([swscale])
VLC_ADD_LIBS([swscale],[$SWSCALE_LIBS])
VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS])
dionoea
committed
VLC_RESTORE_FLAGS
],[
AC_MSG_WARN([Could not find libswscale. Trying to enable imgresample.])
enable_imgresample=yes
])
fi
dnl
dnl avcodec (deprecated API) image scaling and conversion plugin
dnl
dnl This is build as a seperate module than the avcodec one to prevent
dnl stupid run time library load errors from disabling most codecs
dnl from VLC.
dnl
AC_ARG_ENABLE(imgresample,
AS_HELP_STRING([--enable-imgresample],[deprecated libavcodec image scaling
if test "${enable_imgresample}" = "yes"
then
PKG_CHECK_MODULES(IMGRESAMPLE,[libavcodec],
[
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${IMGRESAMPLE_CFLAGS}"
CFLAGS="${CFLAGS} ${IMGRESAMPLE_CFLAGS}"
AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h)
AC_CHECK_LIB(avcodec,img_resample,
[
VLC_ADD_PLUGIN([imgresample])
VLC_ADD_LIBS([imgresample],[$IMGRESAMPLE_LIBS])
VLC_ADD_CFLAGS([imgresample],[$IMGRESAMPLE_CFLAGS])
],[
AC_MSG_WARN([Could not find img_resample in libavcodec.])
if test "${enable_swscale}" != "no"
then
dionoea
committed
AC_MSG_FAILURE([swscale (and its fallback module imgresample) support will be missing. Use --disable-swscale to ignore this error. (This basically means that you will be missing any good software scaling module and some video chroma converters.)])
fi
# That sed hack to add -rpath is kind of ugly but at least it fixes
# detection when linking against a shared libavcodec with
# a libavutil not in one of your ld.so.conf directories.
# (for example a local install)
],[${IMGRESAMPLE_LIBS} `echo ${IMGRESAMPLE_LIBS}|sed s'/-L/-Wl,-rpath=/'`])
VLC_RESTORE_FLAGS
],[
AC_MSG_WARN([Could not find libavcodec.])
])
fi
dnl
dnl postproc plugin
dnl
dionoea
committed
AC_ARG_ENABLE(postproc,
[ --enable-postproc libpostproc image post-processing (default enabled)])
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(libpostproc/postproc.h postproc/postprocess.h)
VLC_ADD_PLUGIN([postproc])
VLC_ADD_LIBS([postproc],[$POSTPROC_LIBS])
VLC_ADD_CFLAGS([postproc],[$POSTPROC_CFLAGS])
dionoea
committed
VLC_RESTORE_FLAGS
],[
AC_MSG_ERROR([Could not find libpostproc.])
dnl
dnl faad decoder plugin
dnl
AC_ARG_ENABLE(faad,
[ --enable-faad faad codec (default disabled)])
then
Samuel Hocevar
committed
AC_ARG_WITH(faad-tree,
[ --with-faad-tree=PATH faad tree for static linking])
then
AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
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 a 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
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
LDFLAGS="${LDFLAGS_save} ${LIBS_faad}"
AC_CHECK_HEADERS(faad.h, ,
[ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
AC_CHECK_LIB(faad, faacDecOpen, [
VLC_ADD_LIBS([faad],[-lfaad]) ],
AC_CHECK_LIB(faad, NeAACDecOpen, [
VLC_ADD_LIBS([faad],[-lfaad]) ],
[ AC_MSG_ERROR([Cannot find libfaad library...]) ]))
Samuel Hocevar
committed
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
fi
fi
dnl
Christophe Massiot
committed
dnl twolame encoder plugin
dnl
Christophe Massiot
committed
AC_ARG_ENABLE(twolame,
[ --enable-twolame twolame codec (default disabled)])
if test "${enable_twolame}" = "yes"
then
Christophe Massiot
committed
AC_ARG_WITH(twolame-tree,
[ --with-twolame-tree=PATH twolame tree for static linking])
if test -n "${with_twolame_tree}"
then
Christophe Massiot
committed
AC_MSG_CHECKING(for libtwolame.a in ${with_twolame_tree})
real_twolame_tree="`cd ${with_twolame_tree} 2>/dev/null && pwd`"
if test -z "${real_twolame_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
Christophe Massiot
committed
AC_MSG_ERROR([cannot cd to ${with_twolame_tree}])
fi
if test -f "${real_twolame_tree}/libtwolame/.libs/libtwolame.a"
then
Christophe Massiot
committed
dnl Use a custom twolame
AC_MSG_RESULT(${real_twolame_tree}/libtwolame/.libs/libtwolame.a)
VLC_ADD_LIBS([twolame],[${real_twolame_tree}/libtwolame/.libs/libtwolame.a])
VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/libtwolame -DLIBTWOLAME_STATIC])
else
Christophe Massiot
committed
dnl The given libtwolame wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_twolame_tree}/libtwolame/.libs/libtwolame.a, make sure you compiled libtwolame in ${with_twolame_tree}])
fi
else
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_twolame} -DLIBTWOLAME_STATIC"
LDFLAGS="${LDFLAGS_save} ${LIBS_twolame}"
Christophe Massiot
committed
AC_CHECK_HEADERS(twolame.h, ,
[ AC_MSG_ERROR([Cannot find development header for libtwolame...]) ])
AC_CHECK_LIB(twolame, twolame_init, [
VLC_ADD_CPPFLAGS([twolame],[-DLIBTWOLAME_STATIC])
VLC_ADD_LIBS([twolame],[-ltwolame]) ],
Christophe Massiot
committed
[ AC_MSG_ERROR([Cannot find libtwolame library...]) ])
CPPFLAGS="${CPPFLAGS_save}"
fi
fi
dnl
dnl QuickTime plugin
dnl
AC_ARG_ENABLE(quicktime,
[ --enable-quicktime QuickTime module (default enabled on MacOS X)])
if test "${enable_quicktime}" != "no" &&
(test "${SYS}" = "darwin" || test "${enable_quicktime}" = "yes")

Felix Paul Kühne
committed
[ VLC_ADD_PLUGIN([quicktime])
Samuel Hocevar
committed
VLC_ADD_LDFLAGS([quicktime],[-Wl,-framework,QuickTime,-framework,Carbon])
dnl
dnl Real plugin
dnl
AC_ARG_ENABLE(real,
[ --enable-real Real media module (default disabled)])
if test "${enable_real}" = "yes"; then
fi
dnl
dnl Real RTSP plugin
dnl
AC_ARG_ENABLE(realrtsp,
[ --enable-realrtsp Real RTSP module (default disabled)])
if test "${enable_realrtsp}" = "yes"; then
VLC_ADD_PLUGIN([access_realrtsp])
AC_ARG_ENABLE(libsysfs,
[ --enable-libsysfs Get user key from firewire connected iPod via libsysfs (default enabled)])
AS_IF([test "${enable_libsysfs}" != "no"],[
AC_CHECK_HEADERS(sysfs/libsysfs.h, [
VLC_ADD_LIBS([mp4 mkv],[-lsysfs])
] )
])
Christophe Mutricy
committed
AC_ARG_ENABLE(libtar,
[ --enable-libtar libtar support for skins2 (default enabled)])
Christophe Mutricy
committed
AS_IF([test "${enable_libtar}" != "no"],[
AC_CHECK_HEADERS(libtar.h, [
VLC_ADD_LIBS([skins2],[-ltar])
Christophe Mutricy
committed
] )
])
[ --enable-a52 A/52 support with liba52 (default enabled)])
Samuel Hocevar
committed
AC_ARG_WITH(a52,
[ --with-a52=PATH a52 headers and libraries])
AC_ARG_WITH(a52-tree,
[ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
if test "${with_a52_tree}" != "no" -a -n "${with_a52_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
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])
LDFLAGS="${LDFLAGS_save} ${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="${LDFLAGS_save}"
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([the specified tree doesn't have a52.h])
fi
Samuel Hocevar
committed
LDFLAGS_test=""
CPPFLAGS_test=""
Samuel Hocevar
committed
LDFLAGS_test="-L${with_a52}/lib"
CPPFLAGS_test="-I${with_a52}/include"
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test} ${CPPFLAGS_a52tofloat32}"
LDFLAGS="${LDFLAGS_save} ${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.])
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}"
LDFLAGS="${LDFLAGS_save}"
gbazin
committed
AC_ARG_WITH(a52-fixed,
[ --with-a52-fixed specify if liba52 has been compiled with fixed point support],
[
VLC_ADD_CPPFLAGS([a52tofloat32],[-DLIBA52_FIXED]) ])
AC_MSG_ERROR([--enable-dts is obsolete. Please use libdca and --enable-dca.])
])
AS_IF([test "x${with_dts_tree}" != "x"], [
AC_MSG_ERROR([--with-dts-tree is obsolete. Please use libdca and --with-dca-tree.])
])
AC_ARG_ENABLE(dca,
AS_HELP_STRING([--enable-dca],[DTS Coherent Acoustics support with libdca
AS_IF([test "${enable_dca}" != "no"], [
AC_ARG_WITH(dca-tree,
[ --with-dca-tree=PATH libdca tree for static linking],,
[with_dca_tree="no"])
AS_IF([test "${with_dca_tree}" != "no"], [
real_dca_tree="`cd ${with_dca_tree} 2>/dev/null && pwd`"
AS_IF([test -z "${real_dca_tree}"], [
AC_MSG_ERROR([${with_dca_tree} directory doesn't exist])
])
dnl Use a custom libdca
AC_MSG_CHECKING(for libdca in ${real_dca_tree})
AS_IF([test -f "${real_dca_tree}/libdca/.libs/libdca.a"], [
VLC_ADD_LIBS([dtstofloat32],[${real_dca_tree}/libdca/.libs/libdca.a])
AS_IF([test -f "${real_dca_tree}/include/dca.h"], [
VLC_ADD_CPPFLAGS([dtstofloat32],[-I${real_dca_tree}/include])
], [
VLC_ADD_CPPFLAGS([dtstofloat32],[-I${real_dca_tree}/../include])
])
], [
AC_MSG_ERROR([the specified tree doesn't have libdca/.libs/libdca.a])
], [
PKG_CHECK_MODULES([DCA], [libdca >= 0.0.5], [
VLC_ADD_CPPFLAGS([dtstofloat32], [${DCA_CFLAGS}])
VLC_ADD_LIBS([dtstofloat32], [${DCA_LIBS}])
], [
AS_IF([test "x${enable_dca}" != "x"], [
AC_MSG_ERROR([${DCA_PKG_ERRORS}])
])
])
])
])
dnl
dnl
AC_ARG_ENABLE(flac,
[ --enable-flac libflac decoder/encoder support (default disabled)])
then
AC_ARG_WITH(flac-tree,
[ --with-flac-tree=PATH flac tree for static linking])
if test -n "${with_flac_tree}"
then
AC_MSG_CHECKING(for libFLAC.a in ${with_flac_tree})
real_flac_tree="`cd ${with_flac_tree} 2>/dev/null && pwd`"
if test -z "${real_flac_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_flac_tree}])
fi
if test -f "${real_flac_tree}/src/libFLAC/.libs/libFLAC.a"
then
dnl Use a custom flac
AC_MSG_RESULT(${real_flac_tree}/src/libFLAC/.libs/libFLAC.a)
VLC_ADD_LIBS([flac],[${real_flac_tree}/src/libFLAC/.libs/libFLAC.a])
VLC_ADD_CFLAGS([flac],[-I${real_flac_tree}/include])
AC_DEFINE(HAVE_FLAC_STREAM_DECODER_H, 1, [Define if you have FLAC])
else
dnl The given flac wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_flac_tree}/src/libFLAC/.libs/libFLAC.a, make sure you compiled flac in ${with_flac_tree}])
fi
else
AC_CHECK_HEADERS(FLAC/stream_decoder.h, [
VLC_ADD_LIBS([flac],[-lFLAC -logg])
],[])
fi
Samuel Hocevar
committed
fi
AC_ARG_WITH(libmpeg2-tree,
[ --with-libmpeg2-tree=PATH libmpeg2 tree for static linking])
AS_IF([test -n "${with_libmpeg2_tree}"],[
AC_MSG_CHECKING(for libmpeg2.a in ${with_libmpeg2_tree})
real_libmpeg2_tree="`cd ${with_libmpeg2_tree} 2>/dev/null && pwd`"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_libmpeg2_tree}])
fi
if test -f "${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a"
then
dnl Use a custom libmpeg2
AC_MSG_RESULT(${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a)
VLC_ADD_PLUGIN([libmpeg2])
VLC_ADD_LIBS([libmpeg2],[-L${real_libmpeg2_tree}/libmpeg2/.libs -lmpeg2])
VLC_ADD_CFLAGS([libmpeg2],[-I${real_libmpeg2_tree}/include])
else
dnl The given libmpeg2 wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a, make sure you compiled libmpeg2 in ${with_libmpeg2_tree}])
fi
PKG_CHECK_MODULES(LIBMPEG2,[libmpeg2 > 0.3.2],[
VLC_ADD_CFLAGS([libmpeg2], $LIBMPEG2_CFLAGS)
AC_MSG_WARN([Could not find libmpeg2 on your system: you may get it from http://libmpeg2.sf.net/ . Alternatively you can use --disable-libmpeg2 to disable the libmpeg2 plugin.]))
])
AC_ARG_WITH(vorbis-tree,
[ --with-vorbis-tree=PATH vorbis tree for static linking])
if test -n "${with_vorbis_tree}"
then
AC_MSG_CHECKING(for libvorbis.a in ${with_vorbis_tree})
real_vorbis_tree="`cd ${with_vorbis_tree} 2>/dev/null && pwd`"
if test -z "${real_vorbis_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_vorbis_tree}])
fi
if test -f "${real_vorbis_tree}/lib/.libs/libvorbis.a"
then
AC_MSG_RESULT(${real_vorbis_tree}/lib/.libs/libvorbis.a)
VLC_ADD_LIBS([vorbis],[${real_vorbis_tree}/lib/.libs/libvorbis.a ${real_vorbis_tree}/lib/.libs/libvorbisenc.a])
VLC_ADD_CFLAGS([vorbis],[-I${real_vorbis_tree}/include])
else
dnl The given vorbis wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_vorbis_tree}/lib/.libs/libvorbis.a, make sure you compiled vorbis in ${with_vorbis_tree}])
fi
else
AC_CHECK_HEADERS(vorbis/codec.h, [
VLC_ADD_LIBS([vorbis],[-lvorbis -logg -lm]) ],[])
AC_CHECK_HEADERS(vorbis/vorbisenc.h, [
VLC_ADD_LIBS([vorbis],[-lvorbisenc -lm]) ],[])
dnl
dnl Tremor plugin
dnl
AC_ARG_ENABLE(tremor,
[ --enable-tremor Tremor decoder support (default disabled)])
VLC_ADD_LIBS([tremor],[-lvorbisidec -logg])
[ --enable-speex Speex decoder support (default enabled)])
AC_ARG_WITH(speex-tree,
[ --with-speex-tree=PATH speex tree for static linking])
if test -n "${with_speex_tree}"
then
AC_MSG_CHECKING(for libspeex.a in ${with_speex_tree})
real_speex_tree="`cd ${with_speex_tree} 2>/dev/null && pwd`"
if test -z "${real_speex_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_speex_tree}])
fi
if test -f "${real_speex_tree}/libspeex/.libs/libspeex.a"
then
dnl Use a custom speex
AC_MSG_RESULT(${real_speex_tree}/libspeex/.libs/libspeex.a)
VLC_ADD_LIBS([speex],[${real_speex_tree}/libspeex/.libs/libspeex.a])
VLC_ADD_CFLAGS([speex],[-I${real_speex_tree}/include])
else
dnl The given speex wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_speex_tree}/libspeex/.libs/libspeex.a, make sure you compiled speex in ${with_speex_tree}])
fi
else
AC_CHECK_HEADERS(speex/speex.h, [
LDFLAGS="${LDFLAGS_save} ${LIBS_speex}"
AC_CHECK_LIB(speex, speex_decode_int, [
VLC_ADD_LIBS([speex],[-lspeex]) ],
[ AC_MSG_RESULT([no])
AC_MSG_WARN([Your libspeex is too old, please get the development
version.]) ],[])
LDFLAGS="${LDFLAGS_save}"
],[])
fi
dnl
dnl tarkin decoder plugin
dnl
AC_ARG_ENABLE(tarkin,
[ --enable-tarkin experimental tarkin codec (default disabled)])
then
AC_ARG_WITH(tarkin-tree,
[ --with-tarkin-tree=PATH tarkin tree for static linking])
then
AC_MSG_CHECKING(for tarkin.o in ${with_tarkin_tree})
real_tarkin_tree="`cd ${with_tarkin_tree} 2>/dev/null && pwd`"
if test -f "${real_tarkin_tree}/tarkin.o"
then
VLC_ADD_CPPFLAGS([tarkin],[-I${real_tarkin_tree}])
VLC_ADD_LIBS([tarkin],[${real_tarkin_tree}/mem.o ${real_tarkin_tree}/pnm.o ${real_tarkin_tree}/wavelet.o ${real_tarkin_tree}/wavelet_xform.o ${real_tarkin_tree}/wavelet_coeff.o ${real_tarkin_tree}/yuv.o ${real_tarkin_tree}/tarkin.o ${real_tarkin_tree}/info.o -logg])
else
dnl The given tarkin tree wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_tarkin_tree}/tarkin.o,
make sure you compiled tarkin in ${with_tarkin_tree}])
fi
fi
fi
dnl
dnl theora decoder plugin
dnl
AC_ARG_ENABLE(theora,
[ --enable-theora experimental theora codec (default disabled)])
AC_CHECK_LIB(theora, theora_granule_time, [
VLC_ADD_LIBS([theora],[${theora_libs}]) ],[
AC_MSG_ERROR([libtheora doesn't appear to be installed on your system.
You also need to check that you have a libogg posterior to the 1.0 release.])],
[-logg])
])
fi
dnl
dnl dirac decoder plugin
dnl
AC_ARG_ENABLE(dirac,
[ --enable-dirac experimental dirac codec (default disabled)])
if test "${enable_dirac}" = "yes"; then
PKG_CHECK_MODULES(DIRAC,[dirac >= 0.10.0], [
VLC_ADD_LIBS([dirac],[$DIRAC_LIBS -lstdc++]) ],[
AC_MSG_ERROR([libdirac >= 0.10.0 doesn't appear to be installed on your system.])
])
fi
dnl
dnl schroedinger decoder plugin (for dirac format video)
dnl
AC_ARG_ENABLE(schroedinger,
[ --disable-schroedinger high performance dirac codec (default enabled)])
if test "${enable_schroedinger}" != "no"; then
PKG_CHECK_MODULES(SCHROEDINGER,[schroedinger-1.0 >= 1.0.6], [
VLC_ADD_PLUGIN([schroedinger])
VLC_ADD_CFLAGS([schroedinger],[$SCHROEDINGER_CFLAGS])
VLC_ADD_LIBS([schroedinger],[$SCHROEDINGER_LIBS]) ], [
AS_IF([test "x${enable_schroedinger}" != "x"], [
AC_MSG_ERROR([${SCHROEDINGER_PKG_ERRORS}])
])
])
fi
dnl
dnl PNG decoder module
dnl
AC_ARG_ENABLE(png,
[ --enable-png PNG support (default enabled)])
if test "${enable_png}" != "no"; then
AC_CHECK_HEADERS(png.h, [
LDFLAGS="${LDFLAGS_save} -lz"
AC_CHECK_LIB(png, png_set_rows, [
VLC_ADD_LIBS([png],[-lpng -lz])
VLC_ADD_PLUGIN([png])
VLC_ADD_PLUGIN([osdmenu])
VLC_ADD_PLUGIN([osd_parser])
AC_DEFINE(HAVE_LIBPNG, 1, [Define if you have the PNG library: libpng])],

Jean-Paul Saman
committed
LDFLAGS="${LDFLAGS_save}"

Jean-Paul Saman
committed
AM_CONDITIONAL(BUILD_OSDMENU, [test "${enable_png}" != "no"])
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 doesn't 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}])
VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
fi
],[
AC_MSG_ERROR([the specified tree hasn't been compiled])
])
LDFLAGS="${LDFLAGS_save}"
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([the specified tree doesn't have x264.h])
fi
else
VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
AC_CACHE_CHECK([if linker supports -Bsymbolic],
[ac_cv_ld_bsymbolic],
[LDFLAGS="${LDFLAGS_vlc} -Wl,-Bsymbolic"
AC_TRY_LINK([],,ac_cv_ld_bsymbolic=yes,ac_cv_ld_bsymbolic=no)
LDFLAGS="${LDFLAGS_save}"
])
AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
VLC_ADD_LDFLAGS([x264],[-Wl,-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([Could not find libx264 on your system: you may get it from http://www.videolan.org/x264.html])
fi
])
LDFLAGS="${LDFLAGS_save}"
fi
fi
dnl
dnl libfluidsynth (MIDI synthetizer) plugin
dnl
AC_ARG_ENABLE(fluidsynth,
[ --enable-fluidsynth MIDI synthesisr with libfluidsynth (default enabled)])
AS_IF([test "x${enable_fluidsynth}" != "xno"], [
PKG_CHECK_MODULES(FLUIDSYNTH, fluidsynth, [
VLC_ADD_CFLAGS(fluidsynth, [${FLUIDSYNTH_CFLAGS}])
VLC_ADD_LIBS(fluidsynth, [${FLUIDSYNTH_LIBS}])
], [
AS_IF([test "x${enable_fluidsynth}" != "x"], [
AC_MSG_ERROR([${FLUIDSYNTH_PKG_ERRORS}])
])
])
])

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.25,
[
VLC_ADD_LIBS([zvbi],[$ZVBI_LIBS])
Christophe Mutricy
committed
VLC_ADD_CFLAGS([zvbi],[$ZVBI_CFLAGS])
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 uncompatibles.
Using zvbi.])
])
Christophe Mutricy
committed
],[
AC_MSG_WARN(ZVBI library not found. Enabling the telx module instead)
])
AS_IF( [test "${enable_telx}" != "no" ],[
Christophe Mutricy
committed
])

Jean-Paul Saman
committed
dnl
dnl asa/csri subtitle rendering module
dnl
AC_ARG_ENABLE(csri,
[ --enable-csri Subtitle support using CSRI / asa (default disabled)])
PKG_CHECK_MODULES(CSRI,
csri >= 0.1.0,
[
VLC_ADD_LDFLAGS([csri],[$CSRI_LIBS])
VLC_ADD_CFLAGS([csri],[$CSRI_CFLAGS])
],[
AC_MSG_WARN([CSRI helper library not found])
])
])
dnl
dnl libass subtitle rendering module
dnl
AC_ARG_ENABLE(libass,
[ --enable-libass Subtitle support using libass (default disabled)])
PKG_CHECK_MODULES(LIBASS, libass >= 0.9.5,
[
VLC_ADD_LDFLAGS([libass],[$LIBASS_LIBS])
VLC_ADD_CFLAGS([libass],[$LIBASS_CFLAGS])
VLC_ADD_PLUGIN([libass])
AC_CHECK_HEADERS(fontconfig/fontconfig.h,
[VLC_ADD_CPPFLAGS([libass],[-DHAVE_FONTCONFIG])
if test "${SYS}" = "mingw32"; then
VLC_ADD_LIBS([libass],[-lfontconfig -lfreetype -liconv -lz -lxml2])
else
VLC_ADD_LIBS([libass],[-lfontconfig])
],[
AC_MSG_WARN([LIBASS library not found])
])
])
dnl
dnl asa demuxer
dnl
AC_ARG_ENABLE(asademux,
[ --enable-asademux asa subtitle demuxing (default disabled)])
PKG_CHECK_MODULES(PCRE,
libpcre >= 6.5,
[
VLC_ADD_LDFLAGS([asademux],[$PCRE_LIBS])
VLC_ADD_CFLAGS([asademux],[$PCRE_CFLAGS])
if test "${SYS}" = "mingw32"; then
VLC_ADD_CPPFLAGS([asademux],[-DPCRE_STATIC])
fi
],[
AC_MSG_WARN([PCRE library not found (required for asademux)])
])
])
dnl
dnl CMML plugin
dnl
AC_ARG_ENABLE(cmml,
[ --enable-cmml CMML support (default enabled)])
if test "${enable_cmml}" != "no"
then
dnl
dnl kate decoder plugin
dnl
AC_ARG_ENABLE(kate,
[ --enable-kate kate codec (default enabled)])
AS_IF([test "${enable_kate}" != "no"], [
Vincent Penquerc'h
committed
PKG_CHECK_MODULES(KATE,[kate >= 0.1.5], [
VLC_ADD_CFLAGS([kate],[$KATE_CFLAGS])
VLC_ADD_LIBS([kate],[$KATE_LIBS]) ],[
AC_CHECK_HEADERS(kate/kate.h, [
AC_CHECK_LIB(kate, kate_decode_init, [
kate_libs="-lkate -logg"
VLC_ADD_LDFLAGS([kate],[${kate_libs}]) ],[
AS_IF([test "x${enable_kate}" != "x"], [
AC_MSG_ERROR([libkate doesn't appear to be installed on your system.
You also need to check that you have a libogg posterior to the 1.0 release.])
])
], [-lkate -logg])
AS_IF([test "x${enable_kate}" != "x"], [
AC_MSG_ERROR([libkate headers do not appear to be installed on your system.
You also need to check that you have a libogg posterior to the 1.0 release.])
dnl
dnl tiger decoder plugin
dnl
AC_ARG_ENABLE(tiger,
[ --enable-tiger Tiger rendering library for Kate streams (default enabled)])
AS_IF([test "${enable_tiger}" != "no"], [
PKG_CHECK_MODULES(TIGER,[tiger >= 0.3.1], [
AC_DEFINE(HAVE_TIGER, 1, [Define if libtiger is available.])
VLC_ADD_CFLAGS([kate],[$TIGER_CFLAGS])
VLC_ADD_LIBS([kate],[$TIGER_LIBS]) ],[
AS_IF([test "x${enable_tiger}" != "x"], [
AC_MSG_ERROR([libtiger does not appear to be installed on your system.])
])
])
])