-AC_CHECK_HEADERS(id3tag.h, [
- AC_CHECK_HEADERS(zlib.h, [
- VLC_ADD_LDFLAGS([id3tag],[-lid3tag -lz])
- VLC_ADD_PLUGINS([id3tag])]) ])
-
-dnl
-dnl ffmpeg decoder/demuxer plugin
-dnl
-dnl we try to find ffmpeg using : 1- given tree 2- ffmpeg-config, 3- pkg-config
-dnl 4- default place,
-
-AC_ARG_ENABLE(ffmpeg,
-[ --enable-ffmpeg ffmpeg codec (default enabled)])
-if test "${enable_ffmpeg}" != "no"
-then
-
-dnl Those options have to be here because the .pc can be bogus for ffmpeg previous nov 05
-
- AC_ARG_WITH(ffmpeg-mp3lame,
- [ --with-ffmpeg-mp3lame specify if ffmpeg has been compiled with mp3lame support],
- [
- if test "$with_ffmpeg_mp3lame" = "yes"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-lmp3lame])
- fi])
-
- AC_ARG_WITH(ffmpeg-faac,
- [ --with-ffmpeg-faac specify if ffmpeg has been compiled with faac support],
- [
- if test "$with_ffmpeg_faac" = "yes"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-lfaac])
- fi])
-
- AC_ARG_WITH(ffmpeg-dts,
- [ --with-ffmpeg-dts specify if ffmpeg has been compiled with dts support],
- [
- if test "$with_ffmpeg_dts" = "yes"; then
- LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
- AC_CHECK_LIB(dts_pic, dts_free,
- [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts_pic]) ],
- [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts]) ])
- LDFLAGS="${LDFLAGS_save}"
- fi])
-
- AC_ARG_WITH(ffmpeg-vorbis,
- [ --with-ffmpeg-vorbis specify if ffmpeg has been compiled with vorbis support],
- [
- if test "$with_ffmpeg_vorbis" = "yes"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-lvorbisenc -lvorbis])
- fi])
-
- AC_ARG_WITH(ffmpeg-theora,
- [ --with-ffmpeg-theora specify if ffmpeg has been compiled with theora support],
- [
- if test "$with_ffmpeg_theora" = "yes"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-ltheora])
- fi])
-
- AC_ARG_WITH(ffmpeg-ogg,
- [ --with-ffmpeg-ogg specify if ffmpeg has been compiled with ogg support],
- [
- if test "$with_ffmpeg_ogg" = "yes"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-logg])
- fi])
-
- AC_ARG_WITH(ffmpeg-zlib,
- [ --with-ffmpeg-zlib specify if ffmpeg has been compiled with zlib support],
- [
- if test "$with_ffmpeg_zlib" = "yes"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-lz])
- fi])
-
- dnl
- dnl test for --with-ffmpeg-tree
- dnl
- AC_ARG_WITH(ffmpeg-tree,
- [ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
-
- if test "${with_ffmpeg_tree}" != "no" -a -n "${with_ffmpeg_tree}"; then
- AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
- real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
- if test -z "${real_ffmpeg_tree}"; then
- dnl The given directory can't be found
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
- fi
- if ! test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then
- dnl The given libavcodec wasn't built
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
- fi
- if ! fgrep -s "pp_get_context" "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then
- if test -f "${real_ffmpeg_tree}/libavcodec/libpostproc/libpostproc.a"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavcodec/libpostproc ${real_ffmpeg_tree}/libavcodec/libpostproc/libpostproc.a])
- elif test -f "${real_ffmpeg_tree}/libpostproc/libpostproc.a"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libpostproc ${real_ffmpeg_tree}/libpostproc/libpostproc.a])
- VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}])
- else
- dnl The given libavcodec wasn't built with --enable-pp
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([cannot find libpostproc.a in ${real_ffmpeg_tree}/[libavcodec/]libpostproc/. Make sure you configured ffmpeg with --enable-pp])
- fi
- fi
- dnl Use a custom libffmpeg
- AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
-
- if fgrep -s "CONFIG_ZLIB=yes" "${real_ffmpeg_tree}/config.mak"; then
- if test "${with_ffmpeg_zlib}" != "yes"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-lz])
- fi
- fi
- if fgrep -s "CONFIG_MP3LAME=yes" "${real_ffmpeg_tree}/config.mak"; then
- if test "${with_ffmpeg_mp3lame}" != "yes"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-lmp3lame])
- fi
- fi
- if fgrep -s "CONFIG_FAAC=yes" "${real_ffmpeg_tree}/config.mak"; then
- if test "${with_ffmpeg_faac}" != "yes"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-lfaac])
- fi
- fi
- if fgrep -s "CONFIG_DTS=yes" "${real_ffmpeg_tree}/config.mak"; then
- if test "${with_ffmpeg_dts}" != "yes"; then
- LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
- AC_CHECK_LIB(dts_pic, dts_free,
- [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts_pic]) ],
- [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts]) ])
- LDFLAGS="${LDFLAGS_save}"
- fi
- fi
- if fgrep -s "CONFIG_VORBIS=yes" "${real_ffmpeg_tree}/config.mak"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-lvorbis -lvorbisenc])
- fi
- if fgrep -s "CONFIG_FAAD=yes" "${real_ffmpeg_tree}/config.mak"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-lfaad])
- fi
- if fgrep -s "CONFIG_XVID=yes" "${real_ffmpeg_tree}/config.mak"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-lxvidcore])
- fi
-
- VLC_ADD_BUILTINS([ffmpeg])
- if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes" ; then
- VLC_ADD_BUILTINS([stream_out_switcher])
- fi
-
- if test -f "${real_ffmpeg_tree}/libavutil/libavutil.a"; then
- VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavutil ${real_ffmpeg_tree}/libavutil/libavutil.a])
- VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavutil])
- fi
-
- VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavcodec ${real_ffmpeg_tree}/libavcodec/libavcodec.a])
- VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavcodec])