From e65aa594e8e76b8ecb9f31b7204d5fc96818425a Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 11 Dec 2016 23:09:15 -0800 Subject: [PATCH] Make librfxcodec a subpackage Since libpainter is going to become a subpackage, we can make librfxcodec a subpackage as well. With this change, librfxcodec is configured, built and linked to xrdp automatically if enabled by "--enable-rfxcodec" librfxcodec is packaged by "make dist" regardless of "--enable-rfxcodec" librfxcodec/confgure is run unconditionally, it's needed for "make dist" to work. But librfxcodec is only compiled if enabled. --- Makefile.am | 7 +++++++ configure.ac | 2 ++ xrdp/Makefile.am | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index c50ea295..8b7580bd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,6 +16,12 @@ else XRDPVRDIR = endif +if XRDP_RFXCODEC +RFXCODECDIR = librfxcodec +else +RFXCODECDIR = +endif + SUBDIRS = \ common \ vnc \ @@ -24,6 +30,7 @@ SUBDIRS = \ mc \ $(NEUTRINORDPDIR) \ libxrdp \ + $(RFXCODECDIR) \ xrdp \ sesman \ keygen \ diff --git a/configure.ac b/configure.ac index d8387114..40ed06d1 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,8 @@ AC_C_CONST AC_PROG_LIBTOOL PKG_PROG_PKG_CONFIG +AC_CONFIG_SUBDIRS([librfxcodec]) + # Use silent rules by default if supported by Automake m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) diff --git a/xrdp/Makefile.am b/xrdp/Makefile.am index 400a4285..0f2e6f65 100644 --- a/xrdp/Makefile.am +++ b/xrdp/Makefile.am @@ -19,7 +19,7 @@ endif if XRDP_RFXCODEC AM_CPPFLAGS += -DXRDP_RFXCODEC AM_CPPFLAGS += -I$(top_srcdir)/librfxcodec/include -XRDP_EXTRA_LIBS += $(top_srcdir)/librfxcodec/src/.libs/librfxencode.a +XRDP_EXTRA_LIBS += $(top_builddir)/librfxcodec/src/.libs/librfxencode.a endif if XRDP_PIXMAN