Skip to content
Snippets Groups Projects
Commit 533758a7 authored by Benoit Grégoire's avatar Benoit Grégoire
Browse files

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.
parent eeaf86e1
No related branches found
No related tags found
No related merge requests found
......@@ -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]
)
AM_CONDITIONAL(USE_IAX, test x$with_iax2 = xyes)
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.])]
)
]
)
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
......
......@@ -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/
......
......@@ -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;
}
......
sflcodecdir = $(libdir)/sflphone/codecs
if BUILD_GSM
GSM_LIB = libcodec_gsm.so
libcodec_gsm_so_SOURCES = gsmcodec.cpp
libcodec_gsm_so_CFLAGS = -fPIC -g -Wall
libcodec_gsm_so_LDFLAGS = -shared -lc -lgsm
GSM_LIB = libcodec_gsm.so
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
SPEEX_LIB = libcodec_speex.so
libcodec_speex_so_SOURCES = speexcodec.cpp
libcodec_speex_so_CFLAGS = -fPIC -g -Wall
libcodec_speex_so_LDFLAGS = -shared -lc -lspeex
SPEEX_LIB = libcodec_speex.so
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment