add support for nvenc and accel_assist

This commit is contained in:
Jay Sorg
2024-05-23 02:26:40 -07:00
parent 6889a0731d
commit 6dcb8ffe79
22 changed files with 11017 additions and 1 deletions
+31
View File
@@ -179,6 +179,15 @@ AC_ARG_ENABLE(openh264, AS_HELP_STRING([--enable-openh264],
[Use Cisco OpenH264 library (default: no)]),
[], [enable_openh264=no])
AM_CONDITIONAL(XRDP_OPENH264, [test x$enable_openh264 = xyes])
AC_ARG_ENABLE(nvenc, AS_HELP_STRING([--enable-nvenc],
[Use nvenc library (default: no), env vars XRDP_NVENC_CFLAGS and
XRDP_NVENC_LIBS should be set if used]),
[], [enable_nvenc=no])
AM_CONDITIONAL(XRDP_NVENC, [test x$enable_nvenc = xyes])
AC_ARG_ENABLE(accel, AS_HELP_STRING([--enable-accel],
[Build xrdp_accel_assist (default: no, auto set if --enable-nvenc)]),
[], [enable_accel=no])
# AM_CONDITIONAL(XRDP_ACCEL, [test x$enable_accel = xyes]) later in this file
AC_ARG_ENABLE(painter, AS_HELP_STRING([--disable-painter],
[Do not use included painter library (default: no)]),
[], [enable_painter=yes])
@@ -263,6 +272,9 @@ AC_CHECK_HEADER([security/_pam_types.h],
AC_CHECK_HEADER([security/pam_constants.h],
[AC_DEFINE([HAVE_PAM_CONSTANTS_H], 1, [Using OpenPAM], [])])
# shm_open may not be in the C library
AC_SEARCH_LIBS([shm_open], [rt])
# Find imlib2
case "$with_imlib2" in
'' | no) AC_MSG_NOTICE([imlib2 will not be supported])
@@ -499,6 +511,21 @@ AS_IF( [test "x$enable_x264" = "xyes"] , [PKG_CHECK_MODULES(XRDP_X264, x264 >= 0
AS_IF( [test "x$enable_openh264" = "xyes"] , [PKG_CHECK_MODULES(XRDP_OPENH264, openh264 >= 2.0.0)] )
if test "x$enable_nvenc" = "xyes"
then
enable_accel=$enable_nvenc
if test ! -z "$XRDP_NVENC_CFLAGS"
then
AC_SUBST(XRDP_NVENC_CFLAGS, ["$XRDP_NVENC_CFLAGS"])
fi
if test ! -z "$XRDP_NVENC_LIBS"
then
AC_SUBST(XRDP_NVENC_LIBS, ["$XRDP_NVENC_LIBS"])
fi
fi
AM_CONDITIONAL(XRDP_ACCEL, [test x$enable_accel = xyes])
# checking for TurboJPEG
if test "x$enable_tjpeg" = "xyes"
then
@@ -665,6 +692,8 @@ AC_CONFIG_FILES([
xup/Makefile
third_party/Makefile
third_party/tomlc99/Makefile
xrdp_accel_assist/Makefile
])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
@@ -681,6 +710,8 @@ echo " turbo jpeg $enable_tjpeg"
echo " rfxcodec $enable_rfxcodec"
echo " x264 $enable_x264"
echo " openh264 $enable_openh264"
echo " nvenc $enable_nvenc"
echo " accel $enable_accel"
echo " painter $enable_painter"
echo " pixman $enable_pixman"
echo " fuse $enable_fuse"