sac-tport.m4 1.23 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)

Pekka Pessi's avatar
Pekka Pessi committed
10
if test -n "${with_sigcomp}" && test "${with_sigcomp}" != no ; then
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
	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,
            [AC_DEFINE([HAVE_SIGCOMP], 1, [Define this as 1 if you have Sofia sigcomp >= 2.5])
             AC_DEFINE([HAVE_SOFIA_SIGCOMP], 2.5, [Define this as 1 if you have Sofia sigcomp >= 2.5])], 
             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

30 31
AC_CHECK_HEADERS(netinet/tcp.h)

Pekka Pessi's avatar
Pekka Pessi committed
32 33 34 35 36 37 38 39
if test x$with_sctp != xno; then
AC_CHECK_HEADERS(netinet/sctp.h, [
AC_DEFINE(HAVE_SCTP, 1, [Define this a 1 if you have SCTP])
])
fi

AM_CONDITIONAL(HAVE_TLS, test x$HAVE_TLS = x1)
])