From: Pieter Lexis Date: Wed, 17 Feb 2016 22:23:35 +0000 (+0100) Subject: Use correct command to determine hostname on illumos/openindiana X-Git-Tag: auth-4.0.0-rc1~50^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b67925ada6ddc99227a691a3cd8f745269f0de2;p=thirdparty%2Fpdns.git Use correct command to determine hostname on illumos/openindiana And detect openindiana properly --- diff --git a/m4/pdns_check_os.m4 b/m4/pdns_check_os.m4 index d18f6ebb34..88e7110682 100644 --- a/m4/pdns_check_os.m4 +++ b/m4/pdns_check_os.m4 @@ -2,7 +2,7 @@ AC_DEFUN([PDNS_CHECK_OS],[ THREADFLAGS="" case "$host_os" in - solaris2.10) + solaris2.1*) LIBS="-lposix4 -lpthread $LIBS" CXXFLAGS="-D_REENTRANT $CXXFLAGS" have_solaris="yes" diff --git a/m4/pdns_enable_reproducible.m4 b/m4/pdns_enable_reproducible.m4 index dfe35f2158..0d997d80aa 100644 --- a/m4/pdns_enable_reproducible.m4 +++ b/m4/pdns_enable_reproducible.m4 @@ -12,13 +12,17 @@ AC_DEFUN([PDNS_ENABLE_REPRODUCIBLE], [ AC_DEFINE([REPRODUCIBLE], [1], [Define to 1 for reproducible builds]) ],[ build_user=$(id -u -n) - if [ test x"$host_os" = "xSunOS" ]; then + + case "$host_os" in + solaris2.1* | SunOS) build_host_host=$(hostname) build_host_domain=$(domainname) build_host="$build_host_host.$build_host_domain" - else + ;; + *) build_host=$(hostname -f || hostname || echo 'localhost') - fi + ;; + esac AC_DEFINE_UNQUOTED([BUILD_HOST], ["$build_user@$build_host"], [Set to the user and host that builds PowerDNS]) ]) ])