From b65ee580208684655ce824b01a76a06134e13cd8 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 23 Mar 2010 03:45:45 -0500 Subject: [PATCH] Provide pkg-config file This allows other packages to check for the presence, version, and installation directory of xkeyboard-config during configure. --- .gitignore | 1 + Makefile.am | 4 ++++ configure.in | 3 ++- xkeyboard-config.pc.in | 8 ++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 xkeyboard-config.pc.in diff --git a/.gitignore b/.gitignore index 7209b19c..7df03fd6 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ config.h config.h.in stamp-h1 xkeyboard-config*.tar.* +xkeyboard-config.pc xkeyboard-config.spec xkeyboard-config.prj xkeyboard-config.pws diff --git a/Makefile.am b/Makefile.am index a505587a..e98117e8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,8 +2,12 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = compat geometry keycodes keymap po rules semantics symbols types docs +pkgconfigdir = $(datadir)/pkgconfig +pkgconfig_DATA = xkeyboard-config.pc + EXTRA_DIST=config.rpath COPYING CREDITS README \ autogen.sh \ + xkeyboard-config.pc.in \ xkeyboard-config.spec \ xkeyboard-config.spec.in \ intltool-extract.in intltool-merge.in intltool-update.in diff --git a/configure.in b/configure.in index f74e9462..62a7fd00 100644 --- a/configure.in +++ b/configure.in @@ -13,7 +13,7 @@ fi AC_ARG_WITH( xkb_base, [AS_HELP_STRING([--with-xkb-base=DIR],[XKB base path @<:@DATADIR/X11/xkb@:>@])], xkb_base="$withval", - xkb_base="\$(datadir)/X11/xkb" ) + xkb_base="${datadir}/X11/xkb" ) AC_ARG_WITH( xkb_rules_symlink, [ --with-xkb-rules-symlink=NAME1(,NAME2)* create symlink(s) to "old style" rules files (xfree86 and/or xorg)], @@ -75,6 +75,7 @@ symbols/sun_vndr/Makefile symbols/xfree68_vndr/Makefile symbols/extras/Makefile types/Makefile +xkeyboard-config.pc xkeyboard-config.spec docs/Makefile ]) diff --git a/xkeyboard-config.pc.in b/xkeyboard-config.pc.in new file mode 100644 index 00000000..d44ba148 --- /dev/null +++ b/xkeyboard-config.pc.in @@ -0,0 +1,8 @@ +prefix=@prefix@ +datarootdir=@datarootdir@ +datadir=@datadir@ +xkb_base=@xkb_base@ + +Name: XKeyboardConfig +Description: X Keyboard configuration data +Version: @VERSION@