From 28de3edf6d57521d8d59332ea407cd87ebaadf44 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Fri, 27 Jul 2007 15:02:31 +0300 Subject: [PATCH] Small changes, check for gpsd and check base requirement in one go. --- configure.ac | 28 +++++++++++----------------- src/Makefile.am | 8 ++++---- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index f6998ed..a64587a 100644 --- a/configure.ac +++ b/configure.ac @@ -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) diff --git a/src/Makefile.am b/src/Makefile.am index c279dbd..61cedb2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,11 +20,11 @@ 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 -- 2.39.5