Austin Schuh | 8d0a285 | 2019-12-28 22:54:28 -0800 | [diff] [blame] | 1 | dnl -*-autoconf-*- |
| 2 | |
| 3 | dnl lksctp-tools: Autoconf script |
| 4 | dnl |
| 5 | dnl $Id: configure.in,v 1.1.1.2 2002/08/06 23:55:45 inaky Exp $ |
| 6 | |
| 7 | dnl (C) 2002 Intel Corporation |
| 8 | dnl Iñaky Pérez-González <inaky.perez-gonzalez@intel.com> |
| 9 | dnl - Initial packaging |
| 10 | |
| 11 | dnl Package info |
| 12 | dnl (CONFIG_AUX_DIR is for putting stuff in $TOPSRCDIR/bin, so we |
| 13 | dnl reduce clutter in the root; if we put it below AM_INIT_AUTOMAKE, |
| 14 | dnl configure will fail ...) |
| 15 | |
| 16 | AC_INIT([lksctp-tools], [1.0.18], [], [], [http://www.lksctp.org/]) |
| 17 | AC_SUBST(LIBSCTP_CURRENT, 1) |
| 18 | AC_SUBST(LIBSCTP_REVISION, 18) |
| 19 | AC_SUBST(LIBSCTP_AGE, 0) |
| 20 | AC_SUBST(LIBWITHSCTP_CURRENT, 1) |
| 21 | AC_SUBST(LIBWITHSCTP_REVISION, 18) |
| 22 | AC_SUBST(LIBWITHSCTP_AGE, 0) |
| 23 | |
| 24 | AC_CONFIG_AUX_DIR(bin) |
| 25 | AC_CONFIG_SRCDIR([src/apps/sctp_darn.c]) |
| 26 | AC_CONFIG_HEADERS([config.h]) |
| 27 | AC_CONFIG_MACRO_DIR([m4]) |
| 28 | AC_REVISION($Revision: 1.1.1.2 $) |
| 29 | AM_INIT_AUTOMAKE |
| 30 | m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) |
| 31 | AM_SILENT_RULES([yes]) |
| 32 | |
| 33 | dnl Set defaults |
| 34 | dnl CFLAGS="$CFLAGS -g -Wall" |
| 35 | |
| 36 | dnl Checks for programs. |
| 37 | AC_PROG_AWK |
| 38 | AC_PROG_CC |
| 39 | AC_PROG_INSTALL |
| 40 | AC_PROG_LN_S |
| 41 | AC_ISC_POSIX |
| 42 | |
| 43 | dnl Checks for libraries. |
| 44 | AC_LIBTOOL_DLOPEN |
| 45 | AC_PROG_LIBTOOL |
| 46 | AC_SUBST(LIBTOOL_DEPS) |
| 47 | |
| 48 | dnl Checks for header files. |
| 49 | AC_HEADER_STDC |
| 50 | AC_HEADER_SYS_WAIT |
| 51 | AC_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]) |
| 54 | AC_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 | |
| 63 | dnl Checks for typedefs, structures, and compiler characteristics. |
| 64 | AC_C_CONST |
| 65 | AC_C_INLINE |
| 66 | AC_TYPE_SIZE_T |
| 67 | AC_HEADER_TIME |
| 68 | AC_STRUCT_TM |
| 69 | AC_C_VOLATILE |
| 70 | |
| 71 | # Checks for library functions. |
| 72 | AC_FUNC_MALLOC |
| 73 | AC_FUNC_MEMCMP |
| 74 | AC_FUNC_REALLOC |
| 75 | AC_FUNC_SELECT_ARGTYPES |
| 76 | AC_FUNC_SETVBUF_REVERSED |
| 77 | AC_FUNC_VPRINTF |
| 78 | AC_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 |
| 82 | LKSCTP_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 |
| 86 | LKSCTP_CHECK_DECL([SCTP_RECONFIG_SUPPORTED], [HAVE_SCTP_STREAM_RECONFIG]) |
| 87 | |
| 88 | # sctp_peeloff_flags was added on v4.13, 2cb5c8e378d1 |
| 89 | LKSCTP_CHECK_TYPE([sctp_peeloff_flags_arg_t], [HAVE_SCTP_PEELOFF_FLAGS]) |
| 90 | |
| 91 | # New members to sctp_pdapi_event, added on v4.16, 65f5e357839e |
| 92 | LKSCTP_CHECK_MEMBER([struct sctp_pdapi_event.pdapi_stream], |
| 93 | [HAVE_SCTP_PDAPI_EVENT_PDAPI_STREAM]) |
| 94 | LKSCTP_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 |
| 98 | LKSCTP_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 |
| 102 | LKSCTP_CHECK_DECL([SCTP_AUTH_NO_AUTH], [HAVE_SCTP_AUTH_NO_AUTH]) |
| 103 | |
| 104 | # New members to sctp_paddrparams, added on v4.19, 0b0dce7a36fb |
| 105 | LKSCTP_CHECK_MEMBER([struct sctp_paddrparams.spp_ipv6_flowlabel], |
| 106 | [HAVE_SCTP_SPP_IPV6_FLOWLABEL]) |
| 107 | LKSCTP_CHECK_MEMBER([struct sctp_paddrparams.spp_dscp], |
| 108 | [HAVE_SCTP_SPP_DSCP]) |
| 109 | |
| 110 | AC_CONFIG_HEADERS([src/include/netinet/sctp.h]) |
| 111 | AC_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 |
| 127 | AC_ARG_ENABLE(tests, |
| 128 | AS_HELP_STRING([--disable-tests], |
| 129 | [Build tests (default: yes)]),, |
| 130 | [enable_tests=yes]) |
| 131 | AM_CONDITIONAL(BUILD_TESTS, [test $enable_tests != no]) |
| 132 | |
| 133 | AC_OUTPUT |