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

dnl eXosip embeded stuff
EXOSIP_CFLAGS="$OSIP_CFLAGS -DOSIP_MT "
EXOSIP_LIBS="$OSIP_LIBS -leXosip2  "

CPPFLAGS_save=$CPPFLAGS
smorlat's avatar
smorlat committed
11
CPPFLAGS="$OSIP_CFLAGS $CPPFLAGS"
aymeric's avatar
aymeric committed
12 13 14 15 16
AC_CHECK_HEADER([eXosip2/eXosip.h], ,AC_MSG_ERROR([Could not find eXosip2 headers !]))
CPPFLAGS=$CPPFLAGS_save

dnl check for eXosip2 libs
LDFLAGS_save=$LDFLAGS
smorlat's avatar
smorlat committed
17
LDFLAGS="$OSIP_LIBS $LDFLAGS"
aymeric's avatar
aymeric committed
18 19 20 21
LIBS_save=$LIBS
AC_CHECK_LIB([eXosip2],[eXosip_subscribe_remove],
	[],
	[AC_MSG_ERROR([Could not find eXosip2 library with version >= 3.0.2 !])],
22
	[-losipparser2 -losip2 ])
aymeric's avatar
aymeric committed
23 24 25
AC_CHECK_LIB([eXosip2],[eXosip_get_version],
	[AC_DEFINE([HAVE_EXOSIP_GET_VERSION],[1],[Defined when eXosip_get_version is available])],
	[],
26
	[-losipparser2 -losip2 ])
27 28 29
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 !])],
30
	[-losipparser2 -losip2 ])
smorlat's avatar
smorlat committed
31 32 33
dnl AC_CHECK_LIB([eXosip2],[eXosip_get_naptr],
dnl	[AC_DEFINE([HAVE_EXOSIP_NAPTR_SUPPORT],[1],[Defined when eXosip_get_naptr is available])],
dnl	[],
34
dnl	[-losipparser2 -losip2 ])
aymeric's avatar
aymeric committed
35 36 37 38 39 40
LIBS=$LIBS_save
LDFLAGS=$LDFLAGS_save

AC_SUBST(EXOSIP_CFLAGS)
AC_SUBST(EXOSIP_LIBS)
])