]> err.no Git - mapper/commitdiff
Small changes, check for gpsd and check base requirement in one go.
authorKaj-Michael Lang <milang@angel.tal.org>
Fri, 27 Jul 2007 12:02:31 +0000 (15:02 +0300)
committerKaj-Michael Lang <milang@angel.tal.org>
Fri, 27 Jul 2007 12:02:31 +0000 (15:02 +0300)
configure.ac
src/Makefile.am

index f6998edd3373a5215145406d7d211ce4cade57b3..a64587ae2b659b09ca31f5eeae1899abe8fa8677 100644 (file)
@@ -36,15 +36,11 @@ else
     DEBUG_FLAGS="$DEBUG_FLAGS -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT"
 fi
 
-CFLAGS="$CFLAGS $DEBUG_FLAGS -Wall -std=c99 -Wmissing-prototypes -Wmissing-declarations"
+CFLAGS="$CFLAGS $DEBUG_FLAGS -Wall -Wmissing-prototypes -Wmissing-declarations"
 
-PKG_CHECK_MODULES(GTK, gtk+-2.0)
-AC_SUBST(GTK_LIBS)
-AC_SUBST(GTK_CFLAGS)
-
-PKG_CHECK_MODULES(GLIB, glib-2.0)
-AC_SUBST(GLIB_LIBS)
-AC_SUBST(GLIB_CFLAGS)
+PKG_CHECK_MODULES(GLIBGTK, glib-2.0 gconf-2.0 dbus-glib-1 gtk+-2.0)
+AC_SUBST(GLIBGTK_LIBS)
+AC_SUBST(GLIBGTK_CFLAGS)
 
 dnl Ckeck for hildon-libs
 PKG_CHECK_MODULES(HILDON, hildon-libs libosso, HAVE_HILDON=yes, HAVE_HILDON=no)
@@ -75,10 +71,16 @@ PKG_CHECK_MODULES(BLUEZ, bluez)
 AC_SUBST(BLUEZ_LIBS)
 AC_SUBST(BLUEZ_CFLAGS)
 
-PKG_CHECK_MODULES(GEOCLUE, geoclue, HAVE_GEOCLUE=yes, HAVE_GEOCLUE=no)
+AC_CHECK_HEADERS([gps.h], [ac_cv_gps_h=yes])
+AC_CHECK_LIB(gps, gps_open,[ac_cv_libgps=yes] )
+if test "x$ac_cv_libgps" != xyes; then
+       AC_DEFINE(WITH_LIBGPS, 1, [build with gpsd])
+fi
 
 AM_CONDITIONAL(WITH_HILDON, test "x$HAVE_HILDON" = "xyes")
 
+PKG_CHECK_MODULES(GEOCLUE, geoclue, HAVE_GEOCLUE=yes, HAVE_GEOCLUE=no)
+
 if test "x$HAVE_GEOCLUE" = "xyes"; then
  AC_DEFINE(WITH_GEOCLUE, 1, [build with Geoclue])
  AC_SUBST(GEOCLUE_CFLAGS)
@@ -89,18 +91,10 @@ PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= 2.8.4.11 gnome-vfs-module-2.0 >= 2
 AC_SUBST(GNOME_VFS_LIBS)
 AC_SUBST(GNOME_VFS_CFLAGS)
 
-PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.6.2)
-AC_SUBST(GCONF_LIBS)
-AC_SUBST(GCONF_CFLAGS)
-
 PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.6.16)
 AC_SUBST(LIBXML2_LIBS)
 AC_SUBST(LIBXML2_CFLAGS)
 
-PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1)
-AC_SUBST(DBUS_GLIB_LIBS)
-AC_SUBST(DBUS_GLIB_CFLAGS)
-
 PKG_CHECK_MODULES(LIBCURL, libcurl)
 AC_SUBST(LIBCURL_LIBS)
 AC_SUBST(LIBCURL_CFLAGS)
index c279dbd1e49e4ad43544d33b2a888dd2133e062d..61cedb2b57dcb387d94e896473f09cee89018ae6 100644 (file)
 
 bin_PROGRAMS = mapper osm2db
 
-mapper_CFLAGS = $(GTK_CFLAGS) $(OSSO_CFLAGS) $(HILDON_CFLAGS) \
+mapper_CFLAGS = $(GLIBGTK_CFLAGS) $(OSSO_CFLAGS) $(HILDON_CFLAGS) \
        $(GNOME_VFS_CFLAGS) $(GCONF_CFLAGS) $(LIBXML2_CFLAGS) $(GSTREAMER_CFLAGS) \
        $(SQLITE_CFLAGS) $(LIBCURL_CFLAGS) $(DBUS_GLIB_CFLAGS) $(BLUEZ_CFLAGS)
 
-mapper_LDADD = $(GTK_LIBS) $(OSSO_LIBS) $(HILDON_LIBS) \
+mapper_LDADD = $(GLIBGTK_LIBS) $(OSSO_LIBS) $(HILDON_LIBS) \
        $(GNOME_VFS_LIBS) $(GCONF_LIBS) $(LIBXML2_LIBS) $(GSTREAMER_LIBS) \
        $(SQLITE_LIBS) $(LIBCURL_LIBS) $(DBUS_GLIB_LIBS) $(BLUEZ_LIBS) -lm
 
@@ -55,8 +55,8 @@ mapper_SOURCES = utils.c \
        config.c \
        mapper.c
 
-osm2db_CFLAGS = $(EXPAT_CFLAGS) $(SQLITE_CFLAGS) $(GLIB_CFLAGS)
+osm2db_CFLAGS = $(EXPAT_CFLAGS) $(SQLITE_CFLAGS) $(GLIBGTK_CFLAGS)
 
-osm2db_LDADD = $(EXPAT_LIBS) $(SQLITE_LIBS) $(GLIB_LIBS) -lm
+osm2db_LDADD = $(EXPAT_LIBS) $(SQLITE_LIBS) $(GLIBGTK_LIBS) -lm
 
 osm2db_SOURCES = latlon.c osm.c