--- /dev/null
- AC_INIT(rsl, 1.43)
+# Process this file with autoconf to produce a configure script.
++AC_INIT(rsl, 1.44)
+AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability foreign])
+
+AM_INIT_AUTOMAKE
+AM_CONFIG_HEADER(config.h)
+AC_CONFIG_MACRO_DIR([m4])
+
+# Checks for programs.
+AC_PROG_CC
+AM_PROG_LIBTOOL
+AM_PROG_LEX
+AC_PROG_YACC
+AC_PROG_LN_S
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS(fcntl.h malloc.h strings.h unistd.h)
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_SIZE_T
+AC_STRUCT_TM
+
+# Checks for library functions.
+# AC_FUNC_SETVBUF_REVERSED
+AC_CHECK_FUNCS(mktime strdup strstr)
+
+# I would like lassen to be defined. Override this in config.h.
+AC_DEFINE(HAVE_LASSEN, 1,
+ [For LASSEN capability. Change this to '#undef HAVE_LASSEN', if you
+ dont want LASSEN.])
+
+# Standard libraries
+LIBS="-lz -lm"
+
+# The order of the libraries is important.
+# This works:
+# -lrsl -limplode -ltsdistk -lmfhdf -ldf -ljpeg -lz -lm
+#
+# If mounting with shared libraries we may have to specify all possible libraries.
+# First check with simple LIBS list, if it fails, then expand the list.
+AC_SEARCH_LIBS(_implode, implode)
+AC_SEARCH_LIBS(jpeg_CreateCompress, jpeg )
+AC_SEARCH_LIBS(DFopen, df )
+AC_SEARCH_LIBS(SDstart, mfhdf )
+AC_SEARCH_LIBS(TKopen, tsdistk)
+
+# Check if yywrap is defined in toolkit, and add $LEXLIB to LIBS if not.
+YYWRAP=""
+AC_SEARCH_LIBS(yywrap, tsdistk, YYWRAP="yes")
+if test "$YYWRAP" = ""; then
+ LIBS="$LIBS $LEXLIB"
+fi
+
+# Test for Windows vs. Unix
+case "${host}" in
+ *mingw32*) SYS="WIN" ;;
+ *cygwin*) SYS="WIN" ;;
+ *) SYS="UNIX" ;;
+esac
+AC_SUBST([SYS])
+AM_CONDITIONAL([SYS_WIN], test "$SYS" = "WIN")
+AM_CONDITIONAL([SYS_UNIX], test "$SYS" = "UNIX")
+
+# Check for relative build
+AC_ARG_ENABLE(relative, [AS_HELP_STRING([--enable-relative],
+ [enable runtime search paths @<:@default=no@:>@])],
+ [DOTS=".."; ac_default_prefix="/"])
+AC_SUBST([DOTS])
+
+AC_MSG_RESULT(LIBS = $LIBS)
+AC_CONFIG_FILES([Makefile doc/Makefile data/Makefile examples/Makefile src/Makefile])
+AC_OUTPUT
<td>Yes</td>
- <td>Yes</td>
+ <td>No</td>
</tr>
+ </table></center>
+
+ <center><table BORDER=2 WIDTH="400" >
+ <caption>
+ <h2>
+ Not Supported but Retained for Backward Compatibility</h2>
+ </caption>
<tr>
- <td>RADTEC</td>
+ <td><b>Format Type</b></td>
+
+ <td><b>Input</b></td>
+
+ <td><b>Output</b></td>
+ </tr>
+
-<tr>
-<td>EDGE</td>
-
-<td>Yes</td>
-
-<td>No</td>
-</tr>
-
+ <td>RAPIC</td>
<td>Yes</td>
--- /dev/null
- librsl_la_LDFLAGS = -version-info 1:43
+M_CPPFLAGS = -I. -I..
+AM_YFLAGS = -d
+
+lib_LTLIBRARIES = librsl.la
+
+include_HEADERS = rsl.h toolkit_1BC-51_appl.h
+
+headers = africa.h dorade.h lassen.h \
+ mcgill.h nsig.h radtec.h rainbow.h \
+ rapic_routines.h toga.h \
+ wsr88d.h \
+ $(include_HEADERS)
+
++librsl_la_LDFLAGS = -version-info 1:44
+librsl_la_CPPFLAGS = -DDATADIRRSL="\"$(DOTS)$(datadir)/rsl1\""
+librsl_la_SOURCES = \
+ rapic_parse.y rapic_scan.l rapic_to_radar.c rapic_routines.c \
+ radtec.c radtec_to_radar.c \
+ dorade.c dorade_print.c dorade_to_radar.c \
+ lassen.c lassen_to_radar.c \
+ radar.c volume.c image_gen.c cappi.c fraction.c read_write.c farea.c \
+ range.c radar_to_uf.c uf_to_radar.c wsr88d_to_radar.c \
+ carpi.c cube.c sort_rays.c toga_to_radar.c gts.c histogram.c \
+ ray_indexes.c anyformat_to_radar.c get_win.c endian.c mcgill_to_radar.c \
+ mcgill.c interp.c toga.c wsr88d.c wsr88d_get_site.c wsr88d_m31.c \
+ prune.c reverse.c fix_headers.c \
++ wsr88d_align_split_cut_rays.c \
++ wsr88d_merge_split_cuts.c \
+ nsig_to_radar.c nsig.c nsig2_to_radar.c \
+ africa_to_radar.c africa.c \
+ radar_to_hdf_2.c hdf_to_radar.c toolkit_memory_mgt.c \
+ radar_to_hdf_1.c rainbow.c rainbow_to_radar.c $(headers)
+
+if SYS_WIN
+librsl_la_LDFLAGS += -mwindows -no-undefined
+librsl_la_LIBADD = -lws2_32
+librsl_la_SOURCES += gzip_win32.c
+else
+librsl_la_SOURCES += gzip.c
+endif
+
+# This should be speciifc to rapic,
+# but I'm not sure how to do that with autofoo
+AM_LFLAGS = -P rapic
+AM_YFLAGS += -p rapic
+LEX_OUTPUT_ROOT = lex.rapic
+
+BUILT_SOURCES = rapic_parse.h
+
+DISTCLEANFILES = rapic_scan.c rapic_parse.c
fpipe = popen("gzip -q -d -f --stdout", "r");
if (fpipe == NULL) perror("uncompress_pipe");
close(0);
- dup(save_fd);
+ if (dup(save_fd) < 0) {
+ perror("decompress_pipe");
+ return NULL;
+ }
close(save_fd);
+ fclose(fp);
return fpipe;
}
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
-/* This allows us to use RSL_ftype, RSL_f_list, RSL_invf_list from rsl.h. */
-#define USE_RSL_VARS
+ #include <math.h>
+
#include "rsl.h"
extern int radar_verbose_flag;
unsigned short item;
float value, scale, offset;
unsigned char *data;
- Range (*invf)(float x);
- float (*f)(Range x);
Ray *ray;
int vol_index, waveform;
- char *type_str;
+ Range (*invf)(float x) = DZ_INVF;
+ float (*f)(Range x) = DZ_F;
+ char *type_str = "Unknown type";
- int keep_hi_prf_dz = 0; /* TODO: implement an interface for this. */
+ extern int rsl_qfield[]; /* See RSL_select_fields in volume.c */
enum waveforms {surveillance=1, doppler_w_amb_res, doppler_no_amb_res,
batch};