.pc files for input drivers

Peter Hutterer peter.hutterer at who-t.net
Tue Sep 30 18:06:20 PDT 2008


On Tue, Sep 30, 2008 at 10:54:51AM -0700, Donnie Berkholz wrote:
> > Anyone opposed to a follow-up patch to install the <drivername>.pc file?
> > If not, xorg-<drivername>.pc or just<drivername>.pc?
> 
> If this is going in every driver, would it make sense as part of 
> xorg-macros?  Also I'm wondering whether the sdk dir should be detected from
> xorg-server instead of having a configure flag at all.

Amended patch below. Turns out the sdk detection was already there anyway, so
this patch is shorter than the previous one. 
And makes the need for macros unnecessary, since it's only one line in
configure.ac and all drivers that matter already get the sdkdir anyway. 

>From 95a970ed66184aff5b89434e00ca8c012c54d377 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer at redhat.com>
Date: Fri, 26 Sep 2008 10:42:05 +0930
Subject: [PATCH] Install xorg-evdev.pc for clients who need evdev-properties.h

---
 .gitignore          |    1 +
 Makefile.am         |    7 +++++--
 configure.ac        |    7 ++++++-
 include/Makefile.am |    2 ++
 xorg-evdev.pc.in    |    7 +++++++
 5 files changed, 21 insertions(+), 3 deletions(-)
 create mode 100644 include/Makefile.am
 create mode 100644 xorg-evdev.pc.in

diff --git a/.gitignore b/.gitignore
index 38eebd9..78a4243 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,3 +24,4 @@ missing
 stamp-h1
 *.bz2
 *.gz
+*.pc
diff --git a/Makefile.am b/Makefile.am
index 11064e0..140aab1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,9 +19,12 @@
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 AUTOMAKE_OPTIONS = foreign
-SUBDIRS = src man
+SUBDIRS = src man include
 
-EXTRA_DIST = ChangeLog autogen.sh
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xorg-evdev.pc
+
+EXTRA_DIST = ChangeLog autogen.sh xorg-evdev.pc.in
 
 MAINTAINERCLEANFILES=ChangeLog
 
diff --git a/configure.ac b/configure.ac
index 5a29874..72e6df7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,6 +58,7 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES)
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
+AC_SUBST(sdkdir)
 
 CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src'
 AC_SUBST([CFLAGS])
@@ -70,4 +71,8 @@ AC_HEADER_STDC
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
 
-AC_OUTPUT([Makefile src/Makefile man/Makefile])
+AC_OUTPUT([Makefile
+           src/Makefile
+           man/Makefile
+           include/Makefile
+           xorg-evdev.pc])
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 0000000..58d7c39
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,2 @@
+EXTRA_DIST = evdev-properties.h
+sdk_HEADERS = evdev-properties.h
diff --git a/xorg-evdev.pc.in b/xorg-evdev.pc.in
new file mode 100644
index 0000000..f85423f
--- /dev/null
+++ b/xorg-evdev.pc.in
@@ -0,0 +1,7 @@
+prefix=@prefix@
+includedir=@includedir@
+
+Name: xorg-evdev
+Description: X.Org evdev input driver.
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
-- 
1.5.4.3





More information about the xorg mailing list