12023
|
1 AC_DEFUN([LP_CHECK_ILBC],[
|
|
2
|
|
3 AC_ARG_WITH( ilbc,
|
|
4 [ --with-ilbc Set prefix where ilbc headers and libs can be found (ex:/usr, /usr/local, none to disable ilbc support) [default=/usr] ],
|
|
5 [ ilbc_prefix=${withval}],[ ilbc_prefix="/usr" ])
|
|
6
|
|
7 if test "$ilbc_prefix" = "none" ; then
|
|
8 AC_MSG_NOTICE([iLBC codec support disabled. ])
|
|
9 else
|
|
10 ILBC_CFLAGS=" -I${ilbc_prefix}/include/ilbc"
|
|
11 ILBC_LIBS="-L${ilbc_prefix}/lib -lilbc -lm"
|
|
12 CPPFLAGS_save=$CPPFLAGS
|
|
13 CPPFLAGS=$ILBC_CFLAGS
|
|
14 LDFLAGS_save=$LDFLAGS
|
|
15 LDFLAGS=$ILBC_LIBS
|
|
16 AC_CHECK_HEADERS(iLBC_decode.h,[AC_CHECK_LIB(ilbc,iLBC_decode,ilbc_found=yes,ilbc_found=no)
|
|
17 ],ilbc_found=no)
|
|
18
|
|
19 CPPFLAGS=$CPPFLAGS_save
|
|
20 LDFLAGS=$LDFLAGS_save
|
|
21
|
|
22 if test "$ilbc_found" = "no" ; then
|
|
23 AC_MSG_WARN([Could not find ilbc headers or libs. Please install ilbc package from http://www.linphone.org if you want iLBC codec support in linphone.])
|
|
24 ILBC_CFLAGS=
|
|
25 ILBC_LIBS=
|
|
26 else
|
|
27 AC_DEFINE(HAVE_ILBC,1,[Defined when we have ilbc codec lib])
|
|
28 AC_SUBST(ILBC_CFLAGS)
|
|
29 AC_SUBST(ILBC_LIBS)
|
|
30 fi
|
|
31 fi
|
|
32
|
|
33 ])
|