forked from cruzdb/zlog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
51 lines (38 loc) · 1.17 KB
/
configure.ac
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
AC_PREREQ(2.59)
AC_INIT([zlog], [0.1.0], [noahwatkins@gmail.com])
AM_PROG_AR
AC_PROG_LIBTOOL
AC_PROG_CXX
AC_LANG([C++])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AX_CXX_COMPILE_STDCXX_11([],[mandatory])
BOOST_REQUIRE([1.46])
BOOST_ASIO
BOOST_BIND
BOOST_SYSTEM
BOOST_PROGRAM_OPTIONS
PKG_CHECK_MODULES(PROTOBUF, protobuf >= 2.4.0)
AC_SUBST(PROTOBUF_LIBS)
AC_SUBST(PROTOBUF_CFLAGS)
AC_SUBST(PROTOBUF_VERSION)
AC_CHECK_PROG([PROTOC], [protoc], [protoc])
AS_IF([test "x${PROTOC}" == "x"],
[AC_MSG_ERROR([ProtoBuf compiler "protoc" not found.])])
AC_CHECK_LIB([rados], [rados_version],, [AC_MSG_FAILURE([librados not found])])
AC_CHECK_HEADER([rados/librados.hpp],, [AC_MSG_FAILURE([librados.hpp not found])])
AC_LANG([C++])
SAVED_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -lcls_zlog_client"
AC_LINK_IFELSE([
AC_LANG_PROGRAM(
[#include <rados/cls_zlog_client.h>],
[void (*p)(librados::ObjectWriteOperation&, uint64_t); p = zlog::cls_zlog_seal;])
], [], [AC_MSG_FAILURE([libcls_zlog_client not found])])
LDFLAGS=$SAVED_LDFLAGS
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT