@@ -59,3 +59,6 @@
/test-suite.log
/test/*.log
/test/*.trs
+
+# pkg-config file
+numa.pc
@@ -1,5 +1,6 @@
ACLOCAL_AMFLAGS = -I m4
+CLEANFILES =
AM_CPPFLAGS = -Wall
@@ -141,3 +142,20 @@ TESTS = \
# These are known to be broken:
# test/prefered
# test/randmap
+
+SED_PROCESS = \
+ $(AM_V_GEN)$(SED) \
+ -e 's,@VERSION\@,$(VERSION),g' \
+ -e 's,@prefix\@,$(prefix),g' \
+ -e 's,@exec_prefix\@,$(exec_prefix),g' \
+ -e 's,@libdir\@,$(libdir),g' \
+ -e 's,@includedir\@,$(includedir),g' \
+ < $< > $@ || rm $@
+
+%.pc: %.pc.in Makefile
+ $(SED_PROCESS)
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = numa.pc
+EXTRA_DIST += numa.pc.in
+CLEANFILES += numa.pc
new file mode 100644
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: numa
+Description: NUMA policy library
+Version: @VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lnuma
This is needed so that other projects can add a dependency on libnuma via PKG_CHECK_MODULES([NUMA], [numa]). This enabling makes 'make install' do the right thing, and of course individual distros will need to add enabling to their associated packages (rpm, deb, etc.) so the package manager installs do the right thing. Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> --- .gitignore | 3 +++ Makefile.am | 18 ++++++++++++++++++ numa.pc.in | 10 ++++++++++ 3 files changed, 31 insertions(+) create mode 100644 numa.pc.in