summaryrefslogtreecommitdiffstats
path: root/m4/pkg.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/pkg.m4')
-rw-r--r--m4/pkg.m424
1 files changed, 24 insertions, 0 deletions
diff --git a/m4/pkg.m4 b/m4/pkg.m4
new file mode 100644
index 0000000..c3572bc
--- /dev/null
+++ b/m4/pkg.m4
@@ -0,0 +1,24 @@
+dnl
+dnl https://github.com/pkgconf/pkgconf/blob/master/pkg.m4#L217-L236
+dnl
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+