]> Pileus Git - aweather/commitdiff
Added --with-gps flag for selectively compiling with or without
authorAdam Boggs <boggs-git@aircrafter.org>
Sun, 22 Jan 2012 23:01:37 +0000 (16:01 -0700)
committerAdam Boggs <boggs-git@aircrafter.org>
Sun, 22 Jan 2012 23:01:37 +0000 (16:01 -0700)
gpsd support.  Defaults to no gpsd support since it's still beta.

configure.ac
src/plugins/Makefile.am

index b3c0d4ac1ec7405c3ef5e7af40576f747c2922ef..7223877522a29dff71ceff5b2c1730fd082a1cdf 100644 (file)
@@ -17,10 +17,22 @@ PKG_CHECK_MODULES(GLIB,  glib-2.0)
 PKG_CHECK_MODULES(GRITS, grits >= 0.6)
 
 # Check for gpsd support
 PKG_CHECK_MODULES(GRITS, grits >= 0.6)
 
 # Check for gpsd support
-AC_CHECK_LIB(gps, gps_open, GPS_LIBS="-lgps")
-AM_CONDITIONAL(HAVE_GPSD, test "$GPS_LIBS" != "")
-AC_DEFINE([HAVE_GPSD], [1], [GPSD support])
-AC_SUBST(GPS_LIBS)
+AC_ARG_WITH([gps], AS_HELP_STRING([--with-gps], [Build with gpsd support]))
+
+if test "x$with_gps" = "xyes"; then
+   PKG_CHECK_MODULES(GPSD, libgps >= 3.0)
+   AC_DEFINE([HAVE_GPSD], [], [Have GPSD support])
+   AC_SUBST(HAVE_GPSD, [TRUE])
+fi
+AM_CONDITIONAL([HAVE_GPSD], test "$HAVE_GPSD" = "TRUE")
+
+# PKG_CHECK_MODULES(GPSD, libgps >= 3.0)
+#AC_ARG_WITH([gps], AS_HELP_STRING([--with-gps], [Build with gpsd support]))
+#AS_IF([test "x$with_gps" = "xyes"], [
+#   PKG_CHECK_MODULES([GPSD], [libgps >= 3.0],
+#      [AC_DEFINE([HAVE_GPSD], [1], [Use GPSD])],
+#      [AC_DEFINE([HAVE_GPSD], [0], [No GPSD])]
+#   ])
 
 # Define odd RSL install location
 AC_CHECK_LIB(rsl, RSL_wsr88d_to_radar, RSL_LIBS="-lrsl")
 
 # Define odd RSL install location
 AC_CHECK_LIB(rsl, RSL_wsr88d_to_radar, RSL_LIBS="-lrsl")
index 691f7fb5c05e26e58abfff7d1e932c2145b17f33..23d8004a3a4d9900cbef1ba8d66b9a6584cfeb5b 100644 (file)
@@ -28,7 +28,7 @@ gps_la_SOURCES = \
 gps_la_CPPFLAGS = \
        -DPKGDATADIR="\"$(dots)$(pkgdatadir)\"" \
        -I$(top_srcdir)/src
 gps_la_CPPFLAGS = \
        -DPKGDATADIR="\"$(dots)$(pkgdatadir)\"" \
        -I$(top_srcdir)/src
-gps_la_LIBADD  = $(GPS_LIBS) $(GRITS_LIBS)
+gps_la_LIBADD  = $(GPSD_LIBS) $(GRITS_LIBS)
 endif
 
 if HAVE_RSL
 endif
 
 if HAVE_RSL