blob: 5de5c763005e1485a38348bf4157b308568b486e [file] [log] [blame]
Austin Schuh8d0a2852019-12-28 22:54:28 -08001dnl -*-autoconf-*-
2
3dnl lksctp-tools: Autoconf script
4dnl
5dnl $Id: configure.in,v 1.1.1.2 2002/08/06 23:55:45 inaky Exp $
6
7dnl (C) 2002 Intel Corporation
8dnl Iñaky Pérez-González <inaky.perez-gonzalez@intel.com>
9dnl - Initial packaging
10
11dnl Package info
12dnl (CONFIG_AUX_DIR is for putting stuff in $TOPSRCDIR/bin, so we
13dnl reduce clutter in the root; if we put it below AM_INIT_AUTOMAKE,
14dnl configure will fail ...)
15
16AC_INIT([lksctp-tools], [1.0.18], [], [], [http://www.lksctp.org/])
17AC_SUBST(LIBSCTP_CURRENT, 1)
18AC_SUBST(LIBSCTP_REVISION, 18)
19AC_SUBST(LIBSCTP_AGE, 0)
20AC_SUBST(LIBWITHSCTP_CURRENT, 1)
21AC_SUBST(LIBWITHSCTP_REVISION, 18)
22AC_SUBST(LIBWITHSCTP_AGE, 0)
23
24AC_CONFIG_AUX_DIR(bin)
25AC_CONFIG_SRCDIR([src/apps/sctp_darn.c])
26AC_CONFIG_HEADERS([config.h])
27AC_CONFIG_MACRO_DIR([m4])
28AC_REVISION($Revision: 1.1.1.2 $)
29AM_INIT_AUTOMAKE
30m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
31AM_SILENT_RULES([yes])
32
33dnl Set defaults
34dnl CFLAGS="$CFLAGS -g -Wall"
35
36dnl Checks for programs.
37AC_PROG_AWK
38AC_PROG_CC
39AC_PROG_INSTALL
40AC_PROG_LN_S
41AC_ISC_POSIX
42
43dnl Checks for libraries.
44AC_LIBTOOL_DLOPEN
45AC_PROG_LIBTOOL
46AC_SUBST(LIBTOOL_DEPS)
47
48dnl Checks for header files.
49AC_HEADER_STDC
50AC_HEADER_SYS_WAIT
51AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdint.h \
52 stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h \
53 sys/time.h unistd.h])
54AC_CHECK_HEADERS([linux/sctp.h], [], [], [AC_INCLUDES_DEFAULT
55#ifdef HAVE_STDINT_H
56# include <stdint.h>
57#endif
58#ifdef HAVE_SYS_SOCKET_H
59# include <sys/socket.h>
60#endif
61])
62
63dnl Checks for typedefs, structures, and compiler characteristics.
64AC_C_CONST
65AC_C_INLINE
66AC_TYPE_SIZE_T
67AC_HEADER_TIME
68AC_STRUCT_TM
69AC_C_VOLATILE
70
71# Checks for library functions.
72AC_FUNC_MALLOC
73AC_FUNC_MEMCMP
74AC_FUNC_REALLOC
75AC_FUNC_SELECT_ARGTYPES
76AC_FUNC_SETVBUF_REVERSED
77AC_FUNC_VPRINTF
78AC_CHECK_FUNCS([bzero gethostbyname gettimeofday memmove memset select socket \
79 strchr strerror strtol strtoul])
80
81# Support for stream reset even, added on v4.11, 35ea82d611da
82LKSCTP_CHECK_MEMBER([struct sctp_event_subscribe.sctp_stream_reset_event],
83 [HAVE_SCTP_STREAM_RESET_EVENT])
84
85# RFC 6525 (Stream Reconf), finished on v4.12, c0d8bab6ae51
86LKSCTP_CHECK_DECL([SCTP_RECONFIG_SUPPORTED], [HAVE_SCTP_STREAM_RECONFIG])
87
88# sctp_peeloff_flags was added on v4.13, 2cb5c8e378d1
89LKSCTP_CHECK_TYPE([sctp_peeloff_flags_arg_t], [HAVE_SCTP_PEELOFF_FLAGS])
90
91# New members to sctp_pdapi_event, added on v4.16, 65f5e357839e
92LKSCTP_CHECK_MEMBER([struct sctp_pdapi_event.pdapi_stream],
93 [HAVE_SCTP_PDAPI_EVENT_PDAPI_STREAM])
94LKSCTP_CHECK_MEMBER([struct sctp_pdapi_event.pdapi_seq],
95 [HAVE_SCTP_PDAPI_EVENT_PDAPI_SEQ])
96
97# PR-SCTP struct used to probe for sendv/recvv support, added on v4.17
98LKSCTP_CHECK_TYPE([struct sctp_prinfo], [HAVE_SCTP_SENDV])
99
100# This event indicates that the peer does not support SCTP authentication,
101# added on v4.16, 30f6ebf65bc4
102LKSCTP_CHECK_DECL([SCTP_AUTH_NO_AUTH], [HAVE_SCTP_AUTH_NO_AUTH])
103
104# New members to sctp_paddrparams, added on v4.19, 0b0dce7a36fb
105LKSCTP_CHECK_MEMBER([struct sctp_paddrparams.spp_ipv6_flowlabel],
106 [HAVE_SCTP_SPP_IPV6_FLOWLABEL])
107LKSCTP_CHECK_MEMBER([struct sctp_paddrparams.spp_dscp],
108 [HAVE_SCTP_SPP_DSCP])
109
110AC_CONFIG_HEADERS([src/include/netinet/sctp.h])
111AC_CONFIG_FILES([lksctp-tools.spec
112 Makefile
113 bin/Makefile
114 man/Makefile
115 src/Makefile
116 src/apps/Makefile
117 src/func_tests/Makefile
118 src/include/Makefile
119 src/include/netinet/Makefile
120 src/lib/Makefile
121 src/testlib/Makefile
122 src/withsctp/Makefile
123 doc/Makefile
124 libsctp.pc])
125
126# Build options
127AC_ARG_ENABLE(tests,
128 AS_HELP_STRING([--disable-tests],
129 [Build tests (default: yes)]),,
130 [enable_tests=yes])
131AM_CONDITIONAL(BUILD_TESTS, [test $enable_tests != no])
132
133AC_OUTPUT