From caf12045fa46f35b112047b00f435979c4acee3e Mon Sep 17 00:00:00 2001 From: Vlasta Vesely Date: Thu, 16 Feb 2023 10:22:58 +0100 Subject: [PATCH] add pkg-config config file --- .gitignore | 1 + Makefile.in | 21 ++++++++++++--------- configure.ac | 5 ++++- iast.pc.in | 11 +++++++++++ 4 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 iast.pc.in diff --git a/.gitignore b/.gitignore index 3b42a82..096d100 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.d *.so *.so.* +*.pc /iast /tests/test /tests/coverage diff --git a/Makefile.in b/Makefile.in index 1f0aa95..ec7a09e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -19,13 +19,14 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ MKDIR_P = @MKDIR_P@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -libdir = @libdir@ -datarootdir = @datarootdir@ -includedir = @includedir@ -mandir = @mandir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +libdir = @libdir@ +datarootdir = @datarootdir@ +includedir = @includedir@ +pkgconfigdir = @pkgconfigdir@ +mandir = @mandir@ USE_GCOV = @USE_GCOV@ @@ -92,9 +93,10 @@ install-lib: cp -P $(REALNAME) $(SONAME) $(libdir) install-dev: - $(MKDIR_P) $(includedir)/iast $(libdir) + $(MKDIR_P) $(includedir)/iast $(libdir) $(pkgconfigdir) $(INSTALL_DATA) $(INCLUDES) $(includedir)/iast $(INSTALL_DATA) iast.h $(includedir) + $(INSTALL_DATA) $(PROGNAME).pc $(pkgconfigdir) cp -P $(ANAME) $(LINKNAME) $(libdir) uninstall: uninstall-prog uninstall-lib uninstall-dev @@ -108,10 +110,11 @@ uninstall-lib: uninstall-dev: $(RM) -r $(includedir)/iast $(includedir)/iast.h + $(RM) $(pkgconfigdir)/$(PROGNAME).pc clean: $(RM) $(PROGNAME) tests/test $(PROGNAME).1.gz - $(RM) -r $(LIBFILES) *.o */*.o */*.d *.d + $(RM) -r $(LIBFILES) *.o */*.o */*.d *.d $(PROGNAME).pc $(RM) *.gcda *.gcno tests/coverage */*.test clean-aux: diff --git a/configure.ac b/configure.ac index 8c71e03..1401bad 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,9 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_CHECK_TOOL([AR], [ar]) +PKG_PROG_PKG_CONFIG +PKG_INSTALLDIR + # Checks for libraries. PKG_CHECK_MODULES(CHECK, check) @@ -56,5 +59,5 @@ AC_SUBST(COVERAGE_CFLAGS) AC_SUBST(COVERAGE_LFLAGS) AC_SUBST(USE_GCOV) -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile iast.pc]) AC_OUTPUT diff --git a/iast.pc.in b/iast.pc.in new file mode 100644 index 0000000..5142984 --- /dev/null +++ b/iast.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libiast +URL: https://github.com/vlastavesely/sanskrit-iast +Description: Library for romanisation of texts written in Devanagari +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -liast +Cflags: