annotate m4/ilbc.m4 @ 12486:5b9ae793e2fb

[gaim-migrate @ 14798] Stu is one smart young whipper snapper. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 14 Dec 2005 22:53:54 +0000
parents 80faf1ca5280
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12023
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 AC_DEFUN([LP_CHECK_ILBC],[
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 AC_ARG_WITH( ilbc,
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
4 [ --with-ilbc Set prefix where ilbc headers and libs can be found (ex:/usr, /usr/local, none to disable ilbc support) [default=/usr] ],
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 [ ilbc_prefix=${withval}],[ ilbc_prefix="/usr" ])
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
6
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 if test "$ilbc_prefix" = "none" ; then
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 AC_MSG_NOTICE([iLBC codec support disabled. ])
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 else
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 ILBC_CFLAGS=" -I${ilbc_prefix}/include/ilbc"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 ILBC_LIBS="-L${ilbc_prefix}/lib -lilbc -lm"
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 CPPFLAGS_save=$CPPFLAGS
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 CPPFLAGS=$ILBC_CFLAGS
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 LDFLAGS_save=$LDFLAGS
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 LDFLAGS=$ILBC_LIBS
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 AC_CHECK_HEADERS(iLBC_decode.h,[AC_CHECK_LIB(ilbc,iLBC_decode,ilbc_found=yes,ilbc_found=no)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 ],ilbc_found=no)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 CPPFLAGS=$CPPFLAGS_save
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 LDFLAGS=$LDFLAGS_save
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22 if test "$ilbc_found" = "no" ; then
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
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.])
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24 ILBC_CFLAGS=
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 ILBC_LIBS=
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26 else
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27 AC_DEFINE(HAVE_ILBC,1,[Defined when we have ilbc codec lib])
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28 AC_SUBST(ILBC_CFLAGS)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29 AC_SUBST(ILBC_LIBS)
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 fi
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31 fi
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32
80faf1ca5280 [gaim-migrate @ 14316]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
33 ])