dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([crypt.h unistd.h sys/socket.h sys/stat.h sys/time.h time.h netinet/in.h arpa/inet.h errno.h sys/uio.h spawn.h sys/poll.h sys/epoll.h sys/select.h sys/devpoll.h sys/event.h port.h signal.h sys/signalfd.h sys/timerfd.h linux/tcp.h])
+AC_CHECK_HEADERS([crypt.h unistd.h sys/socket.h sys/stat.h sys/time.h time.h netinet/in.h netinet/tcp.h netinet/sctp.h arpa/inet.h errno.h sys/uio.h spawn.h sys/poll.h sys/epoll.h sys/select.h sys/devpoll.h sys/event.h port.h signal.h sys/signalfd.h sys/timerfd.h])
AC_HEADER_TIME
dnl Networking Functions
-AC_ARG_ENABLE(ipv6,AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),[ipv6=$enableval],[ipv6=yes])
-
-if test x$ipv6 != xyes; then
- have_v6="no"
-else
-
-have_v6=yes
-RB_PROTO_INET6([], [
- AC_MSG_NOTICE([Disabling IPv6 support: PF_INET6 not found])
- have_v6=no
- ])
-
- if test "X$have_v6" = "Xyes"; then
- RB_TYPE_STRUCT_SOCKADDR_IN6([], [
- AC_MSG_NOTICE([Disabling IPv6 support: struct sockaddr_in6 not found])
- have_v6=no
- ])
- fi
-
-fi
-
AC_CHECK_TYPES([struct sockaddr_storage],[
rb_have_sockaddr_storage=yes
],[], [
dnl check for various functions...
-AC_CHECK_FUNCS([snprintf vsnprintf socketpair gettimeofday writev sendmsg gmtime_r strtok_r usleep posix_spawn getexecname strlcpy strlcat strnlen fstat signalfd select poll kevent port_create epoll_ctl arc4random getrusage timerfd_create])
+AC_CHECK_FUNCS([snprintf vsnprintf socketpair gettimeofday writev sendmsg gmtime_r strtok_r usleep posix_spawn getexecname strlcpy strlcat strnlen strcasestr strcasecmp strncasecmp fstat signalfd select poll kevent port_create epoll_ctl arc4random getrusage timerfd_create])
AC_SEARCH_LIBS(dlinfo, dl, AC_DEFINE(HAVE_DLINFO, 1, [Define if you have dlinfo]))
AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP, 1, [Define if you have nanosleep]))
save_LIBS="$LIBS"
LIBS="$LIBS $MBEDTLS_LIBS"
AC_CHECK_LIB(mbedtls, mbedtls_ssl_init, [
- MBEDTLS_LIBS="$MBEDTLS_LIBS -lmbedtls -lmbedcrypto -lmbedx509"
+ MBEDTLS_LIBS="$MBEDTLS_LIBS -lmbedtls -lmbedx509 -lmbedcrypto"
cf_enable_mbedtls=yes
- ], [cf_enable_mbedtls=no], [-lmbedcrypto -lmbedx509])
+ ], [cf_enable_mbedtls=no], [-lmbedx509 -lmbedcrypto])
fi
dnl GnuTLS support
+AC_ARG_WITH(sctp-path,
+AC_HELP_STRING([--with-sctp-path=DIR],[Path to libsctp.so for SCTP support.]),
+[LIBS="$LIBS -L$withval"],)
+
+AC_ARG_ENABLE(sctp,
+AC_HELP_STRING([--disable-sctp],[Disable SCTP support]),
+[sctp=$enableval],[sctp=yes])
+
+if test "$sctp" = yes; then
+
+AC_CHECK_HEADER(netinet/sctp.h, [
+ AC_CHECK_LIB(sctp, sctp_bindx,
+ [
+ AC_SUBST(LIBSCTP_LD, -lsctp)
+ AC_DEFINE(HAVE_LIBSCTP, 1, [Define to 1 if libsctp (-lsctp) is available.])
+ ], sctp=no)
+], sctp=no)
+
+fi
+
+
dnl Debug-related options
dnl =====================
AC_ARG_ENABLE(warnings,
AC_HELP_STRING([--enable-warnings],[Enable all sorts of warnings for debugging.]),
-[CFLAGS="$CFLAGS -Wall -Werror -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -W -Wno-unused -Wunused-function -Wunused-variable"],[])
+[CFLAGS="$CFLAGS -Wall -Werror -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -W -Wno-unused -Wunused-function -Wunused-variable -Wno-unused-parameter"],[])
AC_SUBST(LDFLAGS)
AC_SUBST(PICFLAGS)
_______EOF
-if test "x$rb_have_ipv6" = "xyes"; then
- echo "#define RB_IPV6 1" >> $outfile
-fi
-
if test "x$rb_windows_h" = "xyes"; then
echo '#define WIN32_LEAN_AND_MEAN 1' >> $outfile
echo '#include <windows.h>' >> $outfile
echo '#include <netinet/in.h>' >> $outfile
fi
+if test "x$rb_netinet_tcp_h" == "xyes"; then
+ echo '#include <netinet/tcp.h>' >> $outfile
+fi
+
+if test "x$rb_netinet_sctp_h" == "xyes"; then
+ echo '#include <netinet/sctp.h>' >> $outfile
+fi
+
if test "x$rb_arpa_inet_h" = "xyes"; then
echo '#include <arpa/inet.h>' >> $outfile
fi
if test x$ac_cv_header_netinet_in_h = xyes; then
rb_netinet_in_h=yes
fi
+ if test x$ac_cv_header_netinet_tcp_h = xyes; then
+ rb_netinet_tcp_h=yes
+ fi
+ if test x$ac_cv_header_netinet_sctp_h = xyes; then
+ rb_netinet_sctp_h=yes
+ fi
if test x$ac_cv_header_crypt_h = xyes; then
rb_crypt_h=yes
rb_sockaddr_storage="no"
fi
- rb_have_ipv6="$have_v6"
-
rb_mv="$MV"
rb_rm="$RM"
echo "Installing into: $prefix"
-echo "IPv6 support ................... $have_v6"
echo "Assert debugging ............... $assert"
echo "SSL Type........................ $SSL_TYPE"
+echo "SCTP............................ $sctp"
echo