Commit 23b38031 authored by Keith Preston's avatar Keith Preston

Added enable system bus and gpsd as optional

Note that system bus needs to be set on a gconf key also
parent dc5b00ca
SUBDIRS = map_yahoo \
position_manual \
geocode_yahoo \
position_hostip \
position_gpsd \
position_plazes
SUBDIRS = @BACKEND_SUBDIRS@
EXTRA_DIST=geoclue_position_error.h \
geoclue_position_error.c
......@@ -26,6 +26,7 @@
#include <glib.h>
#include <stdio.h>
#include <string.h>
#include <config.h>
#define GEOCLUE_GEOCODE_DBUS_SERVICE "org.freedesktop.geoclue.geocode.yahoo"
#define GEOCLUE_GEOCODE_DBUS_PATH "/org/freedesktop/geoclue/geocode/yahoo"
#define GEOCLUE_GEOCODE_DBUS_INTERFACE "org.freedesktop.geoclue.geocode"
......
......@@ -26,6 +26,8 @@
#include <glib.h>
#include <stdio.h>
#include <string.h>
#include <config.h>
#define GEOCLUE_MAP_DBUS_SERVICE "org.freedesktop.geoclue.map.yahoo"
#define GEOCLUE_MAP_DBUS_PATH "/org/freedesktop/geoclue/map/yahoo"
#define GEOCLUE_MAP_DBUS_INTERFACE "org.freedesktop.geoclue.map"
......
......@@ -33,6 +33,12 @@ AC_ARG_ENABLE(panel-applet,
[Compile the panel applet])],
[enable_panel_applet=yes],
[enable_panel_applet=no])
AC_ARG_ENABLE(gpsd,
[AC_HELP_STRING([--enable-gpsd],
[Compile the gpsd backend])],
[enable_gpsd=yes],
[enable_gpsd=no])
......@@ -41,11 +47,13 @@ AC_ARG_ENABLE(system-bus,
[Use the system bus instead of session bus])],
enable_system_bus="$enableval",
enable_system_bus=no)
AM_CONDITIONAL(USE_SYSTEM_BUS, test x$enable_system_bus = xyes)
if test x$enable_system_bus = xyes; then
AC_DEFINE(GEOCLUE_DBUS_BUS, DBUS_BUS_SYSTEM, Use the system bus)
else
AC_DEFINE(GEOCLUE_DBUS_BUS, GEOCLUE_DBUS_BUS, Use the session bus)
AC_DEFINE(GEOCLUE_DBUS_BUS, DBUS_BUS_SESSION, Use the session bus)
fi
DBUS_SYSTEM_POLICY_DIR=`pkg-config dbus-1 --variable=sysconfdir`/dbus-1/system.d
......@@ -67,6 +75,9 @@ then
if test "x$enable_gpsd" = "xyes"
then
dnl Check for GPSD headers
AC_CHECK_HEADERS([gps.h], [ac_cv_gps_h=yes])
......@@ -82,6 +93,16 @@ dnl check for libgpsbt and libgpsmgr
AC_CHECK_LIB(gpsmgr, gpsmgr_is_gpsd_running)
AC_CHECK_LIB(gpsbt, gpsbt_start)
BACKEND_SUBDIRS="position_gpsd"
AC_OUTPUT(
backend/position_gpsd/Makefile
)
fi #gpds
dnl check for libconic
PKG_CHECK_MODULES(CONIC, conic, [have_libconic=yes], [have_libconic=no])
AC_SUBST(CONIC_CFLAGS)
......@@ -118,7 +139,7 @@ AC_SUBST(YAHOO_LIBS)
dnl substitute subdirs into makefiles
EXTRA_SUBDIRS="${EXTRA_SUBDIRS} backend"
BACKEND_SUBDIRS="${BACKEND_SUBDIRS} map_yahoo geocode_yahoo position_manual position_hostip position_plazes"
......@@ -129,14 +150,15 @@ AC_OUTPUT(
backend/position_manual/Makefile
backend/position_hostip/Makefile
backend/position_plazes/Makefile
backend/position_gpsd/Makefile
)
EXTRA_SUBDIRS="${EXTRA_SUBDIRS} backend"
fi
dnl substitute subdirs into makefiles
AC_SUBST(EXTRA_SUBDIRS)
AC_SUBST(BACKEND_SUBDIRS)
AC_OUTPUT(Makefile
geoclue/Makefile
......
......@@ -20,7 +20,7 @@
#define __ORG_FREEDESKTOP_GEOCLUE_FIND_GEOCLUE_FIND_H__
#include <dbus/dbus-glib.h>
#include <config.h>
G_BEGIN_DECLS
......
......@@ -24,6 +24,7 @@
#include <geoclue/geocode.h>
#include <geoclue/map.h>
#include <geoclue/find.h>
#include <config.h>
/** \mainpage
*
......@@ -49,6 +50,11 @@
**/
DBusBusType
geoclue_get_dbus_bus_type ()
{
return GEOCLUE_DBUS_BUS;
}
......
......@@ -23,6 +23,7 @@
#include <dbus/dbus-glib.h>
#include <config.h>
#include <glib.h>
#include <stdio.h>
#include <string.h>
......
......@@ -20,7 +20,7 @@
#define __ORG_FREEDESKTOP_GEOCLUE_GEOCODE_GEOCLUE_GEOCODE_H__
#include <dbus/dbus-glib.h>
#include <config.h>
G_BEGIN_DECLS
......
......@@ -20,7 +20,7 @@
#define __ORG_FREEDESKTOP_GEOCLUE_GEOCLUE_MAP_H__
#include <dbus/dbus-glib.h>
#include <config.h>
G_BEGIN_DECLS
......
......@@ -20,7 +20,7 @@
#define __ORG_FREEDESKTOP_GEOCLUE_POSITION_GEOCLUE_POSITION_H__
#include <dbus/dbus-glib.h>
#include <config.h>
/** \page Position
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment