@@ -113,10 +113,22 @@ AC_CHECK_HEADER([microhttpd.h],
113113CXXFLAGS="-DHTTPSERVER_COMPILATION -D_REENTRANT $LIBMICROHTTPD_CFLAGS $CXXFLAGS"
114114LDFLAGS="$LIBMICROHTTPD_LIBS $REGEX_LIBS $LD_FLAGS"
115115
116- if test x"$is_windows" = x"no"; then
117- if test `uname -r |cut -d. -f1` -ge 3; then
118- if test `uname -r |cut -d. -f2` -ge 7; then
119- CXXFLAGS="-DUSE_FASTOPEN $CXXFLAGS"
116+ AC_MSG_CHECKING ( [ whether to build with TCP_FASTOPEN support] )
117+ AC_ARG_ENABLE ( [ fastopen] ,
118+ [ AS_HELP_STRING ( [ --enable-fastopen] ,
119+ [ enable use of TCP_FASTOPEN (def=yes)] ) ] ,
120+ [ fastopen="$enableval"] ,
121+ [ fastopen=yes] )
122+ AC_MSG_RESULT ( [ $fastopen] )
123+
124+ is_fastopen_supported=no;
125+ if test x"$fastopen" = x"yes"; then
126+ if test x"$is_windows" = x"no"; then
127+ if test `uname -r |cut -d. -f1` -ge 3; then
128+ if test `uname -r |cut -d. -f2` -ge 7; then
129+ CXXFLAGS="-DUSE_FASTOPEN $CXXFLAGS";
130+ is_fastopen_supported=yes;
131+ fi
120132 fi
121133 fi
122134fi
@@ -217,4 +229,5 @@ AC_MSG_NOTICE([Configuration Summary:
217229 License : LGPL only
218230 Debug : ${debugit}
219231 TLS Enabled : ${have_gnutls}
232+ TCP_FASTOPEN : ${is_fastopen_supported}
220233] )
0 commit comments