]> Pileus Git - ~andy/rsl/blob - configure.in
RSL v1.43
[~andy/rsl] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(rsl, v1.43)
3 AC_CONFIG_SRCDIR(volume.c)
4
5 AM_INIT_AUTOMAKE
6 AM_CONFIG_HEADER(config.h)
7
8 dnl Default for GVS and friends.
9 AC_PREFIX_DEFAULT(/usr/local/trmm)
10
11 dnl Checks for programs.
12 AC_PROG_CC
13 AM_PROG_LIBTOOL
14 AC_PROG_YACC
15 AM_PROG_LEX
16 AC_PROG_LN_S
17 AC_PROG_RANLIB
18
19 dnl Checks for header files.
20 AC_HEADER_STDC
21 AC_HEADER_SYS_WAIT
22 AC_CHECK_HEADERS(fcntl.h malloc.h strings.h unistd.h)
23
24 dnl Checks for typedefs, structures, and compiler characteristics.
25 AC_C_CONST
26 AC_TYPE_SIZE_T
27 AC_STRUCT_TM
28
29 dnl Checks for library functions.
30 dnl AC_FUNC_SETVBUF_REVERSED
31 AC_CHECK_FUNCS(mktime strdup strstr)
32
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
36      don't want LASSEN.])
37
38 dnl Checks for libraries.
39 if test $prefix = NONE; then
40   prefix=$ac_default_prefix
41 fi
42 LIBDIR="-L$prefix/lib"
43 LIBS="-lz -lm"
44
45 # The order of the libraries is important.
46 # This works:
47 #   -lrsl -limplode -letor -ltsdistk -lmfhdf -ldf -ljpeg -lz -lm
48 #
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.
51
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)
57
58 # Because -letor may depend on RSL being installed, just check for
59 # the library libetor.a in a couple of places.
60
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
64     library.])
65
66 L=""
67
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))
70 fi
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))
73 fi
74
75 if test "$L" != ""; then # libetor exists.
76 LIBS="$LIBDIR $L $LIBS"
77 else
78 LIBS="$LIBDIR $LIBS"
79 fi
80
81 # Check if yywrap is defined in toolkit, and add $LEXLIB to LIBS if not.
82 YYWRAP=""
83 AC_CHECK_LIB(tsdistk,  yywrap, YYWRAP="yes",,$LIBDIR)
84 if test "$YYWRAP" = ""; then
85         LIBS="$LIBS $LEXLIB"
86 fi
87
88 AC_MSG_RESULT(LIBS = $LIBS)
89 AC_CONFIG_FILES([Makefile colors/Makefile doc/Makefile examples/Makefile])
90 AC_OUTPUT