12023
|
1 AC_DEFUN([LP_CHECK_OSIP2],[
|
|
2
|
|
3 AC_ARG_WITH( osip,
|
|
4 [ --with-osip Set prefix where osip can be found (ex:/usr or /usr/local)[default=/usr/local] ],
|
|
5 [ osip_prefix=${withval}],[ osip_prefix=/usr ])
|
|
6 AC_SUBST(osip_prefix)
|
|
7
|
|
8
|
|
9 OSIP_CFLAGS="-I$osip_prefix/include"
|
|
10 OSIP_LIBS="-L$osip_prefix/lib"
|
|
11
|
|
12 dnl check osip2 headers
|
|
13 CPPFLAGS_save=$CPPFLAGS
|
|
14 CPPFLAGS=$OSIP_CFLAGS
|
|
15 AC_CHECK_HEADER([osip2/osip.h], ,AC_MSG_ERROR([Could not find osip2 headers !]))
|
|
16 CPPFLAGS=$CPPFLAGS_save
|
|
17
|
|
18 dnl check for osip2 libs
|
|
19 LDFLAGS_save=$LDFLAGS
|
|
20 LDFLAGS=$OSIP_LIBS
|
|
21 dnl AC_CHECK_LIB adds osipparser2 to LIBS, I don't want that !
|
|
22 LIBS_save=$LIBS
|
|
23 AC_CHECK_LIB(osipparser2,osip_message_init, , AC_MSG_ERROR([Could not find osip2 libraries !]))
|
|
24 LDFLAGS=$LDFLAGS_save
|
|
25 LIBS=$LIBS_save
|
|
26
|
|
27 OSIP_LIBS="$OSIP_LIBS -losipparser2 -losip2"
|
|
28
|
|
29 AC_SUBST(OSIP_CFLAGS)
|
|
30 AC_SUBST(OSIP_LIBS)
|
|
31
|
|
32 ])
|