exosip.m4 1.37 KB
Newer Older
aymeric's avatar
aymeric committed
1 2 3 4 5
dnl -*- autoconf -*-
AC_DEFUN([LP_SETUP_EXOSIP],[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([LP_CHECK_OSIP2])

jehan's avatar
jehan committed
6 7 8

case $target_os in
	*darwin*)
9
		OSIP_LIBS="$OSIP_LIBS  -framework CoreFoundation "
jehan's avatar
jehan committed
10 11 12
	;;
esac

aymeric's avatar
aymeric committed
13 14 15 16 17
dnl eXosip embeded stuff
EXOSIP_CFLAGS="$OSIP_CFLAGS -DOSIP_MT "
EXOSIP_LIBS="$OSIP_LIBS -leXosip2  "

CPPFLAGS_save=$CPPFLAGS
smorlat's avatar
smorlat committed
18
CPPFLAGS="$OSIP_CFLAGS $CPPFLAGS"
aymeric's avatar
aymeric committed
19 20 21
AC_CHECK_HEADER([eXosip2/eXosip.h], ,AC_MSG_ERROR([Could not find eXosip2 headers !]))
CPPFLAGS=$CPPFLAGS_save

jehan's avatar
jehan committed
22 23


aymeric's avatar
aymeric committed
24 25
dnl check for eXosip2 libs
LDFLAGS_save=$LDFLAGS
jehan's avatar
jehan committed
26
LDFLAGS="$OSIP_LIBS $LDFLAGS $OPENSSL_LIBS"
aymeric's avatar
aymeric committed
27
LIBS_save=$LIBS
Simon Morlat's avatar
Simon Morlat committed
28
AC_CHECK_LIB([eXosip2],[eXosip_set_tls_ctx],
aymeric's avatar
aymeric committed
29
	[],
Simon Morlat's avatar
Simon Morlat committed
30
	[AC_MSG_ERROR([Could not find eXosip2 library with version >= 3.5.0 !])],
31
	[-losipparser2 -losip2 ])
aymeric's avatar
aymeric committed
32 33 34
AC_CHECK_LIB([eXosip2],[eXosip_get_version],
	[AC_DEFINE([HAVE_EXOSIP_GET_VERSION],[1],[Defined when eXosip_get_version is available])],
	[],
35
	[-losipparser2 -losip2 ])
36 37 38
AC_CHECK_LIB([eXosip2],[eXosip_get_socket],
	[AC_DEFINE([HAVE_EXOSIP_GET_SOCKET],[1],[Defined when eXosip_get_socket is available])],
	[AC_MSG_WARN([Could not find eXosip_get_socket in eXosip2 !])],
39
	[-losipparser2 -losip2 ])
smorlat's avatar
smorlat committed
40 41 42
dnl AC_CHECK_LIB([eXosip2],[eXosip_get_naptr],
dnl	[AC_DEFINE([HAVE_EXOSIP_NAPTR_SUPPORT],[1],[Defined when eXosip_get_naptr is available])],
dnl	[],
43
dnl	[-losipparser2 -losip2 ])
aymeric's avatar
aymeric committed
44 45 46 47 48 49
LIBS=$LIBS_save
LDFLAGS=$LDFLAGS_save

AC_SUBST(EXOSIP_CFLAGS)
AC_SUBST(EXOSIP_LIBS)
])