diff options
author | Karel Zak | 2019-05-14 15:25:07 +0200 |
---|---|---|
committer | Karel Zak | 2019-05-14 15:25:07 +0200 |
commit | fbd2d01e23c56d78b343745bc532434d5517ae5d (patch) | |
tree | 1417a5258a9346d7b94304b829f883aaf2d5c2d3 /m4 | |
parent | fdisk: initialize buffers for get_user_reply() [coverity scan] (diff) | |
download | kernel-qcow2-util-linux-fbd2d01e23c56d78b343745bc532434d5517ae5d.tar.gz kernel-qcow2-util-linux-fbd2d01e23c56d78b343745bc532434d5517ae5d.tar.xz kernel-qcow2-util-linux-fbd2d01e23c56d78b343745bc532434d5517ae5d.zip |
build-sys: add PKG_INSTALLDIR fallback
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/pkg.m4 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/m4/pkg.m4 b/m4/pkg.m4 new file mode 100644 index 000000000..c3572bc4e --- /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 + |