--- /dev/null
- AC_INIT(rsl, 1.42)
+# Process this file with autoconf to produce a configure script.
++AC_INIT(rsl, 1.43)
+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
--- /dev/null
- librsl_la_LDFLAGS = -version-info 1:42
+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:43
+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 \
+ 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
NSIG_Sweep **nsig_read_sweep(FILE *fp, NSIG_Product_file *prod_file)
{
NSIG_Sweep **s;
- int i, j, n;
+ int i, n;
- static NSIG_Ingest_data_header **idh = NULL;
- static NSIG_Raw_prod_bhdr *bhdr = NULL;
+ NSIG_Ingest_data_header **idh = NULL;
+ NSIG_Raw_prod_bhdr *bhdr = NULL;
NSIG_Ray *nsig_ray;
int data_mask, iray, nrays[12], max_rays;
+#ifdef NSIG_VER2
+ int j;
int masks[5];
+#endif
int nparams;
int is_new_ray;
int idtype[12];
int save_fd;
if ( strcmp(filename, "stdin") == 0 ) {
- save_fd = dup(0);
- wf->fptr = fdopen(save_fd,"rb");
+ save_fd = dup(0);
- wf->fptr = fdopen(save_fd,"r");
++ wf->fptr = fdopen(save_fd,"rb");
} else {
- wf->fptr = fopen(filename, "rb");
- wf->fptr = fopen(filename, "r");
++ wf->fptr = fopen(filename, "rb");
}
if (wf->fptr == NULL) return NULL;
int n;
char c;
- if ((fp = fopen(first_file, "r")) == NULL) {
+ if ((fp = fopen(first_file, "rb")) == NULL) {
- perror(first_file);
- return 0;
+ perror(first_file);
+ return 0;
}
n = fread(wsr88d_tape_header, sizeof(Wsr88d_tape_header), 1, fp);
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: make this an argument. */
+ int keep_hi_prf_dz = 0; /* TODO: implement an interface for this. */
enum waveforms {surveillance=1, doppler_w_amb_res, doppler_no_amb_res,
batch};