blob: 8a0b3173b3834f7855dd32a760dc96e9a7fcc3bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
From ef2e7454cae8dab485ec4cbce85134a7b7bd7ecd Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Wed, 14 May 2014 14:58:27 +0400
Subject: [PATCH] improve pkgconfig module (close #37)
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
Makefile.in | 4 ++++
configure.ac | 4 +++-
json-parser.pc.in | 10 ++++++++++
3 files changed, 17 insertions(+), 1 deletion(-)
create mode 100644 json-parser.pc.in
diff --git a/Makefile.in b/Makefile.in
index 85e9e38..68e0b33 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -4,6 +4,7 @@ prefix = @prefix@
includedir = $(DESTDIR)@includedir@
libdir = $(DESTDIR)@libdir@
+datadir = $(DESTDIR)@datadir@
AR = @AR@
CC = @CC@
@@ -40,6 +41,9 @@ clean:
rm -f libjsonparser.$(SO_EXT) libjsonparser.a json.o
install-shared: libjsonparser.$(SO_EXT)
+ @echo Installing pkgconfig module: $(datadir)/pkgconfig/json-parser.pc
+ @install -d $(datadir)/pkgconfig/ || true
+ @install -m 0644 json-parser.pc $(datadir)/pkgconfig/json-parser.pc
@echo Installing shared library: $(libdir)/libjsonparser.$(SO_EXT)
@install -d $(libdir) || true
@install -m 0755 libjsonparser.$(SO_EXT) $(libdir)/$(REAL_NAME)
diff --git a/configure.ac b/configure.ac
index 8e73fc3..2111634 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,9 @@ fi
AC_SUBST(VERSION_MAJOR, $VERSION_MAJOR)
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([
+ Makefile
+ json-parser.pc])
AC_OUTPUT
diff --git a/json-parser.pc.in b/json-parser.pc.in
new file mode 100644
index 0000000..fc743c4
--- /dev/null
+++ b/json-parser.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: json-parser
+Description: Very low footprint JSON parser written in portable ANSI C
+Version: @VERSION_MAJOR@
+Libs: -L${libdir} -ljsonparser
+Cflags: -I${includedir}/json-parser
|