diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-03-27 11:11:21 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-03-27 11:11:21 -0400 |
commit | aa8cfe238620507a92d0f7ac735e4ee965563958 (patch) | |
tree | af86dbcdee58ae50ecb1b4c00bc1bf9841120090 | |
parent | aade3080642fff0d0c0f9a0fd668ea965ee072aa (diff) | |
download | gpsd-aa8cfe238620507a92d0f7ac735e4ee965563958.tar.gz |
Fix gpsdecode compilation when one of the rtcm104 versions is disabled.
Signed-off-by: esr@thyrsus.com
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | gpsdecode.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 03cbbc26..67b8af7d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -48,6 +48,11 @@ RTCM104PAGES_DIST = gpsdecode.1 if HAVE_RTCM104V2 RTCM104PROGS = gpsdecode RTCM104PAGES = $(RTCM104PAGES_DIST) +else +if HAVE_RTCM104V3 +RTCM104PROGS = gpsdecode +RTCM104PAGES = $(RTCM104PAGES_DIST) +endif endif bin_PROGRAMS = $(MOTIF_PROGS) $(XAW_PROGS) $(RTCM104PROGS) $(CURSESPROGS) gpsctl gpspipe gpxlogger lcdgps diff --git a/gpsdecode.c b/gpsdecode.c index 36e27f3e..9105c662 100644 --- a/gpsdecode.c +++ b/gpsdecode.c @@ -392,6 +392,7 @@ static void decode(FILE *fpin, FILE *fpout) while (packet_get(fileno(fpin), &lexer) > 0) { if (lexer.type == COMMENT_PACKET) continue; +#ifdef RTCM104V2_ENABLE else if (lexer.type == RTCM2_PACKET) { rtcm2_unpack(&rtcm2, (char *)lexer.isgps.buf); if (json) @@ -400,10 +401,13 @@ static void decode(FILE *fpin, FILE *fpout) rtcm2_sager_dump(&rtcm2, buf, sizeof(buf)); (void)fputs(buf, fpout); } +#endif +#ifdef RTCM104V3_ENABLE else if (lexer.type == RTCM3_PACKET) { rtcm3_unpack(&rtcm3, (char *)lexer.outbuffer); rtcm3_dump(&rtcm3, stdout); } +#endif else if (lexer.type == AIVDM_PACKET) { if (verbose >=1 ) (void)fputs((char *)lexer.outbuffer, stdout); |