Check for the libz, libbz2 and g++-4.7 before building
parent
19c4dd181b
commit
a8b81d0c43
|
@ -3,6 +3,7 @@ SHELL = /bin/bash
|
|||
PROTOC = @PROTOC@
|
||||
GO = @GO@
|
||||
GOROOT = @GOROOT@
|
||||
AUTORECONF = @AUTORECONF@
|
||||
# or 386, arm
|
||||
arch = amd64
|
||||
CGO_ENABLED = 1
|
||||
|
@ -78,7 +79,12 @@ leveldb_dir = /tmp/leveldb.influxdb.$(arch)
|
|||
leveldb_file = leveldb-$(leveldb_version).tar.gz
|
||||
leveldb_deps = $(leveldb_dir)/libleveldb.a
|
||||
|
||||
cpp_47 = $(shell sh -c test `g++ -dumpversion | awk '{print $1>=4.7?"1":"0"}'`)
|
||||
rocksdb = yes
|
||||
ifneq ($(cpp_47),1)
|
||||
rocksdb = no
|
||||
endif
|
||||
|
||||
ifeq ($(rocksdb),yes)
|
||||
# rocksdb variables
|
||||
rocksdb_version = 3.1
|
||||
|
@ -160,7 +166,7 @@ ifeq ($(uname_S),Linux)
|
|||
bash -c "cd $(hyperleveldb_dir); \
|
||||
wget https://github.com/influxdb/HyperLevelDB/archive/$(hyperleveldb_file); \
|
||||
tar --strip-components=1 -xvzf $(hyperleveldb_file); \
|
||||
autoreconf -i; \
|
||||
$(AUTORECONF) -i; \
|
||||
CFLAGS='$(cflags)' CXXFLAGS='$(cflags)' ./configure; \
|
||||
$(MAKE)"
|
||||
endif
|
||||
|
|
|
@ -2,6 +2,7 @@ AC_INIT([Influxdb], [0.3.0], [support@influxdb.com], [influxdb], [http://influxd
|
|||
AC_SUBST(PROTOC)
|
||||
AC_SUBST(GO)
|
||||
AC_SUBST(GOROOT)
|
||||
AC_SUBST(AUTORECONF)
|
||||
AC_SUBST(with_bison)
|
||||
AC_SUBST(with_flex)
|
||||
AC_PATH_PROG(PROTOC, protoc, "notfound")
|
||||
|
@ -35,6 +36,13 @@ AC_ARG_WITH([bison],
|
|||
[],
|
||||
[with_bison=])
|
||||
|
||||
AC_PATH_PROG(AUTORECONF, autoreconf, "notfound")
|
||||
if test x"${AUTORECONF}" == x"notfound"; then
|
||||
AC_MSG_ERROR([Please install autoconf before trying to build InfluxDB])
|
||||
fi
|
||||
AC_CHECK_LIB(z, gzdopen,,AC_MSG_ERROR("cannot find libz"))
|
||||
AC_CHECK_LIB(bz2, BZ2_bzReadOpen,,AC_MSG_ERROR("cannot find libbz2"))
|
||||
|
||||
if test x"${with_bison}" == x""; then
|
||||
AC_PATH_PROG(with_bison, bison, "notfound")
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue