aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2016-10-19 10:14:25 +0200
committerRaimo Niskanen <[email protected]>2016-10-19 10:14:25 +0200
commit1cf45fc0862fa86fa1bece535907c8e81309c742 (patch)
treeb782e39b9c2df6316a63de5cafb7153bbd273d04
parent7acb583c17dbfcfe2105c08f2cd125e1e88c2e4c (diff)
parentb3c46562296bb088976475141f5837f002998245 (diff)
downloadotp-1cf45fc0862fa86fa1bece535907c8e81309c742.tar.gz
otp-1cf45fc0862fa86fa1bece535907c8e81309c742.tar.bz2
otp-1cf45fc0862fa86fa1bece535907c8e81309c742.zip
Merge branch 'raimo/erts/fix-configure-to-check-in-libsct-for-sctp-funcs/ERL-262/OTP-13956' into maint
* raimo/erts/fix-configure-to-check-in-libsct-for-sctp-funcs/ERL-262/OTP-13956: Configure enable libsctp dependency Revert "Check libsctp for sctp funcs in configure.in"
-rw-r--r--configure.in7
-rw-r--r--erts/configure.in21
2 files changed, 19 insertions, 9 deletions
diff --git a/configure.in b/configure.in
index 6db83124be..a149acbb55 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
dnl %CopyrightBegin%
dnl
-dnl Copyright Ericsson AB 1998-2014. All Rights Reserved.
+dnl Copyright Ericsson AB 1998-2016. All Rights Reserved.
dnl
dnl Licensed under the Apache License, Version 2.0 (the "License");
dnl you may not use this file except in compliance with the License.
@@ -228,7 +228,10 @@ AS_HELP_STRING([--enable-kernel-poll], [enable kernel poll support])
AS_HELP_STRING([--disable-kernel-poll], [disable kernel poll support]))
AC_ARG_ENABLE(sctp,
-AS_HELP_STRING([--enable-sctp], [enable sctp support])
+AS_HELP_STRING([--enable-sctp], [enable sctp support (default)
+to on demand load the SCTP library in runtime])
+AS_HELP_STRING([--enable-sctp=lib], [enable sctp support
+to link against the SCTP library])
AS_HELP_STRING([--disable-sctp], [disable sctp support]))
AC_ARG_ENABLE(hipe,
diff --git a/erts/configure.in b/erts/configure.in
index 69b9af3c8c..4799178583 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -196,12 +196,18 @@ AS_HELP_STRING([--disable-kernel-poll], [disable kernel poll support]),
AC_ARG_ENABLE(sctp,
-AS_HELP_STRING([--enable-sctp], [enable sctp support (default)])
+AS_HELP_STRING([--enable-sctp], [enable sctp support (default)
+to on demand load the SCTP library in runtime if needed])
+AS_HELP_STRING([--enable-sctp=lib], [enable sctp support
+to link against the SCTP library])
AS_HELP_STRING([--disable-sctp], [disable sctp support]),
-[ case "$enableval" in
- no) enable_sctp=no ;;
- *) enable_sctp=yes ;;
- esac ], enable_sctp=unknown)
+[ case "x$enableval" in
+ xno|xyes|xlib|x)
+ ;;
+ x*)
+ AC_MSG_ERROR("invalid value --enable-sctp=$enableval")
+ ;;
+ esac ])
AC_ARG_ENABLE(hipe,
AS_HELP_STRING([--enable-hipe], [enable hipe support])
@@ -1726,8 +1732,9 @@ if test "x$enable_sctp" != "xno" ; then
fi
if test x"$ac_cv_header_netinet_sctp_h" = x"yes"; then
- AC_CHECK_LIB(sctp, sctp_bindx)
- AC_CHECK_FUNCS([sctp_peeloff sctp_getladdrs sctp_freeladdrs sctp_getpaddrs sctp_freepaddrs])
+ AS_IF([test "x$enable_sctp" = "xlib"],
+ AC_CHECK_LIB(sctp, sctp_bindx))
+ AC_CHECK_FUNCS([sctp_bindx sctp_peeloff sctp_getladdrs sctp_freeladdrs sctp_getpaddrs sctp_freepaddrs])
AC_CHECK_DECLS([SCTP_UNORDERED, SCTP_ADDR_OVER, SCTP_ABORT,
SCTP_EOF, SCTP_SENDALL, SCTP_ADDR_CONFIRMED,
SCTP_DELAYED_ACK_TIME,