[PATCH] [libgpiod] Add pkg-config support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Create a libgpiod.pc file for pkg-config. Allows to use
PKG_CHECK_MODULES([gpiod], [libgpiod >= 1.0],,) in other
autoconf-based projects.

Signed-off-by: Clemens Gruber <clemens.gruber@xxxxxxxxxxxx>
---
 Makefile.am    |  3 +++
 configure.ac   |  3 ++-
 libgpiod.pc.in | 11 +++++++++++
 3 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 libgpiod.pc.in

diff --git a/Makefile.am b/Makefile.am
index af7aecb..dfa6d47 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,6 +11,9 @@ ACLOCAL_AMFLAGS = -I m4
 AUTOMAKE_OPTIONS = foreign
 SUBDIRS = include src
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libgpiod.pc
+
 if WITH_TESTS
 
 SUBDIRS += tests
diff --git a/configure.ac b/configure.ac
index b4bf214..bb18868 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,7 +120,8 @@ then
 	AC_MSG_NOTICE([doxygen not found - documentation cannot be generated])
 fi
 
-AC_CONFIG_FILES([Makefile
+AC_CONFIG_FILES([libgpiod.pc
+		 Makefile
 		 include/Makefile
 		 src/Makefile
 		 src/lib/Makefile
diff --git a/libgpiod.pc.in b/libgpiod.pc.in
new file mode 100644
index 0000000..48ff113
--- /dev/null
+++ b/libgpiod.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libgpiod
+Description: Library and tools for the Linux GPIO chardev
+URL: @PACKAGE_URL@
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lgpiod
+Cflags: -I${includedir}
-- 
2.16.0

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux