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}