From 4690ed9ee897a63b7ed19dd92ab6f48758144314 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 26 May 2020 20:05:52 -0400 Subject: [PATCH] configure.ac,src/libadacl.pc.in: new pkg-config file. We ship a library, so we might as well be nice and provide a pkg-config file for the people who want to detect us. --- configure.ac | 6 +++++- src/Makefile.am | 2 ++ src/libadacl.pc.in | 10 ++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/libadacl.pc.in diff --git a/configure.ac b/configure.ac index 0200882..3213494 100644 --- a/configure.ac +++ b/configure.ac @@ -3,13 +3,17 @@ AC_INIT([apply-default-acl], [0.4.2], [michael@orlitzky.com]) # Store build artifacts in this directory to keep the house clean. AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz tar-ustar]) -AC_CONFIG_FILES([Makefile src/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile src/libadacl.pc]) AC_CONFIG_SRCDIR([src/apply-default-acl.c]) AC_CONFIG_MACRO_DIRS([m4]) # Not used, but keeps the build log clean. AC_CONFIG_HEADERS([config.h]) +# Adds --with-pkgconfigdir to the ./configure script and defines +# the @pkgconfigdir@ variable to be used elsewhere. +PKG_INSTALLDIR + # Checks for programs. AC_PROG_CC AM_PROG_AR diff --git a/src/Makefile.am b/src/Makefile.am index 635492f..75a25e1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,3 +10,5 @@ libadacl_la_LDFLAGS = -version-info 3:0:0 bin_PROGRAMS = apply-default-acl apply_default_acl_LDADD = libadacl.la + +pkgconfig_DATA = libadacl.pc diff --git a/src/libadacl.pc.in b/src/libadacl.pc.in new file mode 100644 index 0000000..975912f --- /dev/null +++ b/src/libadacl.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libadacl +Description: The library implementing the @PACKAGE_NAME@ algorithm +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -ladacl +Cflags: -I${includedir} -- 2.43.2