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.
This commit is contained in:
parent
f2d8e6801e
commit
d0b4597842
2 changed files with 10 additions and 6 deletions
|
@ -33,6 +33,7 @@ bindir=@bindir@
|
||||||
sbindir=@sbindir@
|
sbindir=@sbindir@
|
||||||
sysconfdir=@sysconfdir@
|
sysconfdir=@sysconfdir@
|
||||||
localstatedir=@localstatedir@
|
localstatedir=@localstatedir@
|
||||||
|
runstatedir=@runstatedir@
|
||||||
docdir=@prefix@/doc
|
docdir=@prefix@/doc
|
||||||
|
|
||||||
srcdir := @srcdir@
|
srcdir := @srcdir@
|
||||||
|
@ -183,7 +184,7 @@ cscope:
|
||||||
# Install
|
# Install
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
$(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/@runtimedir@
|
$(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/$(runstatedir)
|
||||||
for BIN in bird @CLIENT@ ; do \
|
for BIN in bird @CLIENT@ ; do \
|
||||||
$(INSTALL_PROGRAM) $(exedir)/$$BIN $(DESTDIR)/$(sbindir)/$$BIN ; \
|
$(INSTALL_PROGRAM) $(exedir)/$$BIN $(DESTDIR)/$(sbindir)/$$BIN ; \
|
||||||
done
|
done
|
||||||
|
|
13
configure.ac
13
configure.ac
|
@ -54,9 +54,9 @@ AC_ARG_WITH([sysconfig],
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_WITH([runtimedir],
|
AC_ARG_WITH([runtimedir],
|
||||||
[AS_HELP_STRING([--with-runtimedir=PATH], [path for runtime files @<:@LOCALSTATEDIR/run@:>@])],
|
[AS_HELP_STRING([--with-runtimedir=PATH], [run-state data, obsolete variant of --runstatedir])],
|
||||||
[runtimedir="$with_runtimedir"],
|
[runstatedir="$with_runtimedir"],
|
||||||
[runtimedir="\$(localstatedir)/run"]
|
[]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_WITH([iproutedir],
|
AC_ARG_WITH([iproutedir],
|
||||||
|
@ -82,7 +82,10 @@ exedir=.
|
||||||
AC_SUBST([objdir])
|
AC_SUBST([objdir])
|
||||||
AC_SUBST([exedir])
|
AC_SUBST([exedir])
|
||||||
AC_SUBST([srcdir])
|
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
|
if test "$enable_debug" = yes ; then
|
||||||
|
@ -90,7 +93,7 @@ if test "$enable_debug" = yes ; then
|
||||||
CONTROL_SOCKET="bird.ctl"
|
CONTROL_SOCKET="bird.ctl"
|
||||||
else
|
else
|
||||||
CONFIG_FILE="\$(sysconfdir)/bird.conf"
|
CONFIG_FILE="\$(sysconfdir)/bird.conf"
|
||||||
CONTROL_SOCKET="$runtimedir/bird.ctl"
|
CONTROL_SOCKET="\$(runstatedir)/bird.ctl"
|
||||||
fi
|
fi
|
||||||
AC_SUBST([CONFIG_FILE])
|
AC_SUBST([CONFIG_FILE])
|
||||||
AC_SUBST([CONTROL_SOCKET])
|
AC_SUBST([CONTROL_SOCKET])
|
||||||
|
|
Loading…
Reference in a new issue