From: W.C.A. Wijngaards Date: Fri, 25 Jun 2021 08:37:47 +0000 (+0200) Subject: - Fix configure grep for reuseport default for failure. X-Git-Tag: release-1.13.2rc1~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57e3d5da611ab99bcb9736226ed4aa8233b04936;p=thirdparty%2Funbound.git - Fix configure grep for reuseport default for failure. --- diff --git a/configure b/configure index 170386901..2f75ef782 100755 --- a/configure +++ b/configure @@ -4206,7 +4206,7 @@ esac # are we on MinGW? if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes" else - if echo $host $target | grep mingw >/dev/null; then on_mingw="yes" + if echo $host | grep mingw >/dev/null; then on_mingw="yes" else on_mingw="no"; fi fi @@ -16195,7 +16195,10 @@ done # check if we can use SO_REUSEPORT -if echo "$host" | $GREP -i -e linux -e dragonfly >/dev/null; then +reuseport_default=0 +if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi +if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi +if test "$reuseport_default" = 1; then $as_echo "#define REUSEPORT_DEFAULT 1" >>confdefs.h diff --git a/configure.ac b/configure.ac index d0e55194b..8bf9b6b15 100644 --- a/configure.ac +++ b/configure.ac @@ -490,7 +490,10 @@ ACX_MKDIR_ONE_ARG AC_CHECK_FUNCS([strptime],[AC_CHECK_STRPTIME_WORKS],[AC_LIBOBJ([strptime])]) # check if we can use SO_REUSEPORT -if echo "$host" | $GREP -i -e linux -e dragonfly >/dev/null; then +reuseport_default=0 +if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi +if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi +if test "$reuseport_default" = 1; then AC_DEFINE(REUSEPORT_DEFAULT, 1, [if REUSEPORT is enabled by default]) else AC_DEFINE(REUSEPORT_DEFAULT, 0, [if REUSEPORT is enabled by default])