1 # Process this file with autoconf to produce a configure script.
3 AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability foreign])
6 AM_CONFIG_HEADER(config.h)
7 AC_CONFIG_MACRO_DIR([m4])
16 # Checks for header files.
19 AC_CHECK_HEADERS(fcntl.h malloc.h strings.h unistd.h)
21 # Checks for typedefs, structures, and compiler characteristics.
26 # Checks for library functions.
27 # AC_FUNC_SETVBUF_REVERSED
28 AC_CHECK_FUNCS(mktime strdup strstr)
30 # I would like lassen to be defined. Override this in config.h.
31 AC_DEFINE(HAVE_LASSEN, 1,
32 [For LASSEN capability. Change this to '#undef HAVE_LASSEN', if you
35 # Checks for libraries.
36 if test $prefix = NONE; then
37 prefix=$ac_default_prefix
39 LIBDIR="-L$prefix/lib"
42 # The order of the libraries is important.
44 # -lrsl -limplode -ltsdistk -lmfhdf -ldf -ljpeg -lz -lm
46 # If mounting with shared libraries we may have to specify all possible libraries.
47 # First check with simple LIBS list, if it fails, then expand the list.
49 AC_CHECK_LIB(implode, _implode, ,,$LIBDIR)
50 AC_CHECK_LIB(jpeg, jpeg_CreateCompress,,,$LIBDIR)
51 AC_CHECK_LIB(df, DFopen, ,,$LIBDIR)
52 AC_CHECK_LIB(mfhdf, SDstart, ,,$LIBDIR)
53 AC_CHECK_LIB(tsdistk, TKopen, ,,$LIBDIR)
55 # Check if yywrap is defined in toolkit, and add $LEXLIB to LIBS if not.
57 AC_CHECK_LIB(tsdistk, yywrap, YYWRAP="yes",,$LIBDIR)
58 if test "$YYWRAP" = ""; then
62 AC_MSG_RESULT(LIBS = $LIBS)
63 AC_CONFIG_FILES([Makefile doc/Makefile data/Makefile examples/Makefile src/Makefile])