.pc files for input drivers

Peter Hutterer peter.hutterer at who-t.net
Mon Sep 29 21:46:03 PDT 2008


Just to get a general opinion: with each driver having their own properties,
it's a good idea to let the driver install a .h file listing all property
names. see synaptics-properties.h, evdev-properties.h and probably more to
come.

Anyone opposed to a follow-up patch to install the <drivername>.pc file?
If not, xorg-<drivername>.pc or just<drivername>.pc?

Cheers,
  Peter

>From 0351d0aad80b6400381b8e32a73228987fb38ab9 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] Add evdev.pc for compiler flags if compiling with evdev-properties.h included.

---
 Makefile.am  |    7 +++++--
 configure.ac |   13 ++++++++++++-
 evdev.pc.in  |    7 +++++++
 3 files changed, 24 insertions(+), 3 deletions(-)
 create mode 100644 evdev.pc.in

diff --git a/Makefile.am b/Makefile.am
index 11064e0..7c85f00 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 = evdev.pc
+
+EXTRA_DIST = ChangeLog autogen.sh evdev.pc.in
 
 MAINTAINERCLEANFILES=ChangeLog
 
diff --git a/configure.ac b/configure.ac
index 5a29874..c048059 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,6 +52,13 @@ AC_ARG_WITH(xorg-module-dir,
 inputdir=${moduledir}/input
 AC_SUBST(inputdir)
 
+AC_ARG_WITH(xorg-sdk-dir,
+            AC_HELP_STRING([--with-xorg-sdk-dir=DIR],
+                           [Default xorg SDK directory [[default=$includedir/xorg]]]),
+            [includedir="$withval"],
+            [includedir="$includedir/xorg"])
+AC_SUBST([includedir])
+
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
 
@@ -70,4 +77,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
+           evdev.pc])
diff --git a/evdev.pc.in b/evdev.pc.in
new file mode 100644
index 0000000..a8de102
--- /dev/null
+++ b/evdev.pc.in
@@ -0,0 +1,7 @@
+prefix=@prefix@
+includedir=@includedir@
+
+Name: evdev
+Description: X.Org evdev input driver.
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
-- 
1.5.4.3





More information about the xorg mailing list