forked from treasure-data/td-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
64 lines (51 loc) · 1.61 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
AC_INIT(lib/fluent/engine.rb)
AC_CONFIG_AUX_DIR(ac)
AM_INIT_AUTOMAKE(fluentd, 0.10.6)
AC_CHECK_LIB(z,deflate,,
AC_MSG_ERROR([zlib library not found]))
AC_CHECK_HEADERS(openssl/sha.h,,
AC_MSG_ERROR([find openssl header not found]))
AC_CHECK_LIB(crypto,SHA1,,
AC_MSG_ERROR([openssl library not found]))
#AC_CONFIG_SUBDIRS([deps/ruby])
orig_exec_prefix=$exec_prefix
orig_prefix=$prefix
if test "$prefix" = "NONE"; then
prefix=$ac_default_prefix
fi
exec_prefix=$prefix
jemalloc_prefix=`eval echo $libdir/fluent/jemalloc`
ruby_prefix=`eval echo $libdir/fluent/ruby`
libyaml_prefix=`eval echo $libdir/fluent/libyaml`
exec_prefix=$orig_exec_prefix
prefix=$orig_prefix
AC_SUBST(RUBY_PREFIX)
AC_SUBST(RUBY_BINDIR)
AC_SUBST(RUBY_LIBDIR)
RUBY_PREFIX=$ruby_prefix
RUBY_BINDIR=$ruby_prefix/bin
RUBY_LIBDIR=$ruby_prefix/lib
AC_OUTPUT([Makefile])
if test ! -d deps/jemalloc; then
mkdir -p deps/jemalloc-extract
tar jxf deps/jemalloc-*.tar.bz2 -C deps/jemalloc-extract
mv deps/jemalloc-extract/* deps/jemalloc
fi
cd deps/jemalloc && ./configure "--prefix=$jemalloc_prefix"
cd ../..
if test ! -d deps/ruby; then
mkdir -p deps/ruby-extract
tar jxf deps/ruby-*.tar.bz2 -C deps/ruby-extract
mv deps/ruby-extract/* deps/ruby
fi
cd deps/ruby && sed -i -e 's/check: test test-all/check:/' common.mk && ./configure "--prefix=$ruby_prefix" \
--disable-install-doc \
--with-out-ext=dbm \
--with-out-ext=fiddle \
--with-out-ext=gdbm \
--with-out-ext=probe \
--with-out-ext=racc \
--with-out-ext=ripper \
--with-out-ext=sdbm \
--with-out-ext=tk \
--with-libyaml-dir=$libyaml_prefix