+dnl
+dnl JPEG decoder module
+dnl
+AC_ARG_ENABLE(jpeg,
+ [ --enable-jpeg JPEG support (default enabled)])
+AS_IF([test "${enable_jpeg}" != "no"], [
+AC_CHECK_HEADERS(jpeglib.h, [
+ VLC_ADD_PLUGIN([jpeg])
+ ])
+])
+
+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
+
+dnl x265 encoder
+PKG_ENABLE_MODULES_VLC([X265],, [x265], [HEVC/H.265 encoder], [auto])
+