From 185524fe386cfea6996e096d306c3fb5a4a652b0 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Sat, 16 Apr 2022 18:00:18 +0200 Subject: [PATCH] Define `$(pkgconfigdir)` using `PKG_INSTALLDIR` in configure.ac * This allows overriding the default using `--with-pkgconfigdir` passed to the configure script. FreeBSD for instance doesn't use the standard `$libdir/pkgconfig` directory. This macro has been present in pkg.m4 for over 9 years: https://gitlab.freedesktop.org/pkg-config/pkg-config/-/commit/5fc77a96b7a1114e296f968037342f060d4bc34b --- configure.ac | 1 + lib/cdt/Makefile.am | 1 - lib/cgraph/Makefile.am | 2 -- lib/circogen/Makefile.am | 2 -- lib/edgepaint/Makefile.am | 2 -- lib/expr/Makefile.am | 2 -- lib/gvc/Makefile.am | 2 -- lib/gvpr/Makefile.am | 1 - lib/pack/Makefile.am | 2 -- lib/pathplan/Makefile.am | 2 -- lib/xdot/Makefile.am | 2 -- redhat/graphviz.spec.fedora.in | 1 - 12 files changed, 1 insertion(+), 19 deletions(-) diff --git a/configure.ac b/configure.ac index df4b32bb2..92a103321 100644 --- a/configure.ac +++ b/configure.ac @@ -286,6 +286,7 @@ AC_ARG_ENABLE([man-pdfs], [enable_man_pdfs=$HAVE_PS2PDF]) AM_CONDITIONAL(ENABLE_MAN_PDFS,[test "x$enable_man_pdfs" = "xyes"]) +PKG_INSTALLDIR PKG_PROG_PKG_CONFIG AC_ARG_WITH(tclsh, diff --git a/lib/cdt/Makefile.am b/lib/cdt/Makefile.am index 656261503..ffcf2e497 100644 --- a/lib/cdt/Makefile.am +++ b/lib/cdt/Makefile.am @@ -3,7 +3,6 @@ CDT_VERSION = "5:0:0" pkgextraincludedir = $(pkgincludedir) -pkgconfigdir = $(libdir)/pkgconfig AM_CPPFLAGS = -I$(top_srcdir)/lib diff --git a/lib/cgraph/Makefile.am b/lib/cgraph/Makefile.am index 2b65491b9..e1e96e571 100644 --- a/lib/cgraph/Makefile.am +++ b/lib/cgraph/Makefile.am @@ -2,8 +2,6 @@ CGRAPH_VERSION = "6:0:0" -pkgconfigdir = $(libdir)/pkgconfig - AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/lib/cdt if WITH_WIN32 diff --git a/lib/circogen/Makefile.am b/lib/circogen/Makefile.am index ae9bea30e..ac90f8094 100644 --- a/lib/circogen/Makefile.am +++ b/lib/circogen/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -pkgconfigdir = $(libdir)/pkgconfig - AM_CPPFLAGS = \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/common \ diff --git a/lib/edgepaint/Makefile.am b/lib/edgepaint/Makefile.am index e4caa9101..cb0d4029c 100644 --- a/lib/edgepaint/Makefile.am +++ b/lib/edgepaint/Makefile.am @@ -2,8 +2,6 @@ LAB_GAMUT_VERSION = "1:0:0" -pkgconfigdir = $(libdir)/pkgconfig - AM_CPPFLAGS = \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/common \ diff --git a/lib/expr/Makefile.am b/lib/expr/Makefile.am index 4faa56e11..6f8abc6e1 100644 --- a/lib/expr/Makefile.am +++ b/lib/expr/Makefile.am @@ -2,8 +2,6 @@ EXPR_VERSION = "4:0:0" -pkgconfigdir = $(libdir)/pkgconfig - AM_CPPFLAGS = \ -I$(top_srcdir)/lib \ -I$(top_builddir)/lib \ diff --git a/lib/gvc/Makefile.am b/lib/gvc/Makefile.am index db110e3d8..23ccd4941 100644 --- a/lib/gvc/Makefile.am +++ b/lib/gvc/Makefile.am @@ -2,8 +2,6 @@ GVC_VERSION = "6:0:0" -pkgconfigdir = $(libdir)/pkgconfig - AM_CPPFLAGS = \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/common \ diff --git a/lib/gvpr/Makefile.am b/lib/gvpr/Makefile.am index 7e73a3136..759bad509 100644 --- a/lib/gvpr/Makefile.am +++ b/lib/gvpr/Makefile.am @@ -1,6 +1,5 @@ ## Process this file with automake to produce Makefile.in -pkgconfigdir = $(libdir)/pkgconfig HOSTCC ?= $(CC) GVPR_VERSION = "2:0:0" diff --git a/lib/pack/Makefile.am b/lib/pack/Makefile.am index 7082b68b8..013b26f71 100644 --- a/lib/pack/Makefile.am +++ b/lib/pack/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -#pkgconfigdir = $(libdir)/pkgconfig - AM_CPPFLAGS = \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/common \ diff --git a/lib/pathplan/Makefile.am b/lib/pathplan/Makefile.am index feb33715a..5bf3cf28b 100644 --- a/lib/pathplan/Makefile.am +++ b/lib/pathplan/Makefile.am @@ -2,8 +2,6 @@ PATHPLAN_VERSION = "4:0:0" -pkgconfigdir = $(libdir)/pkgconfig - AM_CPPFLAGS = -I$(top_srcdir)/lib if WITH_WIN32 diff --git a/lib/xdot/Makefile.am b/lib/xdot/Makefile.am index fe993b6f8..df408bc16 100644 --- a/lib/xdot/Makefile.am +++ b/lib/xdot/Makefile.am @@ -1,7 +1,5 @@ # ## Process this file with automake to produce Makefile.in -pkgconfigdir = $(libdir)/pkgconfig - XDOT_VERSION = "4:0:0" pkginclude_HEADERS = xdot.h diff --git a/redhat/graphviz.spec.fedora.in b/redhat/graphviz.spec.fedora.in index da36a1c14..9357fbedd 100644 --- a/redhat/graphviz.spec.fedora.in +++ b/redhat/graphviz.spec.fedora.in @@ -949,7 +949,6 @@ make %{?_smp_mflags} rm -rf %{buildroot} __doc make DESTDIR=%{buildroot} \ docdir=%{buildroot}%{_docdir}/%{name} \ - pkgconfigdir=%{_libdir}/pkgconfig \ install find %{buildroot} -type f -name "*.la" -exec rm -f {} ';' cp -a %{buildroot}%{_datadir}/%{name}/doc __doc -- 2.40.0