- 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
- and conversion (default disabled)]))
-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
- 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.])