summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2018-11-18 01:22:09 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2018-11-18 01:22:09 +0100
commitd0b4597842ba1f65e5280529fca243ce5b5043fa (patch)
tree6ef508d491bf2dfc55b5b6a02fa589dd5054b7b5 /configure.ac
parentf2d8e6801e88a84b1e57da72d078d7569598a5f5 (diff)
Configure: Use standard --runstatedir option
Newer Autoconf defines --runstatedir option for setting directory for run-time variable data. Use it instead our old --with-runtimedir.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 8 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 943d3a7b..61fe8155 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,9 +54,9 @@ AC_ARG_WITH([sysconfig],
)
AC_ARG_WITH([runtimedir],
- [AS_HELP_STRING([--with-runtimedir=PATH], [path for runtime files @<:@LOCALSTATEDIR/run@:>@])],
- [runtimedir="$with_runtimedir"],
- [runtimedir="\$(localstatedir)/run"]
+ [AS_HELP_STRING([--with-runtimedir=PATH], [run-state data, obsolete variant of --runstatedir])],
+ [runstatedir="$with_runtimedir"],
+ []
)
AC_ARG_WITH([iproutedir],
@@ -82,7 +82,10 @@ exedir=.
AC_SUBST([objdir])
AC_SUBST([exedir])
AC_SUBST([srcdir])
-AC_SUBST([runtimedir])
+
+# Workaround for older Autoconfs that do not define runstatedir
+AS_IF([test -z "${runstatedir}"], [runstatedir='${localstatedir}/run'])
+AC_SUBST([runstatedir])
if test "$enable_debug" = yes ; then
@@ -90,7 +93,7 @@ if test "$enable_debug" = yes ; then
CONTROL_SOCKET="bird.ctl"
else
CONFIG_FILE="\$(sysconfdir)/bird.conf"
- CONTROL_SOCKET="$runtimedir/bird.ctl"
+ CONTROL_SOCKET="\$(runstatedir)/bird.ctl"
fi
AC_SUBST([CONFIG_FILE])
AC_SUBST([CONTROL_SOCKET])