make building daemon optional

This commit is contained in:
Sergey Popov 2012-11-12 11:53:44 +04:00
parent dbab7f4f27
commit 430a17e06a
2 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
SUBDIRS = lib daemon
SUBDIRS = lib @DAEMON@
include_HEADERS = yasnd.h yasnd-gammu.h yasnd-log.h yasnd-lpt.h

View File

@ -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