[PATCH] xorg-macros.pc.in: create a meta data file for util-macros

Gaetan Nadon memsize at videotron.ca
Sat Nov 21 14:28:32 PST 2009


This is motivated primarly by XORG_INSTALL who needs to locate
the docdir when invoked from any module that may not be installed
using same prefix (default or otherwise).

There are other potential use for this file.
---
 Makefile.am       |    5 +++++
 configure.ac      |    1 +
 xorg-macros.pc.in |   14 ++++++++++++++
 3 files changed, 20 insertions(+), 0 deletions(-)
 create mode 100644 xorg-macros.pc.in

diff --git a/Makefile.am b/Makefile.am
index 49c2d17..1e07014 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,6 +29,11 @@ dist_doc_DATA = INSTALL
 install-data-hook:
 	rm -f $(DESTDIR)$(aclocaldir)/xorgversion.m4
 
+pkgconfigdir = $(datadir)/pkgconfig
+pkgconfig_DATA = xorg-macros.pc
+
+EXTRA_DIST = xorg-macros.pc.in
+
 .PHONY: ChangeLog
 
 ChangeLog:
diff --git a/configure.ac b/configure.ac
index 8b1d450..4daec6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,5 +40,6 @@ m4_include([xorgversion.m4])
 XORG_RELEASE_VERSION
 XORG_CHANGELOG
 
+AC_CONFIG_FILES([xorg-macros.pc])
 AC_CONFIG_FILES([Makefile xorg-macros.m4:xorg-macros.m4.in:xorgversion.m4])
 AC_OUTPUT
diff --git a/xorg-macros.pc.in b/xorg-macros.pc.in
new file mode 100644
index 0000000..1144fb4
--- /dev/null
+++ b/xorg-macros.pc.in
@@ -0,0 +1,14 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+datarootdir=@datarootdir@
+datadir=@datadir@
+PACKAGE_TARNAME=@PACKAGE_TARNAME@
+# Used by XORG_INSTALL
+docdir=@docdir@
+
+Name: X.Org Macros
+Description: A set of autoconf project macros for X.Org modules
+Version: @PACKAGE_VERSION@
+
-- 
1.6.0.4


--Boundary_(ID_KhOVptx/mmbWdLrIA1kvhw)--


More information about the xorg-devel mailing list