diff options
-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); |