-
Notifications
You must be signed in to change notification settings - Fork 5
/
configure.ac
59 lines (48 loc) · 1.76 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
52
53
54
55
56
57
58
59
AC_INIT([democrit], [0.1])
AM_INIT_AUTOMAKE([subdir-objects])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AM_SILENT_RULES([yes])
AC_PROG_CXX
AM_PROG_AR
AM_PATH_PYTHON([3.7])
PKG_INSTALLDIR
LT_INIT
AC_LANG([C++])
AX_CXX_COMPILE_STDCXX([14], [noext])
AX_CHECK_COMPILE_FLAG([-Wall], [CXXFLAGS+=" -Wall"])
AX_CHECK_COMPILE_FLAG([-Werror], [CXXFLAGS+=" -Werror"])
AX_CHECK_COMPILE_FLAG([-pedantic], [CXXFLAGS+=" -pedantic"])
# Windows defines ERROR, which requires us to tell glog to not define
# it as abbreviated log severity (LOG(ERROR) still works, though, and
# that is all that we actually use in the code).
# See https://hpc.nih.gov/development/glog.html.
CXXFLAGS+=" -DGLOG_NO_ABBREVIATED_SEVERITIES"
# Public dependencies exposed in the headers.
AX_PKG_CHECK_MODULES([JSON], [jsoncpp], [])
AX_PKG_CHECK_MODULES([XAYAGAME], [libxayautil libxayagame], [])
AX_PKG_CHECK_MODULES([PROTOBUF], [protobuf], [])
# Private dependencies for the library parts.
AX_PKG_CHECK_MODULES([SQLITE], [], [sqlite3])
AX_PKG_CHECK_MODULES([GLOG], [], [libglog])
AX_PKG_CHECK_MODULES([CHARON], [], [charon gloox])
# Private dependencies for tests and binaries only.
PKG_CHECK_MODULES([JSONRPCCPPCLIENT], [libjsonrpccpp-client])
PKG_CHECK_MODULES([JSONRPCCPPSERVER], [libjsonrpccpp-server])
PKG_CHECK_MODULES([GFLAGS], [gflags])
PKG_CHECK_MODULES([GTEST], [gmock gtest_main])
# FIXME: We need the Charon installation prefix, since we want to
# access the testenv.pem certificate installed there. For now, we
# just assume it is the default /usr/local, but ideally we should detect
# it for Charon itself.
AC_SUBST(CHARON_PREFIX, /usr/local)
AC_CONFIG_FILES([
Makefile \
gsp/Makefile \
nonfungible/Makefile \
src/Makefile \
tests/Makefile
])
AC_OUTPUT
echo
echo "CXXFLAGS: ${CXXFLAGS}"