1 dnl Process this file with autoconf to produce a configure script.
3 AC_CONFIG_SRCDIR(volume.c)
6 AM_CONFIG_HEADER(config.h)
8 dnl Default for GVS and friends.
9 AC_PREFIX_DEFAULT(/usr/local/trmm)
11 dnl Checks for programs.
19 dnl Checks for header files.
22 AC_CHECK_HEADERS(fcntl.h malloc.h strings.h unistd.h)
24 dnl Checks for typedefs, structures, and compiler characteristics.
29 dnl Checks for library functions.
30 dnl AC_FUNC_SETVBUF_REVERSED
31 AC_CHECK_FUNCS(mktime strdup strstr)
33 dnl I would like lassen to be defined. Override this in config.h.
34 AC_DEFINE(HAVE_LASSEN, 1,
35 [For LASSEN capability. Change this to '#undef HAVE_LASSEN', if you
38 dnl Checks for libraries.
39 if test $prefix = NONE; then
40 prefix=$ac_default_prefix
42 LIBDIR="-L$prefix/lib"
45 # The order of the libraries is important.
47 # -lrsl -limplode -letor -ltsdistk -lmfhdf -ldf -ljpeg -lz -lm
49 # If mounting with shared libraries we may have to specify all possible libraries.
50 # First check with simple LIBS list, if it fails, then expand the list.
52 AC_CHECK_LIB(implode, _implode, ,,$LIBDIR)
53 AC_CHECK_LIB(jpeg, jpeg_CreateCompress,,,$LIBDIR)
54 AC_CHECK_LIB(df, DFopen, ,,$LIBDIR)
55 AC_CHECK_LIB(mfhdf, SDstart, ,,$LIBDIR)
56 AC_CHECK_LIB(tsdistk, TKopen, ,,$LIBDIR)
58 # Because -letor may depend on RSL being installed, just check for
59 # the library libetor.a in a couple of places.
61 dnl For autoheader, generate template for HAVE_LIBETOR.
62 AH_TEMPLATE(HAVE_LIBETOR,[For EDGE capability. Change this
63 to '#define HAVE_LIBETOR 1', if you have libetor -- the EDGE decoding
68 if test "$L" = ""; then # Check for the file directly.
69 AC_CHECK_FILE($prefix/lib/libetor.a, L="-letor -lrsl -letor"; AC_DEFINE(HAVE_LIBETOR))
71 if test "$L" = ""; then # Check for the file directly.
72 AC_CHECK_FILE(/usr/local/lib/libetor.a, L="-letor -lrsl -letor"; AC_DEFINE(HAVE_LIBETOR))
75 if test "$L" != ""; then # libetor exists.
76 LIBS="$LIBDIR $L $LIBS"
81 # Check if yywrap is defined in toolkit, and add $LEXLIB to LIBS if not.
83 AC_CHECK_LIB(tsdistk, yywrap, YYWRAP="yes",,$LIBDIR)
84 if test "$YYWRAP" = ""; then
88 AC_MSG_RESULT(LIBS = $LIBS)
89 AC_CONFIG_FILES([Makefile colors/Makefile doc/Makefile examples/Makefile])