Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 89712 invoked by uid 500); 22 Oct 2002 12:37:44 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 89693 invoked from network); 22 Oct 2002 12:37:41 -0000 Date: 22 Oct 2002 12:37:41 -0000 Message-ID: <20021022123741.34128.qmail@icarus.apache.org> From: trawick@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/include apr.h.in X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N trawick 2002/10/22 05:37:40 Modified: . configure.in build apr_network.m4 include apr.h.in Log: add configure-time detection of issues related to SCTP protocol support Submitted by: Randall Stewart , Jeff Trawick Revision Changes Path 1.494 +7 -0 apr/configure.in Index: configure.in =================================================================== RCS file: /home/cvs/apr/configure.in,v retrieving revision 1.493 retrieving revision 1.494 diff -u -r1.493 -r1.494 --- configure.in 19 Oct 2002 19:05:53 -0000 1.493 +++ configure.in 22 Oct 2002 12:37:40 -0000 1.494 @@ -930,6 +930,8 @@ kernel/OS.h \ net/errno.h \ netinet/in.h \ + netinet/sctp.h \ + netinet/sctp_uio.h \ sys/file.h \ sys/mman.h \ sys/poll.h \ @@ -977,6 +979,8 @@ AC_SUBST(netdbh) AC_SUBST(sys_syslimitsh) AC_SUBST(netinet_inh) +AC_SUBST(netinet_sctph) +AC_SUBST(netinet_sctp_uioh) AC_SUBST(netinet_tcph) AC_SUBST(stdargh) AC_SUBST(stdioh) @@ -1733,9 +1737,12 @@ acceptfilter="0" fi +APR_CHECK_SCTP + AC_SUBST(apr_tcp_nopush_flag) AC_SUBST(have_corkable_tcp) AC_SUBST(acceptfilter) +AC_SUBST(have_sctp) AC_CHECK_FUNCS(set_h_errno) APR_CHECK_RESOLV_RETRANS 1.19 +38 -0 apr/build/apr_network.m4 Index: apr_network.m4 =================================================================== RCS file: /home/cvs/apr/build/apr_network.m4,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- apr_network.m4 30 Apr 2002 10:57:40 -0000 1.18 +++ apr_network.m4 22 Oct 2002 12:37:40 -0000 1.19 @@ -659,6 +659,44 @@ dnl +dnl APR_CHECK_SCTP +dnl +dnl check for presence of SCTP protocol support +dnl +AC_DEFUN(APR_CHECK_SCTP,[ + AC_CACHE_CHECK(if SCTP protocol is supported, ac_cv_sctp,[ + AC_TRY_RUN( [ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +int main(void) { + int s = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP); + if (s < 0) { + exit(1); + } + exit(0); +} +],[ + ac_cv_sctp="yes" +],[ + ac_cv_sctp="no" +],[ + ac_cv_sctp="yes" +])]) +if test "$ac_cv_sctp" = "yes"; then + have_sctp=1 +else + have_sctp=0 +fi +]) + +dnl dnl APR_CHECK_H_ERRNO_FLAG dnl dnl checks which flags are necessary for to define h_errno 1.117 +3 -0 apr/include/apr.h.in Index: apr.h.in =================================================================== RCS file: /home/cvs/apr/include/apr.h.in,v retrieving revision 1.116 retrieving revision 1.117 diff -u -r1.116 -r1.117 --- apr.h.in 19 Oct 2002 18:00:54 -0000 1.116 +++ apr.h.in 22 Oct 2002 12:37:40 -0000 1.117 @@ -43,6 +43,8 @@ #define APR_HAVE_LIMITS_H @limitsh@ #define APR_HAVE_NETDB_H @netdbh@ #define APR_HAVE_NETINET_IN_H @netinet_inh@ +#define APR_HAVE_NETINET_SCTP_H @netinet_sctph@ +#define APR_HAVE_NETINET_SCTP_UIO_H @netinet_sctp_uioh@ #define APR_HAVE_NETINET_TCP_H @netinet_tcph@ #define APR_HAVE_PTHREAD_H @pthreadh@ #define APR_HAVE_SEMAPHORE_H @semaphoreh@ @@ -117,6 +119,7 @@ #define APR_HAVE_MEMCHR @have_memchr@ #define APR_HAVE_STRUCT_RLIMIT @struct_rlimit@ #define APR_HAVE_UNION_SEMUN @have_union_semun@ +#define APR_HAVE_SCTP @have_sctp@ #if APR_HAVE_SYS_TYPES_H #include