From: Jan Safranek Date: Mon, 31 May 2010 15:15:15 +0000 (+0200) Subject: Make the installation of init scripts optional X-Git-Tag: v0.36.2~2^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3336a615daf966f7a7d9795b62cd42efb3528901;p=thirdparty%2Flibcgroup.git Make the installation of init scripts optional Some distros do not like 'make install' to install also initscripts. So let's make it configurable with --enable-initscripts-install. The default behavior is not to install them - they probably work only on Fedora. Signed-off-by: Jan Safranek Signed-off-by: Dhaval Giani --- diff --git a/configure.in b/configure.in index 4fae065a..eda61328 100644 --- a/configure.in +++ b/configure.in @@ -79,6 +79,19 @@ AC_ARG_ENABLE([daemon], [with_daemon=true]) AM_CONDITIONAL([WITH_DAEMON], [test x$with_daemon = xtrue]) +AC_ARG_ENABLE([initscript-install], + [AC_HELP_STRING([--enable-initscript-install], + [install init scripts [default=no]])], + [ + if test "x$enableval" = xno; then + with_initscript_install=false + else + with_initscript_install=true + fi + ], + [with_initscript_install=false]) +AM_CONDITIONAL([WITH_INITSCRIPT_INSTALL], [test x$with_initscript_install = xtrue]) + socket_path="/var/run/cgred.socket" AC_ARG_ENABLE([cgred-socket], [AC_HELP_STRING([--enable-cgred-socket=PATH], diff --git a/dist/libcgroup.spec.in b/dist/libcgroup.spec.in index 99cc885b..04b74909 100644 --- a/dist/libcgroup.spec.in +++ b/dist/libcgroup.spec.in @@ -44,7 +44,7 @@ provide scripts to manage that configuration. %setup -q %build -%configure --bindir=/bin --sbindir=/sbin --libdir=%{_libdir} +%configure --bindir=/bin --sbindir=/sbin --libdir=%{_libdir} --enable-initscript-install make %{?_smp_mflags} diff --git a/scripts/Makefile.am b/scripts/Makefile.am index c6fbcdaf..c78272cc 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,5 +1,6 @@ EXTRA_DIST = init.d/cgconfig.in init.d/cgred.in +if WITH_INITSCRIPT_INSTALL INITSCRIPTDIR=$(DESTDIR)$(sysconfdir)/rc.d/init.d install-exec-hook: mkdir -p $(INITSCRIPTDIR) @@ -7,3 +8,4 @@ install-exec-hook: uninstall-hook: rm -f $(INITSCRIPTDIR)/cgconfig $(INITSCRIPTDIR)/cgred +endif