-
Notifications
You must be signed in to change notification settings - Fork 22
/
configure.ac
80 lines (59 loc) · 1.87 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
AC_INIT([metronome], m4_esyscmd(builder/gen-version))
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip tar-ustar -Wno-portability subdir-objects parallel-tests 1.11])
AM_SILENT_RULES([yes])
AC_CONFIG_SRCDIR([metronome.cc])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_HOST
: ${CFLAGS="-Wall -g -O2"}
: ${CXXFLAGS="-Wall -g -O2"}
AC_PROG_CXX
AS_IF([test "x$CXX" = "xno" || test "x$CXX:x$GXX" = "xg++:x"],
AC_MSG_ERROR([no C++ compiler found])
)
AX_CXX_COMPILE_STDCXX_11(ext,mandatory)
AC_PROG_LIBTOOL
#AC_LANG([C++])
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_DEFINE([_GNU_SOURCE], [1],
[Define _GNU_SOURCE so that we get all necessary prototypes]
)
# Warn when pkg.m4 is missing
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
PDNS_CHECK_OS
METRONOME_WITH_EIGEN
BOOST_REQUIRE([1.35])
BOOST_PROGRAM_OPTIONS([mt])
AX_AVAILABLE_SYSTEMD
AM_CONDITIONAL([HAVE_SYSTEMD], [ test x"$systemd" = "xy" ])
AC_MSG_CHECKING([whether we should enable hardening])
AC_ARG_ENABLE([hardening],
[AS_HELP_STRING([--disable-hardening],[disable compiler security checks @<:@default=no@:>@])],
[enable_hardening=$enableval],
[enable_hardening=yes]
)
AC_MSG_RESULT([$enable_hardening])
AS_IF([test "x$enable_hardening" != "xno"], [
AC_CC_PIE
AC_CC_STACK_PROTECTOR
AC_CC_PARAM_SSP_BUFFER_SIZE([4])
AC_CC_D_FORTIFY_SOURCE
AC_LD_RELRO
])
PDNS_ENABLE_SANITIZERS
PDNS_ENABLE_MALLOC_TRACE
AC_SUBST(LIBS)
AC_SUBST([AM_CPPFLAGS],
["AS_ESCAPE([-I$(top_builddir) -I$(top_srcdir)]) $THREADFLAGS $BOOST_CPPFLAGS"]
)
AC_SUBST([YAHTTP_CFLAGS], ['-I$(top_srcdir)/yahttp/yahttp'])
AC_SUBST([YAHTTP_LIBS], ['-L$(top_builddir)/yahttp/yahttp -lyahttp'])
CXXFLAGS="$SANITIZER_FLAGS $CXXFLAGS"
LDFLAGS="$RELRO_LDFLAGS $LDFLAGS"
AC_SUBST([PROGRAM_LDFLAGS])
AC_CONFIG_FILES([Makefile
yahttp/Makefile
yahttp/yahttp/Makefile])
AC_OUTPUT