]> gitweb.michael.orlitzky.com - apply-default-acl.git/commitdiff
configure.ac,src/libadacl.pc.in: new pkg-config file.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 27 May 2020 00:05:52 +0000 (20:05 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 27 May 2020 00:16:39 +0000 (20:16 -0400)
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
src/Makefile.am
src/libadacl.pc.in [new file with mode: 0644]

index 020088283a9f607d9427b970ef8e843678acccaf..3213494fd73e63e53b547c81b574500f846fa4f3 100644 (file)
@@ -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
index 635492f739e5bf1efd1ec545a7f30da0dce99c68..75a25e1c4a55c259175274ca2f97a6a8b9147840 100644 (file)
@@ -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 (file)
index 0000000..975912f
--- /dev/null
@@ -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}