--- /dev/null
- AC_INIT(rsl, 1.41)
+# Process this file with autoconf to produce a configure script.
++AC_INIT(rsl, 1.42)
+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.])
+
+# Checks for libraries.
+if test $prefix = NONE; then
+ prefix=$ac_default_prefix
+fi
+LIBDIR="-L$prefix/lib"
+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_CHECK_LIB(implode, _implode, ,,$LIBDIR)
+AC_CHECK_LIB(jpeg, jpeg_CreateCompress,,,$LIBDIR)
+AC_CHECK_LIB(df, DFopen, ,,$LIBDIR)
+AC_CHECK_LIB(mfhdf, SDstart, ,,$LIBDIR)
+AC_CHECK_LIB(tsdistk, TKopen, ,,$LIBDIR)
+
+# Check if yywrap is defined in toolkit, and add $LEXLIB to LIBS if not.
+YYWRAP=""
+AC_CHECK_LIB(tsdistk, yywrap, YYWRAP="yes",,$LIBDIR)
+if test "$YYWRAP" = ""; then
+ LIBS="$LIBS $LEXLIB"
+fi
+
+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:41
+AM_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:42
+librsl_la_CPPFLAGS = -DDATADIR="\"$(datadir)/rsl\""
+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 \
+ gzip.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)
+
+# 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