Find and include speex.h from the speex/ subdirectory.

This breaks libspeex 1.0.3 and older which are no longer supported anyway.
Because of differences in UWB support libspeex 1.0.5 is minimum.
Patch by James Le Cuirot.


git-svn-id: http://voip.null.ro/svn/yate@4588 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2011-09-07 08:56:41 +00:00
parent f45a073446
commit 976c60aa34
2 changed files with 6 additions and 6 deletions

View File

@ -773,18 +773,18 @@ if [[ "x$ac_cv_use_libspeex" = "xstatic" ]]; then
SPEEX_LIB="-Wl,-Bstatic $SPEEX_LIB -Wl,-Bdynamic"
fi
if [[ "x$ac_cv_use_libspeex" = "xyes" ]]; then
for i in /usr/include /usr/include/speex /usr/local/include /usr/local/include/speex; do
for i in /usr/include /usr/local/include; do
ac_cv_use_libspeex="$i"
test -f "$ac_cv_use_libspeex/speex.h" && break
test -f "$ac_cv_use_libspeex/speex/speex.h" && break
done
fi
if [[ "x$ac_cv_use_libspeex" != "xno" ]]; then
AC_MSG_CHECKING([for speex.h in $ac_cv_use_libspeex])
if [[ -f "$ac_cv_use_libspeex/speex.h" ]]; then
AC_MSG_CHECKING([for speex.h in $ac_cv_use_libspeex/speex])
if [[ -f "$ac_cv_use_libspeex/speex/speex.h" ]]; then
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Werror -I$ac_cv_use_libspeex"
AC_TRY_COMPILE([
#include <speex.h>
#include <speex/speex.h>
],[
int i = SPEEX_MODEID_UWB;
speex_lib_ctl(SPEEX_LIB_GET_MAJOR_VERSION, &i);

View File

@ -27,7 +27,7 @@
#include <yatephone.h>
extern "C" {
#include <speex.h>
#include <speex/speex.h>
#ifdef _WINDOWS
/* For some reason the DLL does not export the mode variables */
#define speex_nb_mode (*speex_lib_get_mode(SPEEX_MODEID_NB))