From 85ca93176d20c55ae23003020c1eb7e77ce8fb13 Mon Sep 17 00:00:00 2001 From: Mke Brady Date: Wed, 22 Apr 2015 21:07:15 +0100 Subject: [PATCH] Add --with-initscript to allow us to omit the initscript. --- Makefile.am | 3 +++ configure.ac | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/Makefile.am b/Makefile.am index eced4e63..0186d011 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,6 +38,9 @@ if USE_DNS_SD shairport_sync_SOURCES += mdns_dns_sd.c endif +if INSTALL_INITSCRIPT install-exec-hook: [ -f /etc/init.d/shairport-sync ] || cp scripts/shairport-sync /etc/init.d/ update-rc.d shairport-sync defaults 90 10 +endif + diff --git a/configure.ac b/configure.ac index a21f5c5f..2ca893b5 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,12 @@ PKG_CHECK_MODULES( [LIBCONFIG], [libconfig], [LIBS="${LIBCONFIG_LIBS} ${LIBS}" AC_DEFINE([HAVE_LIBCONFIG],[1],[Define to 1 if you have libconfig])]) + +# Check to see if we should include the initscript + +AC_ARG_WITH([initscript], +[ --with-initscript = include a startup script], ,[with_initscript=1]) +AM_CONDITIONAL([INSTALL_INITSCRIPT], [test "x$with_initscript" = "x1"]) # Look for piddir flag AC_ARG_WITH(piddir, [ --with-piddir= Specify a pathname to a directory in which to write the PID file.], [