summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2012-10-30 16:44:24 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2012-11-02 12:17:22 +0000
commit4fc693bafa433978a87030dd30f403f4a24f8108 (patch)
treeefacee0fe97dc2af75a7a8929d74113209a51f5a
parentc07df8b07f2843b8c6bf5c32ee09a148941bf3e3 (diff)
Install a pkg-config .pc file
Install a pkg-config .pc file, along with the library and headers Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-rw-r--r--.gitignore5
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac5
-rw-r--r--xcwm.pc.in13
4 files changed, 24 insertions, 2 deletions
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@