diff options
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | xorg-macros.m4.in | 9 | ||||
-rw-r--r-- | xorg-macros.pc.in | 14 |
4 files changed, 26 insertions, 3 deletions
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.m4.in b/xorg-macros.m4.in index 336490a..6f9635f 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -509,8 +509,11 @@ XORG_MANPAGE_SECTIONS # INSTALL from $prefix/share/doc/util-macros. # AC_DEFUN([XORG_INSTALL], [ -INSTALL_CMD="if test -f "$prefix/share/doc/util-macros/INSTALL"; then \ -cp -f "$prefix/share/doc/util-macros/INSTALL" \$(top_srcdir); \ -else echo '$prefix/share/doc/util-macros/INSTALL cannot be found.' >&2; fi " +AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +macros_docdir=$($PKG_CONFIG --print-errors --variable=docdir xorg-macros) +INSTALL_CMD="(cp -f "$macros_docdir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ +mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ +|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ +echo 'util-macros \"docdir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" AC_SUBST([INSTALL_CMD]) ]) # XORG_INSTALL 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@ + |