- Fix configure grep for reuseport default for failure.

This commit is contained in:
W.C.A. Wijngaards 2021-06-25 10:37:47 +02:00
parent 6ed49bf45f
commit 57e3d5da61
2 changed files with 9 additions and 3 deletions

7
configure vendored
View file

@ -4206,7 +4206,7 @@ esac
# are we on MinGW? # are we on MinGW?
if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes" if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes"
else 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 else on_mingw="no"; fi
fi fi
@ -16195,7 +16195,10 @@ done
# check if we can use SO_REUSEPORT # 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 $as_echo "#define REUSEPORT_DEFAULT 1" >>confdefs.h

View file

@ -490,7 +490,10 @@ ACX_MKDIR_ONE_ARG
AC_CHECK_FUNCS([strptime],[AC_CHECK_STRPTIME_WORKS],[AC_LIBOBJ([strptime])]) AC_CHECK_FUNCS([strptime],[AC_CHECK_STRPTIME_WORKS],[AC_LIBOBJ([strptime])])
# check if we can use SO_REUSEPORT # 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]) AC_DEFINE(REUSEPORT_DEFAULT, 1, [if REUSEPORT is enabled by default])
else else
AC_DEFINE(REUSEPORT_DEFAULT, 0, [if REUSEPORT is enabled by default]) AC_DEFINE(REUSEPORT_DEFAULT, 0, [if REUSEPORT is enabled by default])