From patchwork Mon Jan 22 16:12:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clemens Gruber X-Patchwork-Id: 864300 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zQGk26gfhz9s71 for ; Tue, 23 Jan 2018 03:15:22 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751091AbeAVQPW (ORCPT ); Mon, 22 Jan 2018 11:15:22 -0500 Received: from mail.pqgruber.com ([178.189.19.235]:37229 "EHLO mail.pqgruber.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751007AbeAVQPV (ORCPT ); Mon, 22 Jan 2018 11:15:21 -0500 Received: from localhost.localdomain (213-47-169-111.cable.dynamic.surfer.at [213.47.169.111]) by mail.pqgruber.com (Postfix) with ESMTPSA id 7CB68EB4A9; Mon, 22 Jan 2018 17:15:20 +0100 (CET) From: Clemens Gruber To: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski , Clemens Gruber Subject: [PATCH] [libgpiod] Add pkg-config support Date: Mon, 22 Jan 2018 17:12:12 +0100 Message-Id: <20180122161213.3076-1-clemens.gruber@pqgruber.com> X-Mailer: git-send-email 2.16.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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}