configure.ac 3.85 KB
Newer Older
iain's avatar
iain committed
1
AC_PREREQ(2.59)
Jussi Kukkonen's avatar
Jussi Kukkonen committed
2
AC_INIT(geoclue, 0.11.1, http://geoclue.freedesktop.org)
Keith Preston's avatar
Keith Preston committed
3

iain's avatar
iain committed
4 5 6
AC_CONFIG_SRCDIR(geoclue/gc-iface-geoclue.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([1.9 foreign])
Jussi Kukkonen's avatar
Jussi Kukkonen committed
7
GEOCLUE_VERSION=0.11.1
Keith Preston's avatar
Keith Preston committed
8 9

AC_PROG_CC
iain's avatar
iain committed
10 11
AC_ISC_POSIX

Keith Preston's avatar
Keith Preston committed
12
AC_PROG_INSTALL
iain's avatar
iain committed
13 14 15 16 17
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_GCC_TRADITIONAL
AM_PROG_LIBTOOL

18
GTK_DOC_CHECK(1.0)
19
AC_CHECK_PROGS(XSLT, xsltproc)
20

Iain Holmes's avatar
Iain Holmes committed
21 22 23 24 25 26 27 28 29 30 31 32 33
AC_ARG_ENABLE(system-bus,
	      [AC_HELP_STRING([--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, DBUS_BUS_SESSION, Use the session bus)
fi

iain's avatar
iain committed
34 35
PKG_CHECK_MODULES(GEOCLUE, [
		  glib-2.0
Iain Holmes's avatar
Iain Holmes committed
36
		  gobject-2.0
iain's avatar
iain committed
37
		  dbus-glib-1 >= 0.60
Jussi Kukkonen's avatar
Jussi Kukkonen committed
38
		  libxml-2.0
iain's avatar
iain committed
39 40 41
])
AC_SUBST(GEOCLUE_LIBS)
AC_SUBST(GEOCLUE_CFLAGS)
Keith Preston's avatar
Keith Preston committed
42

43 44 45 46 47 48
PKG_CHECK_MODULES(MASTER, [
		  gconf-2.0
])
AC_SUBST(MASTER_LIBS)
AC_SUBST(MASTER_CFLAGS)

Keith Preston's avatar
Keith Preston committed
49
AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
Iain Holmes's avatar
Iain Holmes committed
50
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
51

52 53 54 55
DBUS_SERVICES_DIR="${datadir}/dbus-1/services"
AC_SUBST(DBUS_SERVICES_DIR)
AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir for D-Bus is])

iain's avatar
iain committed
56
CFLAGS="$CFLAGS -g -Wall -Werror -Wno-format"
57

58

Jussi Kukkonen's avatar
Jussi Kukkonen committed
59 60 61 62 63 64 65 66

PKG_CHECK_MODULES(GTK, [
		  gtk+-2.0
], HAVE_GTK=yes, HAVE_GTK=no)
AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)

67 68
CONNECTIVITY="None"

69 70 71 72 73 74 75 76 77 78
PKG_CHECK_MODULES(CONIC, [
		  conic
], HAVE_CONIC=yes, HAVE_CONIC=no)
if test "x$HAVE_CONIC" = "xyes"; then
	CONNECTIVITY="Maemo LibConIC"
	CONNECTIVITY_LIBS=${CONIC_LIBS}
	CONNECTIVITY_CFLAGS=${CONIC_CFLAGS}
	AC_DEFINE(HAVE_CONIC, 1, [define if libconic is installed])
fi

79 80 81 82 83 84 85 86 87 88 89 90 91 92
PKG_CHECK_MODULES(NETWORK_MANAGER, [
		  NetworkManager
], HAVE_NETWORK_MANAGER=yes, HAVE_NETWORK_MANAGER=no)
if test "x$HAVE_NETWORK_MANAGER" = "xyes"; then
	CONNECTIVITY="Network Manager"
	CONNECTIVITY_LIBS=${NETWORK_MANAGER_LIBS}
	CONNECTIVITY_CFLAGS=${NETWORK_MANAGER_CFLAGS}
	AC_DEFINE(HAVE_NETWORK_MANAGER, 1, [define if Network Manager is installed])
fi

AC_SUBST(CONNECTIVITY_LIBS)
AC_SUBST(CONNECTIVITY_CFLAGS)


Jussi Kukkonen's avatar
Jussi Kukkonen committed
93
PROVIDER_SUBDIRS="example hostip geonames manual plazes localnet yahoo"
94

Jussi Kukkonen's avatar
Jussi Kukkonen committed
95
PKG_CHECK_MODULES(GSMLOC, [
Jussi Kukkonen's avatar
Jussi Kukkonen committed
96
		  gammu >= 1.12
Jussi Kukkonen's avatar
Jussi Kukkonen committed
97 98 99 100 101 102 103 104 105 106
], HAVE_GSMLOC=yes, HAVE_GSMLOC=no)
if test "x$HAVE_GSMLOC" = "xyes"; then
	PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS gsmloc"
else
	NO_BUILD_PROVIDERS="$NO_BUILD_PROVIDERS gsmloc"
fi
AC_SUBST(GSMLOC_LIBS)
AC_SUBST(GSMLOC_CFLAGS)


107 108 109 110 111
PKG_CHECK_MODULES(GYPSY, [
		  gypsy
], HAVE_GYPSY=yes,HAVE_GYPSY=no)
if test "x$HAVE_GYPSY" = "xyes"; then
	PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS gypsy"
Jussi Kukkonen's avatar
Jussi Kukkonen committed
112 113
else
	NO_BUILD_PROVIDERS="$NO_BUILD_PROVIDERS gypsy"
114 115 116 117
fi
AC_SUBST(GYPSY_LIBS)
AC_SUBST(GYPSY_CFLAGS)

118 119 120 121
AC_CHECK_LIB(gps, gps_open,[libgps=yes] )
if test "x$libgps" = xyes; then
	PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS gpsd"
    GPSD_LIBS="-lgps"
Jussi Kukkonen's avatar
Jussi Kukkonen committed
122 123
else
	NO_BUILD_PROVIDERS="$NO_BUILD_PROVIDERS gpsd"
124 125 126 127
fi
AC_SUBST(GPSD_LIBS)
AC_SUBST(GPSD_CFLAGS)

Iain Holmes's avatar
Iain Holmes committed
128 129
AC_SUBST(PROVIDER_SUBDIRS)

iain's avatar
iain committed
130
AC_CONFIG_FILES([
Jussi Kukkonen's avatar
Jussi Kukkonen committed
131
geoclue.pc
iain's avatar
iain committed
132
Makefile
133 134
docs/Makefile
docs/reference/Makefile
135
docs/tools/Makefile
iain's avatar
iain committed
136 137
interfaces/Makefile
geoclue/Makefile
138
example/Makefile
Jussi Kukkonen's avatar
Jussi Kukkonen committed
139
test/Makefile
Iain Holmes's avatar
Iain Holmes committed
140 141
providers/Makefile
providers/example/Makefile
142
providers/gypsy/Makefile
143
providers/gpsd/Makefile
Jussi Kukkonen's avatar
Jussi Kukkonen committed
144
providers/hostip/Makefile
145
providers/geonames/Makefile
Jussi Kukkonen's avatar
Jussi Kukkonen committed
146
providers/manual/Makefile
Jussi Kukkonen's avatar
Jussi Kukkonen committed
147
providers/plazes/Makefile
Jussi Kukkonen's avatar
Jussi Kukkonen committed
148
providers/localnet/Makefile
Jussi Kukkonen's avatar
Jussi Kukkonen committed
149
providers/yahoo/Makefile
Jussi Kukkonen's avatar
Jussi Kukkonen committed
150
providers/gsmloc/Makefile
Iain Holmes's avatar
Iain Holmes committed
151
src/Makefile
iain's avatar
iain committed
152
])
153

iain's avatar
iain committed
154
AC_OUTPUT
155 156 157 158 159 160

echo ""
echo "Geoclue ${VERSION} has been configured as follows: "
echo "---------------------------------------------------"
echo "Source code location:   ${srcdir}"
echo "Compiler:               ${CC}"
161
echo "Network connectivity:   ${CONNECTIVITY}"
Jussi Kukkonen's avatar
Jussi Kukkonen committed
162 163
echo "Providers:              ${PROVIDER_SUBDIRS}"
echo "Excluded providers:    ${NO_BUILD_PROVIDERS}"
164
echo ""