diff --git a/configure.ac b/configure.ac index c3f95bf9..85145cfc 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,10 @@ AC_ARG_ENABLE(xrdpvr, AS_HELP_STRING([--enable-xrdpvr], [Build xrdpvr module (default: no)]), [xrdpvr=true], [xrdpvr=false]) AM_CONDITIONAL(XRDP_XRDPVR, [test x$xrdpvr = xtrue]) +AC_ARG_ENABLE(rfxcodec, AS_HELP_STRING([--enable-rfxcodec], + [Build using librfxcodec (default: no)]), + [rfxcodec=true], [rfxcodec=false]) +AM_CONDITIONAL(XRDP_RFXCODEC, [test x$rfxcodec = xtrue]) AM_CONDITIONAL(GOT_PREFIX, test "x${prefix}" != "xNONE"]) diff --git a/xrdp/Makefile.am b/xrdp/Makefile.am index 050cde77..96ec07f3 100644 --- a/xrdp/Makefile.am +++ b/xrdp/Makefile.am @@ -15,6 +15,12 @@ EXTRA_INCLUDES += -I$(prefix)/include EXTRA_FLAGS += -L$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib endif +if XRDP_RFXCODEC +EXTRA_DEFINES += -DXRDP_RFXCODEC +EXTRA_INCLUDES += -I$(top_srcdir)/librfxcodec/include +EXTRA_LIBS += $(top_srcdir)/librfxcodec/src/librfxencode.a +endif + AM_CFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ @@ -50,7 +56,8 @@ xrdp_SOURCES = \ xrdp_LDADD = \ $(top_builddir)/common/libcommon.la \ - $(top_builddir)/libxrdp/libxrdp.la + $(top_builddir)/libxrdp/libxrdp.la \ + $(EXTRA_LIBS) xrdp_LDFLAGS = \ $(EXTRA_FLAGS) diff --git a/xrdp/xrdp_encoder.c b/xrdp/xrdp_encoder.c index 679b55fe..5ed1a5c0 100644 --- a/xrdp/xrdp_encoder.c +++ b/xrdp/xrdp_encoder.c @@ -23,6 +23,10 @@ #include "thread_calls.h" #include "fifo.h" +#ifdef XRDP_RFXCODEC +#include "rfxcodec_encode.h" +#endif + #define LLOG_LEVEL 1 #define LLOGLN(_level, _args) \ do \