sac-tport.m4 1.25 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1 2 3 4
dnl ======================================================================
dnl SAC_TPORT - perform checks for tport
dnl ======================================================================
AC_DEFUN([SAC_TPORT], [
5 6 7 8 9

AC_ARG_WITH(sigcomp,
[  --with-sigcomp=dir      use Sofia SigComp package (not used by default)],,
	with_sigcomp=no)

Mikko Paavonen's avatar
Mikko Paavonen committed
10
if test -n "${with_sigcomp}" && test "${with_sigcomp}" != no ; then
11 12 13 14 15 16 17 18 19 20
	if test "${with_sigcomp}" != yes ; then
		CPPFLAGS="-I${with_sigcomp}/include $CPPFLAGS"
		LIBS="-L${with_sigcomp}/lib -lsigcomp $LIBS"
	else
		LIBS="-lsigcomp $LIBS"
	fi

	AC_CHECK_HEADERS(sigcomp.h,,AC_MSG_ERROR([cannot find Sofia SigComp includes]))

	AC_CHECK_FUNC(sigcomp_library_2_5,
21 22
            [AC_DEFINE([HAVE_SIGCOMP], 1, [Define to 1 if you have Sofia sigcomp >= 2.5])
             AC_DEFINE([HAVE_SOFIA_SIGCOMP], 1, [Define to 1 if you have Sofia sigcomp >= 2.5])], 
23 24 25
             AC_MSG_ERROR(Sofia SigComp API >= 2.5 was not found))
fi

Pekka Pessi's avatar
Pekka Pessi committed
26 27 28 29
# Check for features used by tport.
AC_SYS_IP_RECVERR
AC_SYS_IPV6_RECVERR

Pekka Pessi's avatar
Pekka Pessi committed
30
AC_CHECK_HEADERS(netinet/tcp.h netinet/sctp.h)
31

Pekka Pessi's avatar
Pekka Pessi committed
32 33 34 35 36
AC_ARG_WITH(sctp,
[  --enable-sctp          use LK-SCTP (not used by default)],,
 enable_sigcomp=no)

if test x$enable_sctp = xyes; then
37
AC_DEFINE(HAVE_SCTP, 1, [Define to 1 if you have SCTP])
Pekka Pessi's avatar
Pekka Pessi committed
38 39
fi
])