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

AC_ARG_WITH(sigcomp,
7
[  --with-sigcomp=dir      use Sofia SigComp package [[not used]]],,
8 9
	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

30
AC_CHECK_HEADERS([netinet/tcp.h netinet/sctp.h],[],[],[
31
#include <sys/types.h>
32 33
#include <sys/socket.h>
])
34

35 36
AC_ARG_ENABLE(sctp,
[  --enable-sctp           use SCTP [[disabled]]],,
Pekka Pessi's avatar
Pekka Pessi committed
37 38 39
 enable_sigcomp=no)

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