From 715aa6e3dfa2091f2ccc0f93fd5cfe805b74b7f1 Mon Sep 17 00:00:00 2001 From: Philipp Schmidt Date: Mon, 15 Jul 2013 18:54:07 +0200 Subject: Actually commit necessary changes to configure --- configure.ac | 23 ++++++++++++++++++++++- daemon/dbus_service.c | 21 +++++++++++++++++++++ daemon/dbus_service.h | 21 +++++++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 daemon/dbus_service.c create mode 100644 daemon/dbus_service.h 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 + * + * 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 + * + * 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. + */ + -- cgit v1.2.1