summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2017-07-16 12:30:52 +0100
committerColin Watson <cjwatson@debian.org>2017-07-16 12:30:52 +0100
commitbcb053284b0fcd73d28e5cc2a778acdf9636b4fe (patch)
tree7e029ffbaa90711652d58fbadeefbb91bb4e2e66 /m4
parent0f75df37289508bec711763d76cc0a8f904c5fc5 (diff)
Improve --with-systemdtmpfilesdir default
* m4/man-arg-systemdtmpfilesdir.m4: Get tmpfiles directory location from pkg-config. * configure.ac: Call PKG_PROG_PKG_CONFIG early to avoid problems with conditional use of PKG_* macros.
Diffstat (limited to 'm4')
-rw-r--r--m4/man-arg-systemdtmpfilesdir.m47
1 files changed, 5 insertions, 2 deletions
diff --git a/m4/man-arg-systemdtmpfilesdir.m4 b/m4/man-arg-systemdtmpfilesdir.m4
index e3985f66..ff74a261 100644
--- a/m4/man-arg-systemdtmpfilesdir.m4
+++ b/m4/man-arg-systemdtmpfilesdir.m4
@@ -1,4 +1,4 @@
-# man-arg-systemdtmpfilesdir.m4 serial 1
+# man-arg-systemdtmpfilesdir.m4 serial 2
dnl MAN_ARG_SYSTEMDTMPFILESDIR
dnl Add a --with-systemdtmpfilesdir option.
@@ -9,6 +9,9 @@ AC_ARG_WITH([systemdtmpfilesdir],
[], [dnl
# The default is not prefix-sensitive, since systemd's prefix is not
# necessarily the same as man-db's.
- with_systemdtmpfilesdir=/usr/lib/tmpfiles.d])
+ m4_pushdef([AC_ARG_VAR])dnl No need for precious variable handling.
+ PKG_CHECK_VAR([with_systemdtmpfilesdir], [systemd], [tmpfilesdir],
+ [], [with_systemdtmpfilesdir=/usr/lib/tmpfiles.d])
+ m4_popdef([AC_ARG_VAR])])
AC_SUBST([systemdtmpfilesdir], [$with_systemdtmpfilesdir])
])