summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-05-25 14:28:22 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-05-25 14:28:22 (EDT)
commitb39043a76efa902db4447dd1d204cb5d0f7212a2 (patch)
treead4bf16965c3f58224de6860ae0fc82265bbcf4e
parenta7ef23dd2fc275f1ea253d9cb3bfc9eba6e849ef (diff)
configure.ac: New "pkglocalstatedir" output var
-rw-r--r--configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a9e2c78..01d7dc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,23 @@ AC_CONFIG_SRCDIR([src/prokit.sh])
AM_INIT_AUTOMAKE([gnu check-news dist-bzip2 dist-xz subdir-objects])
AM_SILENT_RULES([yes])
+if test "x${localstatedir}" = 'x${prefix}/var'; then
+ case "${prefix}" in
+ NONE | */local | */local/*)
+ pkglocalstatedir='/var/local/prokit'
+ ;;
+ /opt | /opt/*)
+ pkglocalstatedir='/var/opt/prokit'
+ ;;
+ *)
+ pkglocalstatedir='/var/lib/prokit'
+ ;;
+ esac
+else
+ pkglocalstatedir='${localstatedir}/lib/prokit'
+fi
+AC_SUBST([pkglocalstatedir])
+
AC_ARG_WITH(
[sh],
[AS_HELP_STRING([--with-sh], [POSIX-conformant shell with `local'])],