From ba8c9b512661c919da204664288de2d774ff84d9 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Fri, 18 Dec 2009 21:31:45 +0000 Subject: [PATCH] Install a libfreefare.pc pkg-config module. --- Makefile.am | 3 +++ configure.ac | 5 ++++- libfreefare.pc.in | 12 ++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 libfreefare.pc.in diff --git a/Makefile.am b/Makefile.am index f0370b1..c201c08 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,3 +9,6 @@ lib_LTLIBRARIES = libfreefare.la libfreefare_la_SOURCES = mifare_classic.c libfreefare_la_HEADERS = mifare_classic.h libfreefare_ladir = $(includedir) + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libfreefare.pc diff --git a/configure.ac b/configure.ac index 3c9508d..fdbc096 100644 --- a/configure.ac +++ b/configure.ac @@ -27,4 +27,7 @@ AC_FUNC_REALLOC # Checks for pkg-config modules. PKG_CHECK_MODULES([LIBNFC], [libnfc], [], [AC_MSG_ERROR([libnfc is mandatory.])]) -AC_OUTPUT([Makefile]) +PKG_CONFIG_REQUIRES="libnfc" +AC_SUBST([PKG_CONFIG_REQUIRES]) + +AC_OUTPUT([Makefile libfreefare.pc]) diff --git a/libfreefare.pc.in b/libfreefare.pc.in new file mode 100644 index 0000000..749f865 --- /dev/null +++ b/libfreefare.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libfreefare +Description: MIFARE contactless tag access library +Version: @VERSION@ +URL: http://code.google.com/p/nfc-tools +Requires: @PKG_CONFIG_REQUIRES@ +Libs: -L${libdir} -lfreefare +Cflags: -I${includedir}