summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-01-23 07:18:07 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-01-23 07:18:07 +0000
commit77a277e66743cd5f55cec8e4b5e61874bb6ab5b0 (patch)
tree03d21dfaf0fb6ea8fffc5ff1d0fd92b2b6c02d61
parent7a0e09996a2d86045c5a2cfc847f9c49d64ae511 (diff)
Make echo and input service configurable
-rw-r--r--acinclude.m421
-rw-r--r--daemon/Makefile.am18
-rw-r--r--input/Makefile.am10
-rw-r--r--sync/Makefile.am6
4 files changed, 41 insertions, 14 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index e7aa030d..25fac86b 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -144,7 +144,9 @@ AC_DEFUN([AC_ARG_BLUEZ], [
expat_enable=${expat_found}
glib_enable=no
obex_enable=${openobex_found}
- sync_enable=${opensync_found}
+ input_enable=no
+ sync_enable=no
+ echo_enable=no
hcid_enable=yes
sdpd_enable=yes
test_enable=no
@@ -172,6 +174,9 @@ AC_DEFUN([AC_ARG_BLUEZ], [
AC_ARG_ENABLE(all, AC_HELP_STRING([--enable-all], [enable all extra options below]), [
dbus_enable=${enableval}
obex_enable=${enableval}
+ input_enable=${enableval}
+ sync_enable=${enableval}
+ echo_enable=${enableval}
hcid_enable=${enableval}
sdpd_enable=${enableval}
test_enable=${enableval}
@@ -201,10 +206,18 @@ AC_DEFUN([AC_ARG_BLUEZ], [
obex_enable=${enableval}
])
- AC_ARG_ENABLE(sync, AC_HELP_STRING([--enable-sync], [enable SYNC support]), [
+ AC_ARG_ENABLE(input, AC_HELP_STRING([--enable-input], [enable input service]), [
+ input_enable=${enableval}
+ ])
+
+ AC_ARG_ENABLE(sync, AC_HELP_STRING([--enable-sync], [enable synchronization service]), [
sync_enable=${enableval}
])
+ AC_ARG_ENABLE(echo, AC_HELP_STRING([--enable-echo], [enable echo example service]), [
+ echo_enable=${enableval}
+ ])
+
AC_ARG_ENABLE(hcid, AC_HELP_STRING([--enable-hcid], [install HCI daemon]), [
hcid_enable=${enableval}
])
@@ -279,7 +292,9 @@ AC_DEFUN([AC_ARG_BLUEZ], [
AM_CONDITIONAL(INOTIFY, test "${inotify_enable}" = "yes" && test "${inotify_found}" = "yes")
AM_CONDITIONAL(OBEX, test "${obex_enable}" = "yes" && test "${openobex_found}" = "yes")
- AM_CONDITIONAL(SYNC, test "${sync_enable}" = "yes" && test "${opensync_found}" = "yes")
+ AM_CONDITIONAL(INPUTSERVICE, test "${input_enable}" = "yes")
+ AM_CONDITIONAL(SYNCSERVICE, test "${sync_enable}" = "yes" && test "${opensync_found}" = "yes")
+ AM_CONDITIONAL(ECHOSERVICE, test "${echo_enable}" = "yes")
AM_CONDITIONAL(HCID, test "${hcid_enable}" = "yes")
AM_CONDITIONAL(SDPD, test "${sdpd_enable}" = "yes")
AM_CONDITIONAL(TEST, test "${test_enable}" = "yes")
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 73f11f3d..f9474a8d 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -1,4 +1,5 @@
+if ECHOSERVICE
if CONFIGFILES
confdir = $(sysconfdir)/bluetooth
@@ -7,10 +8,17 @@ endif
servicedir = $(libdir)/bluetooth
-noinst_PROGRAMS = bluetoothd
-
service_PROGRAMS = bluetoothd-service-echo
+bluetoothd_service_echo_SOURCES = echo.c
+
+bluetoothd_service_echo_LDADD = \
+ $(top_builddir)/common/libhelper.a \
+ @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@
+endif
+
+noinst_PROGRAMS = bluetoothd
+
bluetoothd_SOURCES = main.c system.h \
manager.h manager.c database.h database.c \
adapter.h adapter.c service.h service.c
@@ -20,12 +28,6 @@ bluetoothd_LDADD = \
$(top_builddir)/sdpd/libsdpserver.a \
@GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@
-bluetoothd_service_echo_SOURCES = echo.c
-
-bluetoothd_service_echo_LDADD = \
- $(top_builddir)/common/libhelper.a \
- @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@
-
if EXPAT
bluetoothd_LDADD += -lexpat
endif
diff --git a/input/Makefile.am b/input/Makefile.am
index 7716bec6..6aa8ef1b 100644
--- a/input/Makefile.am
+++ b/input/Makefile.am
@@ -1,7 +1,14 @@
+if INPUTSERVICE
+if CONFIGFILES
+confdir = $(sysconfdir)/bluetooth
+
+conf_DATA = input.service
+endif
+
servicedir = $(libdir)/bluetooth
-noinst_PROGRAMS = bluetoothd-service-input
+service_PROGRAMS = bluetoothd-service-input
bluetoothd_service_input_SOURCES = \
main.c server.h server.c \
@@ -9,6 +16,7 @@ bluetoothd_service_input_SOURCES = \
LDADD = $(top_builddir)/common/libhelper.a \
@GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@
+endif
AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@
diff --git a/sync/Makefile.am b/sync/Makefile.am
index 2d9090d3..85de8993 100644
--- a/sync/Makefile.am
+++ b/sync/Makefile.am
@@ -1,15 +1,17 @@
-if SYNC
+if SYNCSERVICE
+servicedir = $(libdir)/bluetooth
+
noinst_PROGRAMS = bluetoothd-service-sync
bluetoothd_service_sync_SOURCES = main.c
LDADD = $(top_builddir)/common/libhelper.a \
@OPENSYNC_LIBS@ @BLUEZ_LIBS@
+endif
AM_CFLAGS = @BLUEZ_CFLAGS@ @OPENSYNC_CFLAGS@
INCLUDES = -I$(top_srcdir)/common
-endif
MAINTAINERCLEANFILES = Makefile.in