From aeb5b481c95c6bd71e3025a7965861ab82a643b8 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Thu, 7 Jan 2010 19:28:00 +0200 Subject: [PATCH] Add pkg-config support Thanks to Sean Middleditch for contributing. --- .gitignore | 1 + Makefile.am | 3 +++ configure.ac | 1 + jansson.pc.in | 10 ++++++++++ 4 files changed, 15 insertions(+) create mode 100644 jansson.pc.in diff --git a/.gitignore b/.gitignore index a2baa14..4c4115c 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ missing *.la stamp-h1 *.pyc +*.pc diff --git a/Makefile.am b/Makefile.am index e64f397..2a69f16 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,9 @@ EXTRA_DIST = CHANGES LICENSE README.rst SUBDIRS = doc src test +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = jansson.pc + distcheck-hook: sphinx-build -b html -W \ $(distdir)/doc \ diff --git a/configure.ac b/configure.ac index 5df7d77..1bda9de 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,7 @@ AC_PROG_LIBTOOL # Checks for library functions. AC_CONFIG_FILES([ + jansson.pc Makefile doc/Makefile src/Makefile diff --git a/jansson.pc.in b/jansson.pc.in new file mode 100644 index 0000000..d9bf4da --- /dev/null +++ b/jansson.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=${prefix}/include + +Name: Jansson +Description: Library for encoding, decoding and manipulating JSON data +Version: @VERSION@ +Libs: -L${libdir} -ljansson +Cflags: -I${includedir}