-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
99 lines (81 loc) · 2.87 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
dnl Process this file with autoconf to produce a configure script.
AC_INIT([rsl],[v1.50])
AC_CONFIG_SRCDIR(volume.c)
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS(config.h)
dnl Default for GVS and friends.
AC_PREFIX_DEFAULT(/usr/local/trmm)
dnl Checks for programs.
AC_PROG_CC
LT_INIT
AC_PROG_YACC
AM_PROG_LEX
AC_PROG_LN_S
AC_PROG_RANLIB
dnl Checks for header files.
m4_warn([obsolete],
[The preprocessor macro 'STDC_HEADERS' is obsolete.
Except in unusual embedded environments, you can safely include all
C89 headers unconditionally.])dnl
# Autoupdate added the next two lines to ensure that your configure
# script's behavior did not change. They are probably safe to remove.
AC_CHECK_INCLUDES_DEFAULT
AC_PROG_EGREP
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h malloc.h strings.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_STRUCT_TM
dnl Checks for library functions.
dnl AC_FUNC_SETVBUF_REVERSED
AC_CHECK_FUNCS(mktime strdup strstr)
dnl 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
don't want LASSEN.])
dnl Checks for libraries.
if test $prefix = NONE; then
prefix=$ac_default_prefix
fi
LIBDIR="-L$prefix/lib"
LIBS="-lz -lm -lbz2 -ltirpc"
# The order of the libraries is important.
# This works:
# -lrsl -limplode -letor -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)
# Because -letor may depend on RSL being installed, just check for
# the library libetor.a in a couple of places.
dnl For autoheader, generate template for HAVE_LIBETOR.
AH_TEMPLATE(HAVE_LIBETOR,[For EDGE capability. Change this
to '#define HAVE_LIBETOR 1', if you have libetor -- the EDGE decoding
library.])
L=""
if test "$L" = ""; then # Check for the file directly.
AC_CHECK_FILE($prefix/lib/libetor.a, L="-letor -lrsl -letor"; AC_DEFINE(HAVE_LIBETOR))
fi
if test "$L" = ""; then # Check for the file directly.
AC_CHECK_FILE(/usr/local/lib/libetor.a, L="-letor -lrsl -letor"; AC_DEFINE(HAVE_LIBETOR))
fi
if test "$L" != ""; then # libetor exists.
LIBS="$LIBDIR $L $LIBS"
else
LIBS="$LIBDIR $LIBS"
fi
# 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 colors/Makefile doc/Makefile examples/Makefile
wsr88d_decode_ar2v/Makefile])
AC_OUTPUT