-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
92 lines (83 loc) · 3.53 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
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
AC_INIT([jmx_log_parser], [0.0.0], [[email protected]])
AM_INIT_AUTOMAKE([foreign -Wall -Werror -Wno-portability -Wno-unsupported])
AC_PROG_CXX
AM_PROG_AR
AC_CONFIG_MACRO_DIR([m4])
AC_ENABLE_STATIC(no)
AC_PROG_LIBTOOL
AM_CONDITIONAL(is_x86_64, [ test "$HOSTTYPE" = x86_64 ])
AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [enable debug @<:@default=no@:>@])], [ if test "${enable_debug:-no}" != no; then CXXFLAGS="${CXXFLAGS} -Wall -Wnon-virtual-dtor -g -O0 -fno-inline -std=c++1y"; fi ], [CXXFLAGS="${CXXFLAGS} -Wall -Wnon-virtual-dtor -DNDEBUG=1 -O2 -std=c++1y"])
AC_PREFIX_DEFAULT([/usr])
AC_CONFIG_COMMANDS_PRE([
if test "$sysconfdir" = '${prefix}/etc'; then sysconfdir=/etc; fi;
if test "$localstatedir" = '${prefix}/var'; then localstatedir=/var; fi
])
dnl
snippet='
ifeq ($(strip $(foreach d,$(SUBDIRS),$(wildcard $(d)/*.gcda))),)
ifeq ($(strip $(foreach d,$(SUBDIRS),$(wildcard $(d)/$(d).info))),)
coverage-am:
else
coverage-am: $(notdir $(CURDIR)).info
$(notdir $(CURDIR)).info: $(foreach d,$(SUBDIRS),$(wildcard $(d)/$(d).info))
if ! test -r $@; then \
lcovargs=""; \
else \
lcovargs=" --add-tracefile $@"; \
fi; \
for p in $?; do \
if test -s $${p}; \
then \
lcovargs+=" --add-tracefile $${p}"; \
fi; \
done; \
if ! test -z "$${lcovargs}"; \
then \
lcov -q --no-external --base-directory $(top_srcdir)/src --compat libtool=on,split_crc=on --test-name $(notdir $(CURDIR)) --output-file [email protected] $${lcovargs}; \
fi; \
mv [email protected] $@
endif
else
coverage-am: $(notdir $(CURDIR)).info
ifeq ($(strip $(foreach d,$(SUBDIRS),$(wildcard $(d)/$(d).info))),)
$(notdir $(CURDIR)).info: $(foreach d,$(SUBDIRS) .libs,$(wildcard $(d)/*.gcda))
dirs=""; \
for p in $(sort $(dir $(filter %.gcda,$?))); do \
dirs+=" --directory $${p}"; \
done; \
lcov -q --no-external --base-directory $(top_srcdir)/src --compat libtool=on,split_crc=on --output-file [email protected] --capture $$dirs --test-name $(notdir $(CURDIR)); \
lcov -q --no-external --base-directory $(top_srcdir)/src --compat libtool=on,split_crc=on --output-file [email protected] --extract [email protected] "*/$(notdir $(top_srcdir))/*"; \
lcov -q --no-external --base-directory $(top_srcdir)/src --compat libtool=on,split_crc=on --output-file $@ --remove [email protected] "*/unit/*" "*/TestHelpers/*" "*/Cassandra/*"; \
else
$(notdir $(CURDIR)).info: $(foreach d,$(SUBDIRS) .libs,$(wildcard $(d)/*.gcda)) $(foreach d,$(SUBDIRS),$(wildcard $(d)/$(d).info))
dirs=""; \
for p in $(sort $(dir $(filter %.gcda,$?))); do \
dirs+=" --directory $${p}"; \
done; \
lcov -q --no-external --base-directory $(top_srcdir)/src --compat libtool=on,split_crc=on --output-file [email protected] --capture $$dirs --test-name $(notdir $(CURDIR)); \
lcov -q --no-external --base-directory $(top_srcdir)/src --compat libtool=on,split_crc=on --output-file [email protected] --extract [email protected] "*/$(notdir $(top_srcdir))/*" ; \
lcov -q --no-external --base-directory $(top_srcdir)/src --compat libtool=on,split_crc=on --output-file [email protected] --remove [email protected] "*/unit/*" "*/TestHelpers/*" "*/Cassandra/*"; \
lcovargs=" --add-tracefile [email protected]"; \
if test -r $@; then \
lcovargs=" --add-tracefile $@"; \
fi; \
for p in $(filter %.info,$?); do \
lcovargs+=" --add-tracefile $${p}"; \
done; \
lcov -q --no-external --base-directory $(top_srcdir)/src --compat libtool=on,split_crc=on --test-name $(notdir $(CURDIR)) --output-file [email protected] $$lcovargs; \
rm [email protected]; \
mv [email protected] $@
endif
endif
'
AC_SUBST([snippet])
AM_SUBST_NOTMAKE([snippet])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
src/Makefile
conf/Makefile
])
AC_OUTPUT