forked from sit/dht
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
107 lines (91 loc) · 2.59 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
100
101
102
103
104
105
106
107
dnl
dnl Process this file with autoconf to produce a configure script.
dnl
AC_INIT(acinclude.m4)
AM_INIT_AUTOMAKE(chord, 0.1)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_PATH_PROGS(M4, gm4 gnum4 m4, '$(top_srcdir)/missing')
AC_ARG_ENABLE(vis,dnl
[--disable-vis do not build Chord visualizer],,
[test -z "${enable_vis}" && enable_vis=yes])
if test "${enable_vis}" = yes ; then
dnl Check for GTK and allow conditional Makefile.am statements
PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 2.0,, AC_MSG_WARN([You don't have GTK. Vis won't be built]))
AC_SUBST(GSTUFF_CFLAGS)
AC_SUBST(GSTUFF_LIBS)
fi
AM_CONDITIONAL(GTK_AVAILABLE, test "$GSTUFF_CFLAGS")
SFS_WFLAGS
AC_PROG_INSTALL
AC_PROG_LN_S
#AC_PROG_RANLIB
AM_DISABLE_SHARED
test -z "$target" && target=NONE
AM_PROG_LIBTOOL
SFS_TAG
SFS_SFS
SFS_CFLAGS
dnl setup BerkeleyDB
SFS_SLEEPYCAT(4.6 4.5 4.4 4.3 4.2 4.0 4 3)
AC_SUBST(DBLIB)
AC_SUBST(DBDEPS)
if test "${with_db}" != no; then
CPPFLAGS="$CPPFLAGS -DSLEEPYCAT"
DBLIB="$DBLIB $DB_LIB"
else
AC_MSG_ERROR("Sleepycat is required to build");
fi
dnl Make sure we have a mesg_buf capable libarpc
AC_MSG_CHECKING(for a good aclnt.h)
AC_EGREP_HEADER(rpccb_msgbuf,
aclnt.h,
AC_MSG_RESULT(found),
AC_MSG_ERROR(aclnt.h that defines rpccb_msgbuf not found. Install the latest build of SFSlite.)
)
dnl Make sure we have sfscrypt.h
AC_MSG_CHECKING(for sfscrypt.h)
AC_EGREP_HEADER(sfspriv,
sfscrypt.h,
AC_MSG_RESULT(found),
AC_MSG_ERROR(new style sfscrypt not found. Install the latest build of SFSlite.)
)
new_LDFLAGS=
for flag in $LDFLAGS; do
if test x"$flag" = x-static; then
new_LDFLAGS="$new_LDFLAGS -all-static"
else
new_LDFLAGS="$new_LDFLAGS $flag"
fi
done
LDFLAGS="$new_LDFLAGS"
dnl let directories share header files
for lib in utils merkle chord dhash svc lsd paxos; do
CPPFLAGS="-I"'$(top_srcdir)'"/$lib $CPPFLAGS"
done
CPPFLAGS="-I"'$(top_builddir)'"/svc $CPPFLAGS"
dnl Auxilliary files in chord specific subdirs.
if test -z "$chordlibdir"; then
chordlibdir='${pkglibdir}-${VERSION}'
fi
AC_SUBST(chordlibdir)
if test -z "$chorddatadir"; then
chorddatadir='${pkgdatadir}-${VERSION}'
fi
AC_SUBST(chordincludedir)
if test -z "$chordincludedir"; then
chordincludedir='${pkgincludedir}-${VERSION}'
fi
AC_SUBST(chorddatadir)
chordexecdir="$chordlibdir"
AC_SUBST(chordexecdir)
ETAGS_ARGS='-C /dev/null'
AC_SUBST(ETAGS_ARGS)
AC_OUTPUT(Makefile svc/Makefile utils/Makefile
dhash/Makefile maint/Makefile lsd/Makefile
merkle/Makefile chord/Makefile
tools/Makefile paxos/Makefile)