1 diff --git a/colors/Makefile.am b/colors/Makefile.am
2 index 709a367..b043f7f 100644
3 --- a/colors/Makefile.am
4 +++ b/colors/Makefile.am
6 AUTOMAKE_OPTIONS = foreign
8 -colordir = $(prefix)/lib/colors
9 +colordir = $(datadir)/rsl/colors
12 EXTRA_DIST = $(color_DATA)
13 diff --git a/Makefile.am b/Makefile.am
14 index 3c106a8..6aca2ec 100644
18 ## Process w/ automake. Or, autoreconf; make ##
19 +AM_CFLAGS = -DDATADIR="\"$(datadir)/rsl\""
20 AUTOMAKE_OPTIONS = foreign
21 SUBDIRS = . colors doc examples
22 INCLUDES = -I. -I$(srcdir) -I$(prefix)/include -I$(prefix)/toolkit/include
24 -includedir = $(prefix)/include
25 -colordir = $(libdir)/colors
27 lib_LTLIBRARIES = librsl.la
29 -librsl_la_LDFLAGS = -version-info 1:41
30 -librsl_la_SOURCES = \
31 -$(rapic_c) $(radtec_c)\
32 -dorade.c dorade_print.c dorade_to_radar.c\
33 -lassen.c lassen_to_radar.c \
35 - radar.c volume.c image_gen.c cappi.c fraction.c read_write.c farea.c \
36 - range.c radar_to_uf.c uf_to_radar.c wsr88d_to_radar.c \
37 - carpi.c cube.c sort_rays.c toga_to_radar.c gts.c histogram.c \
38 - ray_indexes.c anyformat_to_radar.c get_win.c endian.c mcgill_to_radar.c \
39 - mcgill.c interp.c toga.c wsr88d.c wsr88d_get_site.c wsr88d_m31.c \
40 - gzip.c prune.c reverse.c fix_headers.c \
41 - nsig_to_radar.c nsig.c nsig2_to_radar.c \
42 - africa_to_radar.c africa.c \
43 - radar_to_hdf_2.c hdf_to_radar.c toolkit_memory_mgt.c \
44 - radar_to_hdf_1.c rainbow.c rainbow_to_radar.c $(headers)
46 -librsl_la_DEPENDENCIES = $(build_headers)
47 +wsr88ddir = $(datadir)/rsl/
48 +dist_wsr88d_DATA = wsr88d_locations.dat
50 -build_headers = rsl.h wsr88d.h toolkit_1BC-51_appl.h
51 +include_HEADERS = rsl.h toolkit_1BC-51_appl.h
53 headers = africa.h dorade.h lassen.h \
54 mcgill.h nsig.h radtec.h rainbow.h \
55 rapic_routines.h toga.h \
60 +librsl_la_LDFLAGS = -version-info 1:41
61 +librsl_la_SOURCES = \
62 + $(rapic_c) $(radtec_c) \
63 + dorade.c dorade_print.c dorade_to_radar.c \
64 + lassen.c lassen_to_radar.c \
66 + radar.c volume.c image_gen.c cappi.c fraction.c read_write.c farea.c \
67 + range.c radar_to_uf.c uf_to_radar.c wsr88d_to_radar.c \
68 + carpi.c cube.c sort_rays.c toga_to_radar.c gts.c histogram.c \
69 + ray_indexes.c anyformat_to_radar.c get_win.c endian.c mcgill_to_radar.c \
70 + mcgill.c interp.c toga.c wsr88d.c wsr88d_get_site.c wsr88d_m31.c \
71 + gzip.c prune.c reverse.c fix_headers.c \
72 + nsig_to_radar.c nsig.c nsig2_to_radar.c \
73 + africa_to_radar.c africa.c \
74 + radar_to_hdf_2.c hdf_to_radar.c toolkit_memory_mgt.c \
75 + radar_to_hdf_1.c rainbow.c rainbow_to_radar.c $(headers)
78 rapic_c = rapic_to_radar.c rapic.y rapic-lex.l rapic_routines.c
79 radtec_c = radtec_to_radar.c radtec.c
83 - @for h in $(build_headers); do \
84 - echo -n "Checking substitutions in header file $$h ... "; \
86 - sed -e 's/RSL_VERSION_STR.*/RSL_VERSION_STR \"$(VERSION)\"/' \
87 - -e 's|#define COLORDIR.*|#define COLORDIR \"$(colordir)\"|' \
88 - -e 's|#define WSR88D_SITE_INFO_FILE.*|#define WSR88D_SITE_INFO_FILE \"$(libdir)/wsr88d_locations.dat\"|' \
89 - < $$h.in > $$h.new; \
90 - if cmp -s $$h $$h.new; then \
92 - echo "$$h remains untouched."; \
95 - echo "substitutions made in $$h."; \
102 YFLAGS = -d -p $(PREFIX)
103 LEX_OUTPUT_ROOT = lex.$(PREFIX)
107 - $(INSTALL) -d $(includedir)
108 - $(INSTALL) -m 644 rsl.h $(includedir)
109 - $(INSTALL) -m 644 toolkit_1BC-51_appl.h $(includedir)
110 - $(INSTALL) -m 644 wsr88d_locations.dat $(libdir)
112 EXTRA_DIST = CHANGES Copyright GPL LGPL wsr88d_locations.dat rapic.h
114 DISTCLEANFILES = rapic.c rapic-lex.c
115 diff --git a/radar.c b/radar.c
116 index 4078f17..7c07d01 100644
121 void RSL_print_version()
123 - printf("RSL version %s.\n", RSL_VERSION_STR);
124 + printf("RSL version %s.\n", VERSION);
127 /* Debug printing global variable: radar_verbose_flag */
128 diff --git a/radar_to_uf.c b/radar_to_uf.c
129 index 0d3af56..53d2d8d 100644
132 @@ -321,7 +321,7 @@ void RSL_radar_to_uf_fp(Radar *r, FILE *fp)
133 uf_ma[37] = tm->tm_year % 100; /* Same format as data year */
134 uf_ma[38] = tm->tm_mon+1;
135 uf_ma[39] = tm->tm_mday;
136 - memcpy(&uf_ma[40], "RSL" RSL_VERSION_STR, 8);
137 + memcpy(&uf_ma[40], "RSL" VERSION, 8);
138 if (little_endian()) swap2(&uf_ma[40], 8/2);
139 uf_ma[44] = (signed short)UF_NO_DATA;
141 diff --git a/read_write.c b/read_write.c
142 index 644a7b2..1e5f319 100644
145 @@ -314,7 +314,7 @@ int RSL_write_radar_fp(Radar *radar, FILE *fp)
146 if (radar == NULL) return 0;
148 memset(title, 0, sizeof(title));
149 - (void)sprintf(title, "RSL v%s. sizeof(Range) %d", RSL_VERSION_STR, sizeof(Range));
150 + (void)sprintf(title, "RSL v%s. sizeof(Range) %d", VERSION, sizeof(Range));
151 n += fwrite(title, sizeof(char), sizeof(title), fp);
153 memset(header_buf, 0, sizeof(header_buf));
154 diff --git a/rsl.h b/rsl.h
155 index a821765..597069c 100644
162 -#define RSL_VERSION_STR "v1.41"
164 /**********************************************************************/
165 /* Configure: Define USE_TWO_BYTE_PRECISION to have RSL store internal*/
166 /* values with two bytes. Otherwise, use one byte. */
168 /* so you shouldn't have to modify anything here. */
169 /**********************************************************************/
171 -#define COLORDIR "/usr/local/trmm/GVBOX/lib/colors"
172 +#define COLORDIR DATADIR "/colors"
175 /* These are the color table indexes. See RSL_set/get_color_table. */
177 /* The default color tables for reflectivity, velocity, spectral width,
178 * height, rainfall, and zdr.
180 -#define REFL_RED_FILE COLORDIR "/red_reflectivity.clr"
181 -#define REFL_GREEN_FILE COLORDIR "/grn_reflectivity.clr"
182 -#define REFL_BLUE_FILE COLORDIR "/blu_reflectivity.clr"
183 -#define VEL_RED_FILE COLORDIR "/red_velocity.clr"
184 -#define VEL_GREEN_FILE COLORDIR "/grn_velocity.clr"
185 -#define VEL_BLUE_FILE COLORDIR "/blu_velocity.clr"
186 -#define SW_RED_FILE COLORDIR "/red_spectral_width.clr"
187 -#define SW_GREEN_FILE COLORDIR "/grn_spectral_width.clr"
188 -#define SW_BLUE_FILE COLORDIR "/blu_spectral_width.clr"
189 -#define HEIGHT_RED_FILE COLORDIR "/red_height.clr"
190 -#define HEIGHT_GREEN_FILE COLORDIR "/grn_height.clr"
191 -#define HEIGHT_BLUE_FILE COLORDIR "/blu_height.clr"
192 +#define REFL_RED_FILE COLORDIR "/red_reflectivity.clr"
193 +#define REFL_GREEN_FILE COLORDIR "/grn_reflectivity.clr"
194 +#define REFL_BLUE_FILE COLORDIR "/blu_reflectivity.clr"
195 +#define VEL_RED_FILE COLORDIR "/red_velocity.clr"
196 +#define VEL_GREEN_FILE COLORDIR "/grn_velocity.clr"
197 +#define VEL_BLUE_FILE COLORDIR "/blu_velocity.clr"
198 +#define SW_RED_FILE COLORDIR "/red_spectral_width.clr"
199 +#define SW_GREEN_FILE COLORDIR "/grn_spectral_width.clr"
200 +#define SW_BLUE_FILE COLORDIR "/blu_spectral_width.clr"
201 +#define HEIGHT_RED_FILE COLORDIR "/red_height.clr"
202 +#define HEIGHT_GREEN_FILE COLORDIR "/grn_height.clr"
203 +#define HEIGHT_BLUE_FILE COLORDIR "/blu_height.clr"
204 #define RAINFALL_RED_FILE COLORDIR "/red_rainfall.clr"
205 #define RAINFALL_GREEN_FILE COLORDIR "/grn_rainfall.clr"
206 #define RAINFALL_BLUE_FILE COLORDIR "/blu_rainfall.clr"
207 diff --git a/wsr88d.h b/wsr88d.h
208 index ecad620..7d22427 100644
212 * The directory should be the same as the LIBDIR in the makefile.
214 #ifndef WSR88D_SITE_INFO_FILE
215 -#define WSR88D_SITE_INFO_FILE "/usr/local/trmm/GVBOX/lib/wsr88d_locations.dat"
216 +#define WSR88D_SITE_INFO_FILE DATADIR "/wsr88d_locations.dat"
218 /*===============================================================*/
220 diff --git a/doc/Makefile.am b/doc/Makefile.am
221 index 6acc059..d4fc3fd 100644
222 --- a/doc/Makefile.am
223 +++ b/doc/Makefile.am
225 AUTOMAKE_OPTIONS = foreign
227 -docdir = $(prefix)/doc/$(PACKAGE)
228 -doc_DATA = *.html *.gif *.jpg
230 -EXTRA_DIST = $(doc_DATA) *.fig
233 - -mkdir $(prefix)/doc
235 - $(INSTALL) -m 444 ../README $(docdir)
236 - $(INSTALL) -m 444 ../CHANGES $(docdir)
237 +dist_doc_DATA = *.html *.gif *.jpg *.fig ../README ../CHANGES