+if test $with_libavcodec = "yes" ; then {
+ AC_ARG_WITH(libswscale,
+ [AS_HELP_STRING([--without-libswscale],
+ [disable support for libswscale (Default=auto)])],
+ [],
+ [with_libswscale="yes"]
+ )
+
+ if test $with_libswscale != "no" ; then {
+ PKG_CHECK_MODULES(LIBSWSCALE, [libswscale], [], [echo no; with_libswscale="no"])
+ } ; fi
+
+ if test $with_libswscale = "yes" ; then {
+ AC_DEFINE(WITH_LIBSWSCALE, [], [enable libswscale support])
+ } else {
+ AC_CHECK_LIB(avcodec, img_convert,
+ [AC_MSG_RESULT([ *** Using deprecated function img_convert.])],
+ [AC_MSG_FAILURE([Neither libswscale nor function img_convert was found.])],
+ []
+ )
+ } ; fi
+} ; fi
+AM_CONDITIONAL(WITH_LIBSWSCALE, test "x$with_libswscale" = "xyes")
+