summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2018-12-20 13:15:53 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2018-12-20 13:15:53 +0100
commit16fb28e588842a2ae604620ff1ae43c851a1fbb5 (patch)
tree30b79d5750290fb7236ea6846fd5b67ff01d77e4
parente7e3b335bf179441f4482f7219b4862797ed66ca (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.
-rw-r--r--configure.ac14
-rw-r--r--tools/Makefile.in2
-rw-r--r--tools/Rules.in1
3 files changed, 11 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 1244843c..6c95d024 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,9 +53,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],
@@ -91,7 +91,11 @@ esac
AC_SUBST([objdir])
AC_SUBST([exedir])
AC_SUBST([srcdir_rel_mf])
-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_ipv6" = yes ; then
ip=ipv6
@@ -112,7 +116,7 @@ if test "$enable_debug" = yes ; then
CONTROL_SOCKET="bird$SUFFIX.ctl"
else
CONFIG_FILE="\$(sysconfdir)/bird$SUFFIX.conf"
- CONTROL_SOCKET="$runtimedir/bird$SUFFIX.ctl"
+ CONTROL_SOCKET="\$(runstatedir)/bird.ctl"
fi
AC_SUBST([CONFIG_FILE])
AC_SUBST([CONTROL_SOCKET])
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 01bb7a7c..38eb60e5 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -71,7 +71,7 @@ tags:
cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
install: all
- $(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/@runtimedir@
+ $(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/$(runstatedir)
$(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/bird@SUFFIX@
$(INSTALL_PROGRAM) $(exedir)/birdcl $(DESTDIR)/$(sbindir)/birdcl@SUFFIX@
if test -n "@CLIENT@" ; then \
diff --git a/tools/Rules.in b/tools/Rules.in
index f00c85d1..d177ed15 100644
--- a/tools/Rules.in
+++ b/tools/Rules.in
@@ -39,6 +39,7 @@ bindir=@bindir@
sbindir=@sbindir@
sysconfdir=@sysconfdir@
localstatedir=@localstatedir@
+runstatedir=@runstatedir@
docdir=@prefix@/doc
ifdef source