[PATCH libxcwm 02/15] Install a pkg-config .pc file

Jon TURNEY jon.turney at dronecode.org.uk
Mon Nov 5 14:43:56 PST 2012


Install a pkg-config .pc file, along with the library and headers

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 .gitignore   |    5 ++++-
 Makefile.am  |    3 +++
 configure.ac |    5 ++++-
 xcwm.pc.in   |   13 +++++++++++++
 4 files changed, 24 insertions(+), 2 deletions(-)
 create mode 100644 xcwm.pc.in

diff --git a/.gitignore b/.gitignore
index 07b76b1..58df93d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,4 +56,7 @@ missing
 
 # Merge and patch files to ignore
 *.orig
-*.patch
\ No newline at end of file
+*.patch
+
+# ignore generated pkg-config files
+*.pc
diff --git a/Makefile.am b/Makefile.am
index eb84eae..fb54e06 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,8 @@
 SUBDIRS = include src man
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xcwm.pc
+
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 
 INSTALL:
diff --git a/configure.ac b/configure.ac
index 2db540d..700835a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,9 @@ AC_PROG_OBJC
 AC_PROG_INSTALL
 
 # Checks for libraries.
-PKG_CHECK_MODULES(XCB, xcb-damage xcb-composite xcb-event xcb-xtest xcb-image xcb-keysyms xcb-icccm xcb-atom xcb-ewmh)
+NEEDED="xcb-damage xcb-composite xcb-event xcb-xtest xcb-image xcb-keysyms xcb-icccm xcb-atom xcb-ewmh"
+PKG_CHECK_MODULES(XCB, $NEEDED)
+AC_SUBST(NEEDED)
 
 AC_CHECK_FUNC(dispatch_async,
               AC_DEFINE([HAVE_LIBDISPATCH], 1, [Define to 1 if you have the libdispatch (GCD) available])
@@ -39,6 +41,7 @@ AC_MSG_RESULT($XTOQ)
 AM_CONDITIONAL(XTOQ, [test "x$XTOQ" = "xyes"])
 
 AC_CONFIG_FILES([Makefile
+                 xcwm.pc
                  include/Makefile
                  man/Makefile
                  src/libxcwm/Makefile
diff --git a/xcwm.pc.in b/xcwm.pc.in
new file mode 100644
index 0000000..0fc5191
--- /dev/null
+++ b/xcwm.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: xcwm
+Description: X11 Composite Window Manager Library
+Version: @PACKAGE_VERSION@
+Requires:
+Requires.private: @NEEDED@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lxcwm
+Libs.private: @LIBS@
-- 
1.7.9



More information about the xorg-devel mailing list