Build system improvements for gsm, speex and libiax2.

SFLPhone will now compile and run without libiax, but I can't carantee it won't crash.
This commit is contained in:
Benoit Grégoire
2008-02-20 12:04:41 -05:00
parent eeaf86e145
commit 533758a71a
4 changed files with 34 additions and 20 deletions

View File

@ -240,15 +240,25 @@ AM_CONDITIONAL(BUILD_SPEEX, test "x$with_speex" = "xyes" )
dnl Check for IAX
AC_ARG_ENABLE(iax2,
AS_HELP_STRING(
[--disable-iax2],
[disable iax2 library support @<:@default=no@:>@]
),
[with_iax2=$enableval],
[with_iax2=yes]
AC_ARG_WITH([iax2],
[AS_HELP_STRING([--without-iax2],
[disable support for the iax2 protocol])],
[],
[with_iax2=yes])
LIBIAX2=
AS_IF([test "x$with_iax2" != xno],
[AC_CHECK_HEADER([iax2.h], , AC_MSG_FAILURE([Unable to find the libiax2 headers (you may need to install the dev package). You may use --without-iax2 to compile without iax2 protocol support.]))]
[AC_CHECK_LIB([iax2], [speex_decode_int],
[],
[AC_MSG_FAILURE(
[libiax2 link test failed. You may use --without-iax2 to compile without iax2 protocol support.])]
)
AM_CONDITIONAL(USE_IAX, test x$with_iax2 = xyes)
]
)
AC_DEFINE([HAVE_IAX2], test "x$with_iax2" = "xyes", [Define if you have libiax2])
AM_CONDITIONAL(USE_IAX2, test "x$with_iax2" = "xyes" )
dnl Check for readline
GNUPG_CHECK_READLINE

View File

@ -14,7 +14,6 @@ endif
if USE_IAX
# Use the global instead of locally built
IAX_LIBS = $(top_builddir)/libs/libiax2/src/libiax.la
#IAX_LIBS =
IAX_FLAGS = -DUSE_IAX
#IAX_CFLAGS = -I$(top_srcdir)/libs/libiax2/src/

View File

@ -19,7 +19,9 @@
*/
#include "accountcreator.h"
#include "sipaccount.h"
#ifdef HAVE_IAX2
#include "iaxaccount.h"
#endif
AccountCreator::AccountCreator()
{
@ -37,10 +39,11 @@ AccountCreator::createAccount(AccountType type, AccountID accountID)
case SIP_ACCOUNT:
return new SIPAccount(accountID);
break;
#ifdef HAVE_IAX2
case IAX_ACCOUNT:
return new IAXAccount(accountID);
break;
#endif
}
return 0;
}

View File

@ -4,6 +4,7 @@ if BUILD_GSM
libcodec_gsm_so_SOURCES = gsmcodec.cpp
libcodec_gsm_so_CFLAGS = -fPIC -g -Wall
libcodec_gsm_so_LDFLAGS = -shared -lc -lgsm
INSTALL_GSM_RULE = install-libcodec_gsm_so
endif
if BUILD_SPEEX
@ -11,6 +12,7 @@ if BUILD_SPEEX
libcodec_speex_so_SOURCES = speexcodec.cpp
libcodec_speex_so_CFLAGS = -fPIC -g -Wall
libcodec_speex_so_LDFLAGS = -shared -lc -lspeex
INSTALL_SPEEX_RULE = install-libcodec_speex_so
endif
noinst_PROGRAMS = libcodec_ulaw.so libcodec_alaw.so $(GSM_LIB) $(SPEEX_LIB) libcodec_ilbc.so
@ -31,7 +33,7 @@ libcodec_ilbc_so_LDFLAGS = -shared ilbc/*.o -lc
SUBDIRS = ilbc
install-exec-local: install-libcodec_ulaw_so install-libcodec_alaw_so install-libcodec_gsm_so install-libcodec_speex_so install-libcodec_ilbc_so
install-exec-local: install-libcodec_ulaw_so install-libcodec_alaw_so $(INSTALL_GSM_RULE) $(INSTALL_SPEEX_RULE) install-libcodec_ilbc_so
uninstall-local: uninstall-libcodec_ulaw_so uninstall-libcodec_alaw_so uninstall-libcodec_gsm_so uninstall-libcodec_speex_so uninstall-libcodec_ilbc_so
install-libcodec_ulaw_so: libcodec_ulaw.so