]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix configure grep for reuseport default for failure.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 Jun 2021 08:37:47 +0000 (10:37 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 Jun 2021 08:37:47 +0000 (10:37 +0200)
configure
configure.ac

index 170386901f2c548ca02fce1b5c67999ceb2bbc91..2f75ef782b91eaa405818b114c67174bb90124ea 100755 (executable)
--- 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
 
index d0e55194b4e9188b872ee6c84e754fc7db185bcc..8bf9b6b156546b50d44daed2fe1f52bcb4489230 100644 (file)
@@ -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])