configure.ac: Make location of .pc overrideable

FreeBSD stores them in /usr/local/libdata/pkgconfig

This allows us to remove some local hooks in the process.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
This commit is contained in:
Ruben Kerkhof 2015-12-18 20:34:19 +00:00 committed by Jan Friesse
parent da3288217c
commit e0f01d68de

View File

@ -35,10 +35,16 @@ EXTRA_DIST = libtemplate.pc.in corosync.pc.in
LIBS = cfg cpg quorum \
totem_pg votequorum sam cmap corosync_common
pkgconfigdir = $(libdir)/pkgconfig
target_LIBS = $(LIBS:%=lib%.pc)
target_PACKAGE = corosync.pc
pkgconfig_DATA = $(target_LIBS) $(target_PACKAGE)
CLEANFILES = $(pkgconfig_DATA)
lib%.pc: libtemplate.pc.in Makefile
rm -f $@-t $@
sed \
@ -60,15 +66,3 @@ lib%.pc: libtemplate.pc.in Makefile
chmod a-w $@-t
mv $@-t $@
all-local: $(target_LIBS) $(target_PACKAGE)
install-exec-local: $(target_LIBS) $(target_PACKAGE)
$(INSTALL) -d $(DESTDIR)/$(libdir)/pkgconfig
$(INSTALL) -m 644 $(target_LIBS) $(target_PACKAGE) $(DESTDIR)/$(libdir)/pkgconfig
uninstall-local:
cd $(DESTDIR)/$(libdir)/pkgconfig && rm -f $(target_LIBS) $(target_PACKAGE)
rmdir $(DESTDIR)/$(libdir)/pkgconfig 2> /dev/null || :
clean-local:
rm -f *.pc