From: Pieter Lexis Date: Tue, 21 Jul 2015 07:46:11 +0000 (+0200) Subject: Auth: Don't call `hostname` on Solaris/SunOS X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~43^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e29fc8f0984fdec4ff3ae2e56bf0ed9623cef7c;p=pdns Auth: Don't call `hostname` on Solaris/SunOS --- diff --git a/m4/pdns_enable_reproducible.m4 b/m4/pdns_enable_reproducible.m4 index 53c13a164..cad5f2e6c 100644 --- a/m4/pdns_enable_reproducible.m4 +++ b/m4/pdns_enable_reproducible.m4 @@ -12,7 +12,13 @@ AC_DEFUN([PDNS_ENABLE_REPRODUCIBLE], [ AC_DEFINE([REPRODUCIBLE], [1], [Define to 1 for reproducible builds]) ],[ build_user=m4_esyscmd_s(id -u -n) - build_host=m4_esyscmd_s(hostname -f || hostname) + AS_IF([test x"$host_os" = "xSunOS"],[ + build_host_host=m4_esyscmd_s(hostname) + build_host_domain=m4_esyscmd_s(domainname) + build_host="$build_host_host.$build_host_domain" + ],[ + build_host=m4_esyscmd_s(hostname -f || hostname || echo 'localhost') + ]) AC_DEFINE_UNQUOTED([BUILD_HOST], ["$build_user@$build_host"], [Set to the user and host that builds PowerDNS]) ]) ])