]> git.ipfire.org Git - thirdparty/pdns.git/blob - m4/pdns_enable_reproducible.m4
Merge pull request #2592 from zeha/secpoll-debian-345-373
[thirdparty/pdns.git] / m4 / pdns_enable_reproducible.m4
1 AC_DEFUN([PDNS_ENABLE_REPRODUCIBLE], [
2 AC_MSG_CHECKING([whether to enable reproducible builds.])
3 AC_ARG_ENABLE([reproducible],
4 AS_HELP_STRING([--enable-reproducible],
5 [Create reproducible builds. Use this only if you are a distribution maintainer and need reproducible builds. If you compile PowerDNS yourself, leave this disabled, as it might make debugging harder. @<:@default=no@:>@]),
6 [enable_reproducible=$enableval],
7 [enable_reproducible=no])
8
9 AC_MSG_RESULT($enable_reproducible)
10
11 AS_IF([test x"$enable_reproducible" = "xyes"],[
12 AC_DEFINE([REPRODUCIBLE], [1], [Define to 1 for reproducible builds])
13 ],[
14 build_user=m4_esyscmd_s(id -u -n)
15 build_host=m4_esyscmd_s(hostname -f || hostname)
16 AC_DEFINE_UNQUOTED([BUILD_HOST], ["$build_user@$build_host"], [Set to the user and host that builds PowerDNS])
17 ])
18 ])