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