Hello, I remember there was a discussion about pkg-config support a few years ago. At that time I opposed to do that, because a similar library detection mechanism is also provided by libunistring.m4.
However, given the wider adoption of this library (even in non-autotools projects), I reconsider adding it. What do people think? The change itself would be trivial as attached. Regards, -- Daiki Ueno
>From e854631d5914680988c7a42a0c6a921d285b4072 Mon Sep 17 00:00:00 2001 From: Daiki Ueno <u...@gnu.org> Date: Mon, 12 Feb 2018 13:21:31 +0100 Subject: [PATCH] build: Add libunistring.pc --- ChangeLog | 8 ++++++++ Makefile.am | 4 ++++ configure.ac | 1 + libunistring.pc.in | 11 +++++++++++ 4 files changed, 24 insertions(+) create mode 100644 libunistring.pc.in diff --git a/ChangeLog b/ChangeLog index 563c6e6..87b0a4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2018-02-12 Daiki Ueno <u...@gnu.org> + + build: Add libunistring.pc + * libunistring.pc.in: New file. + * configure.ac: Generate libunistring.pc. + * Makefile.am (pkgconfigdir): New. + (pkgconfig_DATA): Install libunistring.pc. + 2018-02-02 Bruno Haible <br...@clisp.org> Update after gnulib changed. diff --git a/Makefile.am b/Makefile.am index fd39e47..3269f44 100644 --- a/Makefile.am +++ b/Makefile.am @@ -39,3 +39,7 @@ EXTRA_DIST += woe32dll/export.h # Windows support. EXTRA_DIST += INSTALL.windows build-aux/windres-options + + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libunistring.pc diff --git a/configure.ac b/configure.ac index 38fe5dd..9ccafd6 100644 --- a/configure.ac +++ b/configure.ac @@ -156,4 +156,5 @@ AC_CONFIG_FILES([lib/exported.sh]) AC_CONFIG_FILES([lib/unistring/version.h:lib/unistring/version.in.h]) AC_CONFIG_FILES([lib/unistring/woe32dll.h:lib/unistring/woe32dll.in.h]) AC_CONFIG_FILES([tests/Makefile]) +AC_CONFIG_FILES([libunistring.pc]) AC_OUTPUT diff --git a/libunistring.pc.in b/libunistring.pc.in new file mode 100644 index 0000000..e06402d --- /dev/null +++ b/libunistring.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: libunistring +Description: Library to manipulate Unicode strings +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lunistring +Libs.private: @LTLIBICONV@ -- 2.13.6