summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'daemon')
-rw-r--r--daemon/Makefile.am12
-rw-r--r--daemon/main.c4
2 files changed, 12 insertions, 4 deletions
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 67758137..be4b738f 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -1,9 +1,17 @@
+if GLIB
+glib_cflags = @GLIB_CFLAGS@
+glib_ldadd = @GLIB_LIBS@
+else
+glib_cflags =
+glib_ldadd =
+endif
+
noinst_PROGRAMS = bluetoothd
bluetoothd_SOURCES = main.c
-bluetoothd_LDADD = @DBUS_LIBS@ @BLUEZ_LIBS@ \
+bluetoothd_LDADD = $(glib_ldadd) @DBUS_LIBS@ @BLUEZ_LIBS@ \
$(top_builddir)/hcid/libhciserver.a \
$(top_builddir)/sdpd/libsdpserver.a \
$(top_builddir)/common/libhelper.a
@@ -12,7 +20,7 @@ if EXPAT
bluetoothd_LDADD += -lexpat
endif
-AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@
+AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ $(glib_cflags)
INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/hcid -I$(top_srcdir)/sdpd
diff --git a/daemon/main.c b/daemon/main.c
index a534cdb0..ef8ae67a 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -108,11 +108,11 @@ int main(int argc, char *argv[])
enable_debug();
- event_loop = g_main_new(FALSE);
+ event_loop = g_main_loop_new(NULL, FALSE);
g_main_run(event_loop);
- g_main_unref(event_loop);
+ g_main_loop_unref(event_loop);
info("Exit");