summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Schmidt <philschmidt@gmx.net>2013-07-15 18:54:07 +0200
committerPhilipp Schmidt <philschmidt@gmx.net>2013-07-15 18:54:07 +0200
commit715aa6e3dfa2091f2ccc0f93fd5cfe805b74b7f1 (patch)
treefeb5d3ca6477fb0dffc34f4834b59ce0daf90c59
parenta95767784288fe61bf6aee2966b61573d84f9613 (diff)
downloadlibmtp-dbus-daemon.tar.gz
Actually commit necessary changes to configuredbus-daemon
-rw-r--r--configure.ac23
-rw-r--r--daemon/dbus_service.c21
-rw-r--r--daemon/dbus_service.h21
3 files changed, 64 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 87d7fcc..71e00bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,6 +170,26 @@ AM_CONDITIONAL(LIBUSB0_COMPILE, test x"$found_libusb0_pkg" = "xyes")
AM_CONDITIONAL(LIBOPENUSB_COMPILE, test x"$ac_cv_lib_openusb_openusb_init" = "xyes")
AC_MSG_NOTICE([*** using libusb $LIBUSB_VER ***])
+dnl **********************
+dnl *** Check for glib ***
+dnl **********************
+AC_ARG_ENABLE(glib, AS_HELP_STRING([--disable-glib],[build without glib support]))
+msg_glib=no
+
+if test "x$enable_glib" != "xno"; then
+ PKG_CHECK_EXISTS([glib-2.0 >= 2.34], msg_glib=yes)
+
+ if test "x$msg_glib" = "xyes"; then
+ PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.34 gobject-2.0 gmodule-no-export-2.0 gio-unix-2.0 gio-2.0])
+ AC_DEFINE(HAVE_GLIB, 1, [Define to 1 if glib is available])
+ fi
+fi
+AM_CONDITIONAL(BUILD_MTPD, [test "$msg_glib" = "yes"])
+
+dnl ==========================================================================
+AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
+
+
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_TIME
@@ -216,6 +236,7 @@ AX_NEED_STDINT_H([src/_stdint.h])
AC_NEED_BYTEORDER_H(src/gphoto2-endian.h)
AC_CONFIG_FILES([src/libmtp.h doc/Doxyfile Makefile doc/Makefile src/Makefile
- examples/Makefile util/Makefile libmtp.sh hotplug.sh libmtp.pc])
+ examples/Makefile util/Makefile daemon/Makefile
+ libmtp.sh hotplug.sh libmtp.pc])
AC_OUTPUT
chmod +x hotplug.sh
diff --git a/daemon/dbus_service.c b/daemon/dbus_service.c
new file mode 100644
index 0000000..a554a0c
--- /dev/null
+++ b/daemon/dbus_service.c
@@ -0,0 +1,21 @@
+/**
+ * \file dbus_service.c
+ *
+ * Copyright (C) 2013 Philipp Schmidt <philschmidt@gmx.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
diff --git a/daemon/dbus_service.h b/daemon/dbus_service.h
new file mode 100644
index 0000000..f624b87
--- /dev/null
+++ b/daemon/dbus_service.h
@@ -0,0 +1,21 @@
+/**
+ * \file dbus_service.h
+ *
+ * Copyright (C) 2013 Philipp Schmidt <philschmidt@gmx.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+