From 430a17e06acb1ab2a2bdfe957a70c5b4e8b91644 Mon Sep 17 00:00:00 2001 From: Sergey Popov Date: Mon, 12 Nov 2012 11:53:44 +0400 Subject: [PATCH] make building daemon optional --- Makefile.am | 2 +- configure.ac | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 4c81931..8c3cd39 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = lib daemon +SUBDIRS = lib @DAEMON@ include_HEADERS = yasnd.h yasnd-gammu.h yasnd-log.h yasnd-lpt.h diff --git a/configure.ac b/configure.ac index ce8be76..705b01b 100644 --- a/configure.ac +++ b/configure.ac @@ -30,5 +30,14 @@ AC_CHECK_FUNCS([strdup memset]) AC_FUNC_FORK AC_FUNC_MALLOC +# Checks for optional features +AC_ARG_ENABLE(daemon, [ --disable-daemon do not build daemon]) +if test "${enable_daemon}" = "no";then + DAEMON="" +else + DAEMON="daemon" +fi +AC_SUBST(DAEMON) + AC_CONFIG_FILES([Makefile lib/Makefile daemon/Makefile]) AC_OUTPUT