From be0cd0df76d52a34412e2618879527dde4c35388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ChangZhuo=20Chen=20=28=E9=99=B3=E6=98=8C=E5=80=AC=29?= Date: Sat, 17 May 2014 11:35:45 +0800 Subject: [PATCH] Add r3.pc --- Makefile.am | 3 +++ configure.ac | 7 ++++++- r3.pc.in | 10 ++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 r3.pc.in diff --git a/Makefile.am b/Makefile.am index 35eebbf..08215d7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,3 +8,6 @@ r3_include_HEADERS = \ include/r3_str.h \ include/str_array.h \ $(NULL) + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = r3.pc diff --git a/configure.ac b/configure.ac index 9d98949..7f511e9 100644 --- a/configure.ac +++ b/configure.ac @@ -28,5 +28,10 @@ PKG_PROG_PKG_CONFIG PKG_CHECK_MODULES(DEPS, [libpcre check]) AC_SUBST(DEPS_CFLAGS) AC_SUBST(DEPS_LIBS) -AC_CONFIG_FILES(Makefile src/Makefile tests/Makefile) +AC_CONFIG_FILES([ + r3.pc + Makefile + src/Makefile + tests/Makefile +]) AC_OUTPUT diff --git a/r3.pc.in b/r3.pc.in new file mode 100644 index 0000000..1de55c9 --- /dev/null +++ b/r3.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +includedir=@includedir@/r3 +libdir=@libdir@ + +Name: r3 +Description: High-performance URL router library +Version: @PACKAGE_VERSION@ +Requires: +Libs: -L${libdir} -lr3 +CFlags: -I${includedir}