]> git.ipfire.org Git - thirdparty/pdns.git/blame_incremental - configure.ac
add ED448 to signers unit test
[thirdparty/pdns.git] / configure.ac
... / ...
CommitLineData
1AC_PREREQ([2.61])
2
3AC_INIT([pdns], m4_esyscmd([build-aux/gen-version]))
4
5AC_CONFIG_SRCDIR([pdns/receiver.cc])
6AC_CONFIG_MACRO_DIR([m4])
7AC_CONFIG_HEADERS([config.h])
8AC_CONFIG_AUX_DIR([build-aux])
9
10AC_SUBST([pdns_configure_args], ["$ac_configure_args"])
11AC_DEFINE_UNQUOTED([PDNS_CONFIG_ARGS],
12 ["$pdns_configure_args"],
13 [pdns configure arguments]
14)
15
16AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip tar-ustar -Wno-portability subdir-objects parallel-tests 1.11])
17AM_SILENT_RULES([yes])
18
19AC_CANONICAL_HOST
20: ${CFLAGS="-Wall -g -O2"}
21: ${CXXFLAGS="-Wall -g -O2"}
22
23AC_PROG_CC
24AM_PROG_CC_C_O
25PDNS_CHECK_BISON
26PDNS_CHECK_FLEX
27AC_PROG_INSTALL
28AC_PROG_MAKE_SET
29
30AC_PROG_CXX
31AS_IF([test "x$CXX" = "xno" || test "x$CXX:x$GXX" = "xg++:x"],
32 AC_MSG_ERROR([no C++ compiler found])
33)
34
35AC_LANG([C++])
36
37AC_DEFINE([_GNU_SOURCE], [1],
38 [Define _GNU_SOURCE so that we get all necessary prototypes]
39)
40
41# Warn when pkg.m4 is missing
42m4_pattern_forbid([^_?PKG_[A-Z_]+$], [*** pkg.m4 missing, please install pkg-config])
43
44PDNS_CHECK_OS
45
46PDNS_WITH_LUAJIT
47AS_IF([test "x$with_luajit" = "xno"], [
48 PDNS_WITH_LUA
49])
50PDNS_CHECK_LUA_HPP
51
52AX_CXX_COMPILE_STDCXX_11
53
54AC_MSG_CHECKING([whether we will enable compiler security checks])
55AC_ARG_ENABLE([hardening],
56 [AS_HELP_STRING([--disable-hardening], [disable compiler security checks @<:@default=no@:>@])],
57 [enable_hardening=$enableval],
58 [enable_hardening=yes]
59)
60AC_MSG_RESULT([$enable_hardening])
61
62AS_IF([test "x$enable_hardening" != "xno"], [
63 AC_CC_PIE
64 AC_CC_STACK_PROTECTOR
65 AC_CC_PARAM_SSP_BUFFER_SIZE([4])
66 AC_CC_D_FORTIFY_SOURCE
67 AC_LD_RELRO
68])
69
70PDNS_CHECK_NETWORK_LIBS
71
72LT_PREREQ([2.2.2])
73LT_INIT([disable-static dlopen])
74
75
76MC_TM_GMTOFF
77
78# Define full_libdir to be the fully expanded (${exec_prefix}, etc.)
79# "system" library path.
80# We use this to search for other libraries.
81eval full_libdir="\"$libdir\""
82
83# detect pkg-config explicitly
84PKG_PROG_PKG_CONFIG
85
86AC_CHECK_HEADERS(
87 [sys/mman.h],
88 [AC_CHECK_FUNC(
89 [mmap],
90 [AC_DEFINE(HAVE_MMAP, [1], [Define to 1 if you have mmap])],
91 [have_mmap=no]
92 )],
93 [have_mmap=no]
94)
95
96PDNS_ENABLE_BOTAN
97PDNS_CHECK_LIBSODIUM
98PDNS_CHECK_LIBDECAF
99PDNS_CHECK_LIBCRYPTO([
100],[
101 AC_MSG_ERROR([OpenSSL/libcrypto not found])
102 ]
103)
104PDNS_CHECK_LIBCRYPTO_ECDSA
105
106PDNS_CHECK_RAGEL
107PDNS_CHECK_CLOCK_GETTIME
108
109BOOST_REQUIRE([1.35])
110# Boost accumulators, as used by dnsbulktest and dnstcpbench, need 1.48+
111# to be compatible with C++11
112AM_CONDITIONAL([HAVE_BOOST_GE_148], [test "$boost_major_version" -ge 148])
113
114BOOST_PROGRAM_OPTIONS([mt])
115AS_IF([test "$boost_cv_lib_program_options" = "no"], [
116 AC_MSG_ERROR([Boost Program Options library not found])
117])
118PDNS_ENABLE_UNIT_TESTS
119PDNS_ENABLE_REPRODUCIBLE
120
121PDNS_WITH_SQLITE3
122
123PDNS_CHECK_PANDOC
124PDNS_FROM_GIT
125
126dnl Checks for library functions.
127AC_CHECK_FUNCS_ONCE([strcasestr localtime_r recvmmsg])
128
129AM_CONDITIONAL([HAVE_RECVMMSG], [test "x$ac_cv_func_recvmmsg" = "xyes"])
130
131AS_IF([test "x$lt_cv_dlopen" = "xno"],
132 [AC_MSG_ERROR([Your system does not support dlopen])]
133)
134
135AC_SUBST([LIBDL], [$lt_cv_dlopen_libs])
136
137PDNS_ENABLE_VERBOSE_LOGGING
138PDNS_ENABLE_PKCS11
139PDNS_ENABLE_GSS_TSIG
140
141AC_SUBST([socketdir])
142socketdir="/var/run"
143AC_ARG_WITH([socketdir],
144 [AS_HELP_STRING([--with-socketdir], [where the controlsocket lives @<:@default=/var/run@:>@])],
145 [socketdir="$withval"]
146)
147
148modules="bind gmysql random"
149AC_ARG_WITH([modules],
150 [AS_HELP_STRING([--with-modules], [which backends to compile with @<:@default=bind gmysql random@:>@])],
151 [modules="$withval"]
152)
153
154dynmodules="pipe"
155AC_ARG_WITH([dynmodules],
156 [AS_HELP_STRING([--with-dynmodules], [which backends to build for dynamic loading @<:@default=pipe@:>@])],
157 [dynmodules="$withval"]
158)
159
160AC_SUBST([moduledirs])
161AC_SUBST([moduleobjects])
162AC_SUBST([modulelibs])
163AC_DEFINE_UNQUOTED([PDNS_MODULES], "$modules", [Built-in modules])
164
165AS_IF([test x"$modules" = "xno"], [modules=""])
166AS_IF([test x"$dynmodules" = "xno"], [dynmodules=""])
167
168for a in $modules $dynmodules; do
169 case "$a" in
170 oracle|goracle)
171 PDNS_WITH_ORACLE
172 needoracle=yes
173 ;;
174 godbc)
175 PDNS_WITH_UNIXODBC
176 ;;
177 mydns|gmysql|pdns)
178 PDNS_WITH_MYSQL
179 ;;
180 gpgsql)
181 PDNS_WITH_POSTGRESQL
182 ;;
183 gsqlite3)
184 needsqlite3=yes
185 ;;
186 ldap)
187 PDNS_CHECK_LDAP
188 needldap=yes
189 ;;
190 opendbx)
191 PDNS_CHECK_OPENDBX
192 ;;
193 remote)
194 AS_IF([test "x$enable_unit_tests" = "xyes"],
195 [PDNS_CHECK_CURL_PROGRAM]
196 )
197 have_remotebackend=yes
198 ;;
199 tinydns)
200 PDNS_CHECK_CDB
201 ;;
202 geoip)
203 PDNS_CHECK_GEOIP
204 ;;
205 lua)
206 AS_IF([test "x$with_lua" = "xno"],
207 AC_MSG_ERROR([Lua backend needs lua, run ./configure --with-lua])
208 )
209 AS_IF([test "x$LUAPC" = "x" -a "x$LUAJITPC" = "x"],
210 AC_MSG_ERROR([Lua backend needs lua but we cannot find it])
211 )
212 ;;
213 esac
214done
215
216PDNS_ENABLE_REMOTEBACKEND_ZEROMQ
217
218AC_MSG_CHECKING([whether we will be building and installing the extra tools])
219AC_ARG_ENABLE([tools],
220 [AS_HELP_STRING([--enable-tools], [if we should build and install the tools @<:@default=no@:>@])],
221 [enable_tools=$enableval],
222 [enable_tools=no]
223)
224
225AC_MSG_RESULT([$enable_tools])
226AM_CONDITIONAL([TOOLS], [test "x$enable_tools" != "xno"])
227
228PDNS_WITH_PROTOBUF
229
230
231AM_CONDITIONAL([ORACLE], [test "x$needoracle" = "xyes"])
232
233AM_CONDITIONAL([LDAP], [test "x$needldap" = "xyes"])
234
235PDNS_CHECK_SQLITE3
236AM_CONDITIONAL([SQLITE3], [test "x$needsqlite3" = "xyes"])
237
238for a in $modules; do
239 AC_MSG_CHECKING([whether we can build module "${a}"])
240 if [[ -d "$srcdir/modules/${a}backend" ]]; then
241 AC_MSG_RESULT([yes])
242 moduledirs="$moduledirs ${a}backend"
243
244 for b in `cat $srcdir/modules/${a}backend/OBJECTFILES`; do
245 moduleobjects="$moduleobjects ../modules/${a}backend/$b"
246 done
247 modulelibs="$modulelibs `cat $srcdir/modules/${a}backend/OBJECTLIBS`"
248 else
249 AC_MSG_RESULT([no])
250 AC_MSG_ERROR([Do not know how to build module "$a", "$srcdir/modules/${a}backend" does not exist! Please review --with-modules parameter for supported values.])
251 fi
252done
253
254for a in $dynmodules; do
255 AC_MSG_CHECKING([whether we can build dynamic module "${a}"])
256 if [[ -d "$srcdir/modules/${a}backend" ]]; then
257 AC_MSG_RESULT([yes])
258 moduledirs="$moduledirs ${a}backend"
259 else
260 AC_MSG_RESULT([no])
261 AC_MSG_ERROR([Do not know how to build module "$a", "$srcdir/modules/${a}backend" does not exist! Please review --with-dynmodules parameter for supported values.])
262 fi
263done
264
265AX_AVAILABLE_SYSTEMD
266AM_CONDITIONAL([HAVE_SYSTEMD], [ test x"$systemd" = "xy" ])
267
268LDFLAGS="$RELRO_LDFLAGS $LDFLAGS"
269
270CFLAGS="$PIE_CFLAGS $CFLAGS"
271CXXFLAGS="$PIE_CFLAGS $CXXFLAGS"
272PROGRAM_LDFLAGS="$PIE_LDFLAGS $PROGRAM_LDFLAGS"
273AC_SUBST([PROGRAM_LDFLAGS])
274
275PDNS_ENABLE_COVERAGE
276PDNS_ENABLE_SANITIZERS
277PDNS_ENABLE_MALLOC_TRACE
278
279AC_SUBST(LIBS)
280
281AC_SUBST([AM_CPPFLAGS],
282 ["AS_ESCAPE([-I$(top_builddir) -I$(top_srcdir)]) $THREADFLAGS $BOOST_CPPFLAGS"]
283)
284
285AC_SUBST([YAHTTP_CFLAGS], ['-I$(top_srcdir)/ext/yahttp'])
286AC_SUBST([YAHTTP_LIBS], ['$(top_builddir)/ext/yahttp/yahttp/libyahttp.la'])
287
288CXXFLAGS="$SANITIZER_FLAGS $CXXFLAGS"
289
290AC_ARG_VAR(PACKAGEVERSION, [The version used in secpoll queries])
291AS_IF([test "x$PACKAGEVERSION" != "x"],
292 [AC_DEFINE_UNQUOTED([PACKAGEVERSION], "$PACKAGEVERSION", [Set to the package version used for secpoll])]
293)
294
295export moduledirs moduleobjects modulelibs
296
297AC_CONFIG_FILES([
298 Makefile
299 modules/Makefile
300 pdns/Makefile
301 codedocs/Makefile
302 docs/Makefile
303 pdns/pdns.init
304 ext/Makefile
305 ext/yahttp/Makefile
306 ext/yahttp/yahttp/Makefile
307 ext/json11/Makefile
308 modules/bindbackend/Makefile
309 modules/geoipbackend/Makefile
310 modules/gmysqlbackend/Makefile
311 modules/godbcbackend/Makefile
312 modules/goraclebackend/Makefile
313 modules/gpgsqlbackend/Makefile
314 modules/gsqlite3backend/Makefile
315 modules/ldapbackend/Makefile
316 modules/luabackend/Makefile
317 modules/mydnsbackend/Makefile
318 modules/opendbxbackend/Makefile
319 modules/oraclebackend/Makefile
320 modules/pipebackend/Makefile
321 modules/randombackend/Makefile
322 modules/remotebackend/Makefile
323 modules/tinydnsbackend/Makefile
324])
325AC_OUTPUT
326
327AC_MSG_NOTICE([])
328AC_MSG_NOTICE([Configuration summary])
329AC_MSG_NOTICE([=====================])
330AC_MSG_NOTICE([])
331AC_MSG_NOTICE([Configured with: $pdns_configure_args])
332AC_MSG_NOTICE([])
333AC_MSG_NOTICE([CC: $CC])
334AC_MSG_NOTICE([CXX: $CXX])
335AC_MSG_NOTICE([LD: $LD])
336AC_MSG_NOTICE([CFLAGS: $CFLAGS])
337AC_MSG_NOTICE([CPPFLAGS: $CPPFLAGS])
338AC_MSG_NOTICE([CXXFLAGS: $CXXFLAGS])
339AC_MSG_NOTICE([LDFLAGS: $LDFLAGS])
340AC_MSG_NOTICE([LIBS: $LIBS])
341AC_MSG_NOTICE([BOOST_CPPFLAGS: $BOOST_CPPFLAGS])
342AC_MSG_NOTICE([])
343AC_MSG_NOTICE([Features enabled])
344AC_MSG_NOTICE([----------------])
345AC_MSG_NOTICE([Built-in modules: $modules])
346AC_MSG_NOTICE([Dynamic modules: $dynmodules])
347AC_MSG_NOTICE([])
348AS_IF([test "x$libcrypto_ecdsa" = "xyes"],
349 [AC_MSG_NOTICE([OpenSSL ecdsa: yes])],
350 [AC_MSG_NOTICE([OpenSSL ecdsa: no])]
351)
352AS_IF([test "x$LIBSODIUM_LIBS" != "x" || test "x$LIBDECAF_LIBS" != "x"],
353 [AC_MSG_NOTICE([ed25519: yes])],
354 [AC_MSG_NOTICE([ed25519: no])]
355)
356AS_IF([test "x$LIBDECAF_LIBS" != "x"],
357 [AC_MSG_NOTICE([ed448: yes])],
358 [AC_MSG_NOTICE([ed448: no])]
359)
360AS_IF([test "x$needsqlite3" != "x"],
361 [AC_MSG_NOTICE([SQLite3: yes])],
362 [AC_MSG_NOTICE([SQLite3: no])]
363)
364AS_IF([test "x$LUAPC" != "x"],
365 [AC_MSG_NOTICE([Lua: $LUAPC])],
366 [AS_IF([test "x$LUAJITPC" != "x"],
367 [AC_MSG_NOTICE([LuaJit: $LUAJITPC])],
368 [AC_MSG_NOTICE([Lua/LuaJit: no])])
369])
370AS_IF([test "x$enable_experimental_gss_tsig" = "xyes"],
371 [AC_MSG_NOTICE([GSS-TSIG: yes])]
372)
373AS_IF([test "x$systemd" != "xn"],
374 [AC_MSG_NOTICE([systemd: yes])],
375 [AC_MSG_NOTICE([systemd: no])]
376)
377AS_IF([test "x$enable_remotebackend_zeromq" != "xno"],
378 [AC_MSG_NOTICE([ZeroMQ connector for remotebackend: yes])]
379)
380AC_MSG_NOTICE([])