./configure --enable-maintainer-mode \
--prefix=/usr \
--mandir=/usr/share/man \
+ --localstatedir=/var \
--sysconfdir=/etc
connmand_LDADD = @HAL_LIBS@ @GDBUS_LIBS@ @GMODULE_LIBS@
+statedir = $(localstatedir)/run/connman
+
if MAINTAINER_MODE
plugindir = $(abs_top_srcdir)/plugins
else
endif
AM_CFLAGS = @GMODULE_CFLAGS@ @GDBUS_CFLAGS@ @HAL_CFLAGS@ \
- -DPLUGINDIR=\""$(plugindir)"\"
+ -DSTATEDIR=\""$(statedir)"\" -DPLUGINDIR=\""$(plugindir)"\"
INCLUDES = -I$(top_builddir)/include
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <string.h>
#include <signal.h>
+#include <sys/stat.h>
#include <gdbus.h>
DBusConnection *conn;
struct sigaction sa;
+ mkdir(STATEDIR, S_IRUSR | S_IWUSR | S_IXUSR |
+ S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
+
main_loop = g_main_loop_new(NULL, FALSE);
conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, CONNMAN_SERVICE);
g_main_loop_unref(main_loop);
+ rmdir(STATEDIR);
+
return 0;
}