# HG changeset patch # User Carnë Draug # Date 1473001783 -3600 # Node ID 26070f36f1e755adf4921ff5f2daae176e78256c # Parent 8c10ad441b246b4a6a72b67a90b894765c95aab6 Provide octave configuration files for pkg-config (bug #48775) * libinterp/octinterp.in.pc, liboctave/octave.in.pc: templates for the octave and libinterp .pc files. * Makefile.am, libinterp/module.mk, liboctave/module.mk, configure.ac: integrate the new .pc files in the build system. Clean by distclean since they are created by the configure script. diff -r 8c10ad441b24 -r 26070f36f1e7 Makefile.am --- a/Makefile.am Thu Aug 18 12:09:56 2016 +0100 +++ b/Makefile.am Sun Sep 04 16:09:43 2016 +0100 @@ -183,6 +183,8 @@ octinclude_HEADERS = nodist_octinclude_HEADERS = +pkgconfig_DATA = + DIST_SRC = ALL_LOCAL_TARGETS = diff -r 8c10ad441b24 -r 26070f36f1e7 configure.ac --- a/configure.ac Thu Aug 18 12:09:56 2016 +0100 +++ b/configure.ac Sun Sep 04 16:09:43 2016 +0100 @@ -188,6 +188,10 @@ ## Programs used in configuring Octave. dnl Find pkg-config executable (sets $PKG_CONFIG) PKG_PROG_PKG_CONFIG +## And where we will install our own .pc files. +PKG_INSTALLDIR +AC_SUBST([liboctave_pkgconfigdir], [$pkgconfigdir]) +AC_SUBST([libinterp_pkgconfigdir], [$pkgconfigdir]) ## Programs used in Makefiles. AC_PROG_AWK @@ -3269,7 +3273,9 @@ Makefile build-aux/check-subst-vars.sh:build-aux/check-subst-vars.in.sh doc/doxyhtml/Doxyfile - libgnu/Makefile]) + libgnu/Makefile + liboctave/octave.pc:liboctave/octave.in.pc + libinterp/octinterp.pc:libinterp/octinterp.in.pc]) dnl We use a .in.h file for oct-conf-post.h simply to copy it to the build tree dnl so that we don't have to add the -I${top_srcdir} to any CPPFLAGS variables. diff -r 8c10ad441b24 -r 26070f36f1e7 libinterp/module.mk --- a/libinterp/module.mk Thu Aug 18 12:09:56 2016 +0100 +++ b/libinterp/module.mk Sun Sep 04 16:09:43 2016 +0100 @@ -28,6 +28,8 @@ octlib_LTLIBRARIES += %reldir%/liboctinterp.la +%canon_reldir%_pkgconfig_DATA = %reldir%/octinterp.pc + BUILT_SOURCES += \ %reldir%/builtin-defun-decls.h \ %reldir%/corefcn/default-defs.h \ @@ -326,6 +328,8 @@ rm -f $(DESTDIR)$(octetcdir)/built-in-docstrings .PHONY: uninstall-built-in-docstrings +pkgconfig_DATA += $(%canon_reldir%_pkgconfig_DATA) + EXTRA_DIST += $(%canon_reldir%_EXTRA_DIST) %canon_reldir%_CLEANFILES += \ @@ -336,6 +340,9 @@ %reldir%/corefcn/oct-tex-parser.output \ %reldir%/parse-tree/oct-parse.output +%canon_reldir%_DISTCLEANFILES += \ + $(%canon_reldir%_pkgconfig_DATA) + %canon_reldir%_MAINTAINERCLEANFILES += \ %reldir%/DOCSTRINGS \ $(LIBINTERP_BUILT_DISTFILES) diff -r 8c10ad441b24 -r 26070f36f1e7 libinterp/octinterp.in.pc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libinterp/octinterp.in.pc Sun Sep 04 16:09:43 2016 +0100 @@ -0,0 +1,9 @@ +Name: @PACKAGE_NAME@ +Description: C++ interface to GNU Octave interpreter. +URL: https://www.octave.org +Version: @PACKAGE_VERSION@ +Requires: octave = @PACKAGE_VERSION@ +Requires.private: +Libs: -L@octlibdir@ @LIBOCTINTERP@ +Libs.private: +Cflags: -I@octincludedir@/.. diff -r 8c10ad441b24 -r 26070f36f1e7 liboctave/module.mk --- a/liboctave/module.mk Thu Aug 18 12:09:56 2016 +0100 +++ b/liboctave/module.mk Sun Sep 04 16:09:43 2016 +0100 @@ -23,6 +23,8 @@ octlib_LTLIBRARIES += %reldir%/liboctave.la +%canon_reldir%_pkgconfig_DATA = %reldir%/octave.pc + BUILT_INCS = \ $(BUILT_LIBOCTAVE_OPERATORS_INC) \ $(LIBOCTAVE_OPT_INC) @@ -112,12 +114,17 @@ DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) +pkgconfig_DATA += $(%canon_reldir%_pkgconfig_DATA) + EXTRA_DIST += $(%canon_reldir%_EXTRA_DIST) %canon_reldir%_CLEANFILES += \ $(LIBOCTAVE_BUILT_NODISTFILES) \ $(LIBOCTAVE_TST_FILES) +%canon_reldir%_DISTCLEANFILES += \ + $(%canon_reldir%_pkgconfig_DATA) + BUILT_NODISTFILES += $(LIBOCTAVE_BUILT_NODISTFILES) CLEANFILES += $(%canon_reldir%_CLEANFILES) diff -r 8c10ad441b24 -r 26070f36f1e7 liboctave/octave.in.pc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/liboctave/octave.in.pc Sun Sep 04 16:09:43 2016 +0100 @@ -0,0 +1,9 @@ +Name: @PACKAGE_NAME@ +Description: C++ interface to GNU Octave underlying library. +URL: https://www.octave.org +Version: @PACKAGE_VERSION@ +Requires: +Requires.private: +Libs: -L@octlibdir@ @LIBOCTAVE@ +Libs.private: @LIBOCTAVE_LINK_DEPS@ +Cflags: -I@octincludedir@/..