From eec86fc5f03cd1ee7a2f5372cb4323f93db15c93 Mon Sep 17 00:00:00 2001 From: Bernd Zeimetz Date: Sat, 12 Dec 2009 12:26:17 +0100 Subject: [PATCH 1/2] Use pkg-config to check for gpsd, require 2.91. We need 2.91 as we rely on gps_poll being non-blocking. --- configure.ac | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 18c7419..b165a7e 100644 --- a/configure.ac +++ b/configure.ac @@ -209,19 +209,18 @@ AC_ARG_ENABLE(gpsd, enable_gpsd=auto) if test "x$enable_gpsd" != "xno"; then - AC_CHECK_LIB(gps, gps_open,[libgps=yes] ) + PKG_CHECK_MODULES(GPSD, [libgps >= 2.91], have_gpsd="yes", have_gpsd="no") if test "x$have_gpsd" = "xyes"; then PROVIDER_SUBDIRS="$PROVIDER_SUBDIRS gpsd" - GPSD_LIBS="-lgps" else NO_BUILD_PROVIDERS="$NO_BUILD_PROVIDERS gpsd" fi - else +else have_gpsd=no fi if test "x$enable_gpsd" = "xyes" -a "x$have_gpsd" != "xyes"; then - AC_MSG_ERROR([Couldn't find gpsd dependencies.]) + AC_MSG_ERROR([Couldn't find gpsd dependencies - libgps >= 2.90.]) fi AC_SUBST(GPSD_LIBS) AC_SUBST(GPSD_CFLAGS) -- 1.6.5.3