diff options
author | Joe Orton <jorton@apache.org> | 2021-10-12 16:15:04 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2021-10-12 16:15:04 +0000 |
commit | 424e4ecebab9e3df6fe25c1507cc4093bc00f715 (patch) | |
tree | dc1ba802d96df11b49a107375d5b18d66a761601 /build | |
parent | 9bfcf1e678c69ca5e2d734590e704346e6508468 (diff) | |
download | apr-424e4ecebab9e3df6fe25c1507cc4093bc00f715.tar.gz |
Since runtime SCTP detection is dependent on kernel configuration, add
flags to make SCTP support reliable:
* build/apr_network.m4 (APR_CHECK_SCTP): Add --disable-sctp flag to
forcibly disable SCTP support, and --enable-sctp to fail configure
if is SCTP support is requested but not available.
Submitted by: Lubos Uhliarik <luhliari redhat.com>, jorton
Github: closes #28
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894167 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build')
-rw-r--r-- | build/apr_network.m4 | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/build/apr_network.m4 b/build/apr_network.m4 index 55552b5be..2e446957e 100644 --- a/build/apr_network.m4 +++ b/build/apr_network.m4 @@ -906,8 +906,16 @@ dnl check for presence of SCTP protocol support dnl AC_DEFUN([APR_CHECK_SCTP], [ - AC_CACHE_CHECK([whether SCTP is supported], [apr_cv_sctp], [ - AC_TRY_RUN([ +AC_ARG_ENABLE([sctp], + APR_HELP_STRING([--disable-sctp], [disable SCTP protocol support]), + [apr_wants_sctp=$enableval], + [apr_wants_sctp=any]) + +if test "$apr_wants_sctp" = no; then + apr_cv_sctp=no +else + AC_CACHE_CHECK([whether SCTP is supported], [apr_cv_sctp], [ + AC_TRY_RUN([ #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif @@ -932,6 +940,11 @@ int main(void) { exit(2); exit(0); }], [apr_cv_sctp=yes], [apr_cv_sctp=no], [apr_cv_sctp=no])]) +fi + +if test "${apr_wants_sctp}X${apr_cv_sctp}" = yesXno; then + AC_MSG_ERROR([SCTP support requested but not available]) +fi if test "$apr_cv_sctp" = "yes"; then have_sctp=1 |