summaryrefslogtreecommitdiff
path: root/xorg-macros.m4.in
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2009-11-21 17:28:32 -0500
committerGaetan Nadon <memsize@videotron.ca>2009-11-26 14:09:18 -0500
commit1e50b971bf7273f958e11cbcf3dc07a6fab04335 (patch)
treecea1f7fa976529462d5e4f0abfe0212aa9cc6320 /xorg-macros.m4.in
parentceecddadf923ceae76c12057103ec7a409718a34 (diff)
xorg-macros.pc.in: create a meta data file for util-macros
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.
Diffstat (limited to 'xorg-macros.m4.in')
-rw-r--r--xorg-macros.m4.in9
1 files changed, 6 insertions, 3 deletions
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