[PATCH weston 2/4] weston.pc: Add dependencies for pixman-1 and xkbcommon

Quentin Glidic sardemff7+wayland at sardemff7.net
Wed Oct 23 21:15:36 CEST 2013


From: Quentin Glidic <sardemff7+git at sardemff7.net>

Weston headers include pixman and libxkbcommon headers
Using Requires.private means that CFLAGS from pixman-1 and xkbcommon are
added to weston CFLAGS, while LIBS are added in case of static linking
only. This way, plugins does not have to use them, but will need to do
so explicitely if needed, to properly resolve symbols

Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
---
 configure.ac     | 4 ++++
 src/weston.pc.in | 1 +
 2 files changed, 5 insertions(+)

diff --git a/configure.ac b/configure.ac
index 80a5d69..2bb7c9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,6 +56,7 @@ AC_CHECK_HEADERS([execinfo.h])
 AC_CHECK_FUNCS([mkostemp strchrnul initgroups])
 
 COMPOSITOR_MODULES="wayland-server >= 1.2.91 pixman-1"
+WESTON_PC_REQUIRES_PRIVATE="pixman-1"
 
 AC_ARG_ENABLE(egl, [  --disable-egl],,
               enable_egl=yes)
@@ -76,6 +77,7 @@ AC_ARG_ENABLE(xkbcommon,
 if test x$enable_xkbcommon = xyes; then
 	AC_DEFINE(ENABLE_XKBCOMMON, [1], [Build Weston with libxkbcommon support])
 	COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon"
+	WESTON_PC_REQUIRES_PRIVATE="${WESTON_PC_REQUIRES_PRIVATE} xkbcommon"
 fi
 
 AC_ARG_ENABLE(setuid-install, [  --enable-setuid-install],,
@@ -474,6 +476,8 @@ if test x$wayland_scanner = x; then
 	AC_MSG_ERROR([wayland-scanner is needed to compile weston])
 fi
 
+AC_SUBST([WESTON_PC_REQUIRES_PRIVATE])
+
 AC_CONFIG_FILES([Makefile
 		 shared/Makefile
 		 src/Makefile
diff --git a/src/weston.pc.in b/src/weston.pc.in
index 828cb1f..5e61d3d 100644
--- a/src/weston.pc.in
+++ b/src/weston.pc.in
@@ -8,4 +8,5 @@ pkglibexecdir=${libexecdir}/@PACKAGE@
 Name: Weston Plugin API
 Description: Header files for Weston plugin development
 Version: @WESTON_VERSION@
+Requires.private: @WESTON_PC_REQUIRES_PRIVATE@
 Cflags: -I${includedir}
-- 
1.8.4.1



More information about the wayland-devel mailing list