- AS_IF([test "x${have_avcodec}" = "xyes"], [
- PKG_CHECK_MODULES(LIBVA, [libva libva-x11],
- [
- VLC_SAVE_FLAGS
- CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
- CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
- AC_CHECK_HEADERS(libavcodec/vaapi.h, [
- VLC_ADD_LIBS([avcodec],[$LIBVA_LIBS ${X_LIBS} ${X_PRE_LIBS} -lX11])
- VLC_ADD_CFLAGS([avcodec],[$LIBVA_CFLAGS ${X_CFLAGS}])
- AC_DEFINE(HAVE_AVCODEC_VAAPI, 1, [Define if avcodec has to be built with VAAPI support.])
- echo "VAAPI acceleration activated"
- ],[
- AS_IF([test "${enable_libva}" = "yes"],
- [AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing])],
- [AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ])])
- ])
- VLC_RESTORE_FLAGS
- ],[
- AS_IF([test "${enable_libva}" = "yes"],
- [AC_MSG_ERROR([Could not find required libva.])],
- [AC_MSG_WARN([libva not found ])])
+ PKG_CHECK_MODULES(LIBVA, [libva libva-x11], [
+ VLC_SAVE_FLAGS
+ CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
+ CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
+ AC_CHECK_HEADERS(libavcodec/vaapi.h, [
+ VLC_ADD_LIBS([avcodec],[$LIBVA_LIBS ${X_LIBS} ${X_PRE_LIBS} -lX11])
+ VLC_ADD_CFLAGS([avcodec],[$LIBVA_CFLAGS ${X_CFLAGS}])
+ AC_DEFINE(HAVE_AVCODEC_VAAPI, 1, [Define if avcodec has to be built with VAAPI support.])
+ AC_MSG_NOTICE([VAAPI acceleration activated])
+ ],[
+ AS_IF([test -n "${enable_libva}"], [
+ AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing])
+ ], [
+ AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ])